Get Order
Retrieving a specific order by KidaPay order ID
It's done by KidaPay payment page. ONLY use this if you want to build an in-house payment without redirecting.
Definitionโ
๐งช Test Mode vs. Live Mode URLsโ
Test / Sandbox Environment: For developers to test order creation, payments, and webhooks without using real money.
Live / Production Environment: For processing real orders and payments once your system is production-ready.
- Test
- Live
https://api-sandbox.kidapay.com/v1/orders
https://api.kidapay.com/v1/orders
Body Paramsโ
Param | Type | Required | Description |
---|---|---|---|
order_id | string | Yes | KidaPay order ID. It's provided in the response of Create Order. |
Exampleโ
curl -X GET \
https://api.kidapay.com/v1/orders/8cbe9c00-7b0d-4b03-816f-e88a3c6bfa5c \
-H 'x-api-key: API_KEY_GET_FROM_MERCHANT_PORTAL'
Result Formatโ
200 OKโ
{
"status": 200,
"order": {
"order_id": "8cbe9c00-7b0d-4b03-816f-e88a3c6bfa5c",
"user_id": 14309,
"merchant_order_id": "ORDER_16800000000_1_1556124035619",
"title": "Order 5619",
"description": "Membership 2019.03: $9.9,
"callback_url": "https://ecards.com/api/success",
"cancel_url": "https://ecards.com/ecardstatus?status=cancel",
"success_url": "https://ecards.com/ecardstatus?status=success",
"price_amount": 9.9,
"price_currency": "USD",
"receive_currency": "",
"status": "PAID",
"created_at": "2019-04-24T16:40:36.264Z",
"updated_at": "2019-04-24T16:41:01.000Z",
"deleted": 0
},
"invoice": {
"invoice_id": "7707ce37-aad6-4a9d-94b4-821db7c7a958",
"order_id": "8cbe9c00-7b0d-4b03-816f-e88a3c6bfa5c",
"amount": 3.0712,
"currency": "EOS",
"status": "PAID",
"created_at": "2019-04-24T16:40:36.350Z",
"created_at_t": 1556124036350,
"expired_at": "2019-04-24T16:45:41.000Z",
"expired_at_t": 1556124341000,
"merchant_order_id": "ORDER_16800000000_1_1556124035619",
"receive_amount": 9.9,
"receive_currency": "USD"
}
}
Error Formatโ
KidaPay Server will always return status 400. If API failed, it will return error_code and error as its object.
{
"eror": "Order not found",
"error_code": "ORDER_NOT_VALID",
"status": "400"
}