m2pfintech
API LibraryIssuance V2 (recommended)

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

🌟 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

POST
/v2/issuances

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

multipart/form-data

body*

JSON string containing the issuance request

documents?array<file>

Optional document uploads (passport, visa, etc.)

Response Body

application/json

application/json

application/json

curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/middleware/v2/issuances" \  -H "X-TENANT-ID: ACME_CORP" \  -F body="{\n  \"applicationNumber\": \"897886\",\n  \"issuanceChannel\": \"Corporate\",\n  \"issuanceType\": \"Single\",\n  \"noOfCardsRequested\": 2,\n  \"customer\": {\n    \"firstName\": \"Sachin\",\n    \"lastName\": \"T\",\n    \"email\": \"sachint@example.com\",\n    \"mobile\": {\n      \"value\": \"9876543210\",\n      \"countryCode\": 91\n    },\n    \"customerType\": \"NTB\",\n    \"kycLevel\": \"Full KYC\",\n    \"accounts\": [\n      {\n        \"product\": {\n          \"productId\": \"productid123\",\n          \"productType\": \"GPR\"\n        },\n        \"kits\": [\n          {\n            \"kitType\": \"PRIMARY\",\n            \"embossingType\": \"Perso\",\n            \"cardType\": \"Physical\",\n            \"nameOnCard\": \"Sachin T\"\n          },\n          {\n            \"kitType\": \"BACKUP\",\n            \"embossingType\": \"Perso\",\n            \"cardType\": \"Physical\",\n            \"nameOnCard\": \"Sachin T\"\n          }\n        ]\n      }\n    ]\n  },\n  \"transaction\": {\n    \"summary\": {\n      \"netValue\": 1.00,\n      \"totalFees\": 20.0,\n      \"totalTax\": 3.60,\n      \"totalAmount\": 24.60\n    }\n  },\n  \"issuer\": {\n    \"hierarchyId\": \"qappregaprl7mddznsiw\"\n  }\n}\n"
{
  "result": {
    "id": "6a0431f65de0228d6be3575c",
    "applicationNumber": "532470",
    "currentStatus": "CREATED",
    "issuanceChannel": "Corporate",
    "issuanceType": "Single",
    "noOfCards": 0,
    "noOfCardsRequested": 1
  },
  "pagination": null
}
{
  "status": "FAILED",
  "errorCode": "VALIDATION_ERROR",
  "message": "applicationNumber is required"
}
{
  "status": "FAILED",
  "errorCode": "DUPLICATE_APPLICATION",
  "message": "An issuance with applicationNumber 532470 already exists"
}