Invoice checkout
Flowchart

Source:
https://cahskuy.stoplight.io/docs/OND/3c78799259e69-payment-checkout
Reference:
Transaction Flowchart
Endpoint
| Endpoint | Method |
Authentication |
|
/payment-checkout
|
POST | Yes |
Authentication
| Type |
Token source |
Server |
Description |
| Bearer | {{usapi}}/auth | USAPI | Buyer's auth |
Body request example
{
"total_amount": 40000,
"service": "ONMARKET",
"source": "XENDIT",
"transaction": [
{
"amount": 10000,
"freight_charge": 5000,
"insurance_amount": 100,
"commission_onmarket": 1000,
"seller_username": "testing123",
"invoice_onmarket": "INV/ONM/20240124-002B0001"
},
{
"amount": 20000,
"freight_charge": 5000,
"insurance_amount": 100,
"commission_onmarket": 1000,
"seller_username": "testing12345",
"invoice_onmarket": "INV/ONM/20240124-002B0002"
}
]
}
| Properties |
Properties of | Data type | Required | Description |
| total_amount | integer | yes | Total nominal amount for the invoice. | |
| service | string | yes |
ONINDONESIA services.
|
|
| source | string | yes | A way that users pay for a product or service. Possible values: XENDIT, BALANCE, QRIS. | |
| transaction | array<object> | yes | List of transactions. | |
| amount | transaction | integer | yes | Amount of transaction for each store (do not include freight charge and insurance as they'll put in other parameter). |
| freight_charge | transaction | integer | yes | Amount of freight charge for each store. |
| insurance_amount | transaction | integer | no | Amount of insurance for each store. |
| seller_username | transaction | string | yes | Seller ONMARKET username |
| invoice_onmarket | transaction | string | yes | Invoice ID generated by ONMARKET |
| commission_onmarket | transaction | integer | yes | Commission amount charged to seller |
Response example
200 (OK)
Example response for ONMARKET
{
"payment_url": "https://checkout-staging.xendit.co/latest/65ba1b78f603539c068ef753",
"invoice": "ONM0001N11V0000x",
"xendit_invoice": "65ba1b78f603539c068ef753",
"expired_at": "2024-01-31T12:05:44.155Z",
"transaction": [
{
"invoice_onmarket": "INV/ONM/20240124-002B0001",
"status": "PENDING"
},
{
"invoice_onmarket": "INV/ONM/20240124-002B0002",
"status": "PENDING"
}
]
}
| Properties |
Properties of | Data type | Description |
| xendit_invoice | string | invoice ID generated by XENDIT and translated by USAPI | |
| payment_url | string |
Public URL for this invoice |
|
| expired_at | timestampz |
ISO date and time that the invoice expires. |
|
| transaction | array<object> |
List of transactions |
|
| invoice | transaction | string |
Invoice ID generated by USAPI |
| status | transaction | string |
Status showing whether the invoice has been paid Possible values:
|
Example for response ONMARKET with source QRIS
{
"invoice": "ONM00001N14U00001",
"xendit_invoice": "qr_7807d58a-3d60-4425-92f9-23d6717701f6",
"qr_string": "00020101021226570011ID.DANA.WWW011893600915060486424802096048642480303UKE51440014ID.CO.QRIS.WWW0215ID20243148326170303UKE52048999530336054031005802ID5925PT OnIndonesia Sistem Tek6015Kota Jakarta Ut61051424062720115NT2YP2fE3fetkbx60490011ID.DANA.WWW0425MER2021071400774509608641050116304DE92",
"amount": 100,
"expired_at": "2024-04-30T05:00:52.643Z"
}
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"
}
No Comments