m2pfintech
API LibraryIssuance

Approve/Reject Wallet Issuance

Approves or rejects a pending wallet issuance request as part of the maker-checker compliance workflow.

Transitions

From StatusTo StatusDescription
CREATEDAPPROVEDChecker approves the request
CREATEDREJECTEDChecker rejects the request
PENDING_APPROVALAPPROVEDChecker approves
PENDING_APPROVALREJECTEDChecker rejects

Invalid Transitions

Attempting an invalid transition (e.g., approving an already rejected request) returns error code PP_CORP_187.

POST
/v1/wallet-issuances/state-transition

Authorization

bearerAuth tenantId
AuthorizationBearer <token>

JWT Bearer token from the Authentication API

In: header

X-TENANT-ID<token>

Your unique tenant identifier assigned during onboarding

In: header

Header Parameters

X-TENANT-ID*string

Your unique tenant identifier

Request Body

application/json

id*string

Required. Unique ID of the record to transition

Length1 <= length
toStatus*string

Required. Target status

Value in"APPROVED" | "REJECTED"
userId*string

Required. User performing the action

Length1 <= length
stateCode?string

State code

stateDescription?string

Description of the action

reason?array<string>

Reasons for the decision

Response Body

application/json

application/json

application/json

curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/middleware/v1/wallet-issuances/state-transition" \  -H "X-TENANT-ID: ACME_CORP" \  -H "Content-Type: application/json" \  -d '{    "id": "65a1b2c3d4e5f6789abcdef0",    "toStatus": "APPROVED",    "userId": "CHECKER_001",    "stateDescription": "All documents verified",    "reason": [      "Verified all documents",      "Complies with policy"    ]  }'
{
  "result": {},
  "pagination": {
    "list": true,
    "pageSize": 0,
    "pageNo": 0,
    "totalPages": 0,
    "totalElements": 0
  }
}
{
  "type": "https://www.m2pfintech.com/problem/problem-with-message",
  "title": "Bad Request",
  "status": 400,
  "detail": "Unable to convert http message",
  "message": "error.http.400"
}

{
  "type": "https://www.m2pfintech.com/problem/problem-with-message",
  "title": "Cannot perform APPROVE operation. Current status: REJECTED",
  "status": 409,
  "detail": "Cannot perform APPROVE operation. Current status: REJECTED",
  "message": "error.business",
  "businessCode": "PP_CORP_187"
}

Validate Pre-Issuance POST

Pre-validates whether a wallet issuance request is within configured limits (monthly and yearly) for both purchaser and beneficiary. ### When to Use Call this **before** creating the wallet issuance to check eligibility and provide real-time feedback to users about limit status. ### Checks Performed - Product-level issuance limits (monthly/yearly) - Issuer-level issuance limits - Purchaser-level limits (how many wallets can this purchaser buy) - Beneficiary-level limits (how many wallets can this person receive)

Create Unified Issuance (GPR/Gift/Forex/Wallet) - v2 POST

**🌟 RECOMMENDED** - Unified issuance endpoint for all product types and channels. This is the recommended API for all new integrations. It provides a simplified, unified structure for Corporate, Branch, Forex, and Wallet issuance channels. ### Key Features - **Single endpoint** for all channels (Corporate, Branch, Forex, Wallet) - **Simplified structure** with `accounts[]` array for multi-kit support - **Unified maker-checker** workflow across all product types - **Product types**: GPR, Gift, Forex, Wallet - **Issuance types**: Single, Bulk - **Kit support**: PRIMARY and BACKUP kits (BACKUP not supported for Gift) ### Flow 1. Submit issuance request → status = `CREATED` 2. Maker-checker approval via state-transition → status = `APPROVED` 3. System processes issuance → status = `SUCCESS` (cards created) 4. Fetch by ID to get full response with card details ### Request Structure - `issuanceChannel`: Corporate, Branch, Forex, Wallet - `customer`: Customer details with `accounts[]` array - `accounts[].product`: Product config (productId, productType) - `accounts[].kits[]`: Kit details (PRIMARY/BACKUP, embossingType, deliveryType) - `transaction`: Fee and load amount summary ### Response Structure - `result.id`: MongoDB ObjectId for state-transition and fetch operations - `result.currentStatus`: CREATED → PENDING_APPROVAL → APPROVED → SUCCESS - `result.customer.accounts[].entityId`: Entity ID after provisioning - `result.customer.accounts[].kits[].cardNumber`: Masked card number - `result.customer.accounts[].kits[].encCardNumber`: Encrypted card data ### Server Use the **corporate** server URLs for this endpoint. 📖 **Integration Guide**: [Unified Issuance API - GPR & Gift](../public-dev-website/api-library/integration-guides/Unified_Issuance_API_GPR_Gift.md)