⏺️p2p order (to pay)

Methods described on this page:

  • POST /create_p2p_order

  • GET /order_status

After receiving and confirming the recipient's phone number, the initiating bank generates a request to the DCM platform in JWT format to create a P2P order using the POST /create_p2p_order method.

POST/create p2p order

Endpoint: POST/api/v1/p2p/orders

Payload:

{ 
"jti": "1234567890", 
"creditor": { 
"phone": "+380991234567" 
}, 
"debtor": { 
"account": "UA41003506518366713636167" 
}, 
"expires_at": "2025-12-31T23:59:59Z", // optional  
"amount": 1500.75, // optional  
"currency": "UAH", 
"external_id": "112663",
"purpose": "Replenishment of own account",
"type": "phone" [enam: phone/ link]
}

Response 2хх OK

{ 
"creditor": { 
"phone": "+380991234567"
}, 
"debtor": { 
"account": "UA41003506518366713636167" 
}, 
"expires_at": "2025-12-31T23:59:59Z", // optional  
"amount": 1500.75, // optional 
"currency": "UAH", 
"external_id": "112663",
"purpose": "Payment for services",
"type": "phone", [enam: phone/ link]

"guid": "d1f54a9f-50d3-4a16-b5a8-e79a45160a8b", 
"pay_request_guid": "b5a8-e79a45160a8b-d1f54a9f-50d3-4a16-", 
"created_at": "2025-01-12T21:59:52.459161964Z", 
"status": "processing" // "pending" // "rejected"// "created"
}

p2p orders status list:

  • Processing - the receiver is found in the database

  • Pending - search of the receiver is pending

  • Rejected - receiver didn't link his phone number as an alias

  • Created - order created (only for p2p by request use case)

Response 4хх ERROR

Upon receiving a request to create an order, the DCM platform verifies it and, in case of any issues, provides details of the errors in the response.

{ 
"code": "SOME_CODE", 
"message": "some code description" 
}

Errors list

Code 400:

  • "INVALID_DEBTOR_ACCOUNT"

  • "INVALID_СREDITOR_PHONE"

  • "INVALID_TYPE"

  • "INVALID_CURRENCY"

  • "UNSUPPORTED_CURRENCY"

  • "INVALID_EXTERNAL_ID"

  • "EXTERNAL_ID_NOT_UNIQUE"

  • "EXPIRES_AT_IS_NOT-FUTURE_DATE"

  • "INVALID_PURPOSE"

  • "INVALID_REQUEST "

Code 401:

  • "AUTHORIZATION_FAILED"

Code 500:

  • "INTERNAL_ERROR"

The DCM platform allows retrieving information about the status of a P2P order using the GET /order_status request.

GET/order_status

Endpoint: GET /api/v1/p2p/orders/:order_guid

Response 2хх OK (same as POST/create_order)

{ 
"creditor": { 
"phone": "+380991234567" 
}, 
"debtor": { 
"account": "UA41003506518366713636167" 
}, 
"expires_at": "2025-12-31T23:59:59Z", // optional  
"amount": 1500.75, // optional  
"currency": "UAH",
"external_id": "112663",
"purpose": "Payment for services",
"type": "phone", [enam: phone/ link]

"guid": "d1f54a9f-50d3-4a16-b5a8-e79a45160a8b", 
"pay_request_guid": "b5a8-e79a45160a8b-d1f54a9f-50d3-4a16-", 
"status": "processing" // "pending" // "rejected"// "created" 
}

Error list:

Code 400:

  • "INVALID_ORDER_GUID"

Code 401:

  • "AUTHORIZATION_FAILED"

Code 404:

  • "ORDER NOT FOUND"

Code 500:

  • "INTERNAL_ERROR"

Last updated