Approve/Reject Prepaid Issuance
Approves or rejects a pending corporate card issuance as part of the maker-checker compliance workflow. Required for both Single and Bulk issuances before cards are provisioned.
Transitions
| From Status | To Status | Description |
|---|---|---|
CREATED | APPROVED | Checker approves |
CREATED | REJECTED | Checker rejects |
PENDING_APPROVAL | APPROVED | Checker approves |
PENDING_APPROVAL | REJECTED | Checker rejects |
Bulk Issuance Note
For bulk issuances, approving via this endpoint approvesall beneficiaries that
have not been explicitly rejected via reject-beneficiaries. Use
reject-beneficiaries before calling this endpoint to exclude specific
individuals from the batch.
Server
Use the corporate server URLs for this endpoint.
Authorization
bearerAuth tenantId JWT Bearer token from the Authentication API
In: header
Your unique tenant identifier assigned during onboarding
In: header
Header Parameters
Your unique tenant identifier
Request Body
application/json
Required. Unique ID of the record to transition
1 <= lengthRequired. Target status
"APPROVED" | "REJECTED"Required. User performing the action
1 <= lengthState code
Description of the action
Reasons for the decision
Response Body
application/json
application/json
application/json
curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/middleware/v1/corporate-issuances/state-transition" \ -H "X-TENANT-ID: ACME_CORP" \ -H "Content-Type: application/json" \ -d '{ "id": "65a1b2c3d4e5f6789abcdef0", "toStatus": "APPROVED", "userId": "CHECKER_001", "stateDescription": "All beneficiary KYC documents verified" }'{
"result": {
"currentStatus": "APPROVED",
"applicationNumber": "gpr020",
"issuanceType": "Single"
},
"pagination": null
}{
"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"
}Upload Beneficiaries Bulk Issuance POST
Uploads one or more files (CSV / Excel) containing beneficiary data for a previously created bulk issuance. This is the recommended approach for **large batches (100+ records)** instead of embedding all beneficiaries in the JSON body of the create call. ### Typical Flow for Large Batches ``` 1. POST /v1/corporate-issuances/ → issuanceType: Bulk, beneficiaries: [] Response: applicationNumber + CREATED status 2. POST /file/upload/beneficiary/bulk-upload/{applicationNumber} → Upload CSV file with beneficiary rows Response: list of uploaded file references 3. POST /state-transition → APPROVED 4. GET /fetch-by-status/SUCCESS → poll for completion ``` ### CSV Format The file should have one beneficiary per row with columns matching the `CorporateBeneficiary` schema fields (mobile, firstName, lastName, email, etc.). Contact M2P support for the exact template. ### Server Use the **corporate** server URLs for this endpoint.
Issue Prepaid Single/Bulk Card POST
Creates a corporate card issuance for one or more beneficiaries under a single `applicationNumber`. The **same endpoint** handles both `Single` and `Bulk` issuances — the difference is the `issuanceType` field and the number of objects in the `beneficiaries` array. ### Single vs Bulk | | `Single` | `Bulk` | |---|---|---| | `issuanceType` | `"Single"` | `"Bulk"` | | `beneficiaries` array | 1 item | 2 – N items | | Immediate response | Full card details | `CREATED` status only | | Per-beneficiary reject | Not applicable | `reject-beneficiaries` endpoint | | Bulk CSV upload | Not applicable | `file/upload/beneficiary/bulk-upload/{appNo}` | ### Bulk Issuance Flow ``` POST /v1/corporate-issuances/ (issuanceType: Bulk, N beneficiaries) ↓ status = CREATED POST /v1/corporate-issuances/state-transition (MAKER → PENDING_APPROVAL / checker → APPROVED) ↓ status = APPROVED → cards provisioned async GET /v1/corporate-issuances/fetch-by-status/SUCCESS (poll for completion) ``` For very large batches (hundreds of records), use the **CSV bulk upload** endpoint `POST /v1/corporate-issuances/file/upload/beneficiary/bulk-upload/{applicationNumber}` instead of embedding all beneficiaries in JSON. ### Key Features - Single or bulk beneficiary issuance - Physical (Perso/Non-Perso) or Virtual cards - Maker-checker workflow support - Auto-generated customer IDs and entity IDs - KYC document upload (proofOfIdentity, proofOfAddress) - Initial card load with fee breakdown ### NTB vs ETB - `ntbApplication: true` → New customer, full profile creation - `ntbApplication: false` → Existing customer with prior accounts ### Documents Upload identity and address proofs as multipart files via query parameters. ### Server Use the **corporate** server URLs for this endpoint.
