Invoice checkout (ONDELIVERY)
Flowchart
Source:
https://cahskuy.stoplight.io/docs/OND/3c78799259e69-payment-checkout
Reference:
Transaction Flowchart
Endpoint
| Endpoint | Method |
Authentication |
|
/sys/payment-checkout
|
POST | Yes |
Authentication
| Param |
Value |
| username |
userstate
|
|
password
|
v93Lr0pdPJ7teA413O64qK0Y4eX59cQNbRsTDVnJGpykIIa2QidEv5ZwgluhUG4T
|
Body request example
{
"total_amount": 40000,
"service": "ONDELIVERY",
"source": "XENDIT",
"client": "usernew1",
"xendit_methods": ["QRIS"]
}
| No. | Properties |
Properties of | Data type | Required | Description |
| 1 | total_amount | integer | yes | Total nominal amount for the invoice. | |
| 2 | service | string | yes |
ONINDONESIA services.
|
|
| 3 | source | string | yes | A way that users pay for a product or service. Possible values: XENDIT or BALANCE. | |
| 4 | client | string | yes | Username sender of ONDELIVERY. | |
| 5 | xendit_methods | array<string> | yes |
The specific payment channel used to pay the invoice. Possible values for bank transfer: BCA, BNI, BSI, BRI, MANDIRI, PERMATA. Possible values for ewallet:
QRIS is only payment method for now. |
Response example
200 (OK)
Example response for ONMARKET
{
"xendit_invoice": "qr_dbc7200c-ed8a-4088-9430-dae9f529f6bb",
"invoice": "OD0001N12C00006",
"expired_at": "2024-02-14T10:02:10.065027Z",
"qr_string": "0002010102##########CO.XENDIT.WWW011893600#######14220002152#####414220010303TTT####015CO.XENDIT.WWW02180000000000000000000TTT52045######ID5911XenditQRIS6007Jakarta6105121606##########3k1mOnF73h11111111#3k1mOnF73h6v53033605401163040BDB"
}
| Properties |
Properties of | Data type | Description |
| xendit_invoice | string | invoice ID generated by XENDIT and translated by USAPI | |
| expired_at | timestampz |
ISO date and time that the invoice expires. |
|
| invoice | string |
Invoice ID generated by USAPI |
|
| qr_string | string |
QR String created by XENDIT |
Error response
400 Bad Request
Some parameters may contain invalid values or some parameters are not present.
{
"message": "Invalid JSON Format"
}
Balance is not enough for doing transaction
{
"message": "Insufficient balance"
}
401 Unauthorized
Authentication header is not valid or missing
{
"message": "Auth Error"
}
500 Internal server error
Internal server error
{
"message": "Internal server error"
}