m2pfintech
API LibraryIssuance

Approve/Reject Forex Issuance

Approves or rejects a pending forex card issuance request. Works identically to the wallet issuance state transition endpoint.

POST
/v1/forex/issuance/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

curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/middleware/v1/forex/issuance/state-transition" \  -H "X-TENANT-ID: ACME_CORP" \  -H "Content-Type: application/json" \  -d '{    "id": "69020e047cf39e1b08090490",    "toStatus": "APPROVED",    "userId": "CHECKER_001",    "stateDescription": "Documents verified"  }'
{
  "result": {},
  "pagination": {
    "list": true,
    "pageSize": 0,
    "pageNo": 0,
    "totalPages": 0,
    "totalElements": 0
  }
}
{
  "type": "https://www.m2pfintech.com/problem/problem-with-message",
  "title": "Your issuance was declined as you have exceeded the monthly purchaser permissible number",
  "status": 409,
  "detail": "Your issuance was declined as you have exceeded the monthly purchaser permissible number",
  "message": "error.business",
  "businessCode": "PP_CORP_181"
}