m2pfintech
API LibraryIssuance V2 (recommended)

Fetch Unified Issuance by ID (v2)

Fetch complete issuance details by MongoDB ObjectId.

Use this to get the full issuance record including card details after approval.

Server

Use the corporate server URLs for this endpoint.

GET
/v2/issuances/{id}

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

Path Parameters

id*string

MongoDB ObjectId from create issuance response

Header Parameters

X-TENANT-ID*string

Your unique tenant identifier

Response Body

application/json

curl -X GET "https://sandbox-api.m2pprepaid.com/prepaid/middleware/v2/issuances/string" \  -H "X-TENANT-ID: ACME_CORP"
{
  "result": {},
  "pagination": {}
}

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)

Approve/Reject Unified Issuance (v2) POST

Maker-checker state transition endpoint for v2 unified issuances. Use this to approve or reject issuances that are in `CREATED` or `PENDING_APPROVAL` status. ### Flow 1. Fetch issuance by status to get the `id` 2. Submit state-transition with `id` and `action` (APPROVED/REJECTED) 3. On APPROVED → system processes issuance → status becomes SUCCESS 4. On REJECTED → issuance is rejected and no cards are created ### Server Use the **corporate** server URLs for this endpoint.