Create and manage order
What you'll learn
- How to create the order/orders(batch) on OwlPay
- How to cancel orders on OwlPay
Make sure the vendor verification status is approved
.
Create an order
Use (POST) Create an order to create an order.
API Parameter Reference
About Country code, Phone code and Currency code, refer to API Parameter Mapping Table for more details.
(POST) Create an order
curl --request POST \
--url https://api.owlpay.com/api/v1/platform/tunnel/orders \
--header 'accept: application/json' \
--header 'authorization: Bear {your api key}' \
--header 'content-type: application/json' \
--data '
{
"application_order_uuid": "test_order_1",
"currency": "TWD",
"total": 1000,
"application_vendor_uuid": "ven_TEST12345678"
}
'
Response
{
"data": {
"order_token": "ord_37dfc8c7655f65222911c6bfeacc96ac5802e5d84fc1a4cf122013dc6aaf74d3",
"object": "order",
"uuid": "ord_37dfc8c7655f65222911c6bfeacc96ac5802e5d84fc1a4cf122013dc6aaf74d3",
"status": "owlpay.received_order",
"status_group": "can_submit",
"is_checked": false,
"is_allow_transfer": false,
"is_allow_close": true,
"is_allow_confirmed": false,
"is_allow_correction": false,
"deny_transfer_reasons": [],
"order_serial": "test_order_1",
"application_order_serial": "test_order_1",
"application_order_created_at": "2022-11-29T07:08:05+00:00",
"allow_transfer_time_at": "2022-11-29T07:08:05+00:00",
"last_reject_transfer_reason": null,
"is_rejected": false,
"currency": "TWD",
"total": 1000,
"original_total": 1000,
"display_currency": "TWD",
"created_at": "2022-11-29T07:08:05+00:00",
"updated_at": "2022-11-29T07:08:05+00:00",
"vendor_uuid": "ven_4a1vlHE3rqPpSZQP5fQFIRc",
"vendor_name": "owlpay vendor through api",
"application_vendor_uuid": "ven_TEST12345678",
"is_vendor_kyc_passed": true,
"description": "This is a test order from API",
"meta_data": {},
"status_logs": [
{
"name": "Available for reconciliation",
"is_current": true,
"updated_time_at": "2022-11-29T07:08:05+00:00"
},
{
"name": "Awaiting review",
"is_current": false,
"updated_time_at": null
},
{
"name": "Review approved",
"is_current": false,
"updated_time_at": null
},
{
"name": "Awaiting payout",
"is_current": false,
"updated_time_at": null
},
{
"name": "Payout successful",
"is_current": false,
"updated_time_at": null
}
],
"order_extras": {
"inclusive": {
"total": 0,
"items": []
},
"exclusive": {
"total": 0,
"items": []
}
},
"closed_transfer_reason": null,
"procedures": {},
"draft_audits": {},
"order_transfer_uuid": null,
"accounting_uuid": null,
"vendor_status": "approved",
"is_has_need_correction": false,
"import_uuid": null,
"is_from_import": false,
"payout_gateways": [
{
"key": "MyB2B_batch_payout",
"name": "Cathay United Bank - Global MyB2B"
}
],
"creator_name": "OwlPay New Company",
"creator_type": "application"
},
"status": 200
}
Create orders (batch)
If you want to create multiple orders at once, use (POST) Create orders(batch).
(POST) Create orders(batch)
curl --request POST \
--url https://api.owlpay.com/api/v1/platform/tunnel/orders/batch \
--header 'accept: application/json' \
--header 'authorization: Bear {your api key}' \
--header 'content-type: application/json' \
--data '
{
"orders": [
{
"application_vendor_uuid": "ven_TEST12345678",
"currency": "TWD",
"total": 10000,
"description": "This order is created by API",
"application_order_uuid": "test_order_001"
},
{
"application_vendor_uuid": "ven_TEST12345678",
"currency": "TWD",
"total": 20000,
"description": "This order is created by API too",
"application_order_uuid": "test_order_002"
}
]
}
'
Response
{
"data": [
{
"order_token": "ord_0fd29cdf570ec901f9c073ab231637d8177670f1cc728c9795c97c20abdec3fa",
"object": "order",
"uuid": "ord_0fd29cdf570ec901f9c073ab231637d8177670f1cc728c9795c97c20abdec3fa",
"status": "owlpay.received_order",
"is_allow_transfer": false,
"order_serial": "test_order_002",
"application_order_serial": "test_order,002",
"application_order_created_at": "2022-11-29T07:16:24+00:00",
"allow_transfer_time_at": "2022-11-29T07:16:24+00:00",
"currency": "TWD",
"total": 20000,
"original_total": 20000,
"display_currency": "TWD",
"created_at": "2022-11-29T07:16:24+00:00",
"updated_at": "2022-11-29T07:16:24+00:00",
"vendor_uuid": "ven_4a1vlHE3rqPpSZQP5fQFIRc",
"vendor_name": "owlpay vendor through api",
"application_vendor_uuid": "ven_TEST12345678",
"is_vendor_kyc_passed": true,
"description": "This order is created by API too",
"meta_data": {},
"vendor_status": "approved"
},
{
"order_token": "ord_f5f3d7f01fa8950bf40e63e62bef708fd026b8f219fc2e1351bef58c438d03c6",
"object": "order",
"uuid": "ord_f5f3d7f01fa8950bf40e63e62bef708fd026b8f219fc2e1351bef58c438d03c6",
"status": "owlpay.received_order",
"is_allow_transfer": false,
"order_serial": "test_order_001",
"application_order_serial": "test_order,001",
"application_order_created_at": "2022-11-29T07:16:24+00:00",
"allow_transfer_time_at": "2022-11-29T07:16:24+00:00",
"currency": "TWD",
"total": 10000,
"original_total": 10000,
"display_currency": "TWD",
"created_at": "2022-11-29T07:16:24+00:00",
"updated_at": "2022-11-29T07:16:24+00:00",
"vendor_uuid": "ven_4a1vlHE3rqPpSZQP5fQFIRc",
"vendor_name": "owlpay vendor through api",
"application_vendor_uuid": "ven_TEST12345678",
"is_vendor_kyc_passed": true,
"description": "This order is created by API",
"meta_data": {},
"vendor_status": "approved"
}
],
"status": 200
}
Cancel orders (batch)
If you want to cancel the order(s), use Cancel orders (batch).
Request
curl --request PUT \
--url https://api.owlpay.com/api/v1/platform/tunnel/orders/cancel \
--header 'accept: application/json' \
--header 'authorization: Bear {your api key}' \
--header 'content-type: application/json' \
--data '
{
"application_order_serials": [
"test_order_001",
"test_order_002"
]
}
'
Response
{
"data": [
{
"order_token": "ord_0fd29cdf570ec901f9c073ab231637d8177670f1cc728c9795c97c20abdec3fa",
"object": "order",
"uuid": "ord_0fd29cdf570ec901f9c073ab231637d8177670f1cc728c9795c97c20abdec3fa",
"status": "platform.order_cancelled",
"status_group": "closed",
"is_checked": false,
"is_allow_transfer": false,
"is_allow_close": false,
"is_allow_confirmed": false,
"is_allow_correction": false,
"deny_transfer_reasons": [],
"order_serial": "test_order_002",
"application_order_serial": "test_order_002",
"application_order_created_at": "2022-11-29T07:16:24+00:00",
"allow_transfer_time_at": "2022-11-29T07:16:24+00:00",
"last_reject_transfer_reason": null,
"is_rejected": false,
"currency": "TWD",
"total": 20000,
"original_total": 20000,
"display_currency": "TWD",
"created_at": "2022-11-29T07:16:24+00:00",
"updated_at": "2022-11-29T07:21:15+00:00",
"vendor_uuid": "ven_4a1vlHE3rqPpSZQP5fQFIRc",
"vendor_name": "owlpay vendor through api",
"application_vendor_uuid": "ven_TEST12345678",
"is_vendor_kyc_passed": true,
"description": "This order is created by API too",
"meta_data": {},
"status_logs": [
{
"name": "Order closed",
"is_current": true,
"updated_time_at": "2022-11-29T07:21:15+00:00"
}
],
"order_extras": {
"inclusive": {
"total": 0,
"items": []
},
"exclusive": {
"total": 0,
"items": []
}
},
"closed_transfer_reason": null,
"order_transfer_uuid": null,
"accounting_uuid": null,
"vendor_status": "approved",
"is_has_need_correction": false,
"import_uuid": null,
"is_from_import": false,
"payout_gateways": [
{
"key": "MyB2B_batch_payout",
"name": "Cathay United Bank - Global MyB2B"
}
],
"creator_name": null,
"creator_type": null
},
{
"order_token": "ord_f5f3d7f01fa8950bf40e63e62bef708fd026b8f219fc2e1351bef58c438d03c6",
"object": "order",
"uuid": "ord_f5f3d7f01fa8950bf40e63e62bef708fd026b8f219fc2e1351bef58c438d03c6",
"status": "platform.order_cancelled",
"status_group": "closed",
"is_checked": false,
"is_allow_transfer": false,
"is_allow_close": false,
"is_allow_confirmed": false,
"is_allow_correction": false,
"deny_transfer_reasons": [],
"order_serial": "test_order,001",
"application_order_serial": "test_order_001",
"application_order_created_at": "2022-11-29T07:16:24+00:00",
"allow_transfer_time_at": "2022-11-29T07:16:24+00:00",
"last_reject_transfer_reason": null,
"is_rejected": false,
"currency": "TWD",
"total": 10000,
"original_total": 10000,
"display_currency": "TWD",
"created_at": "2022-11-29T07:16:24+00:00",
"updated_at": "2022-11-29T07:21:15+00:00",
"vendor_uuid": "ven_4a1vlHE3rqPpSZQP5fQFIRc",
"vendor_name": "owlpay vendor through api",
"application_vendor_uuid": "ven_TEST12345678",
"is_vendor_kyc_passed": true,
"description": "This order is created by API",
"meta_data": {},
"status_logs": [
{
"name": "Order closed",
"is_current": true,
"updated_time_at": "2022-11-29T07:21:15+00:00"
}
],
"order_extras": {
"inclusive": {
"total": 0,
"items": []
},
"exclusive": {
"total": 0,
"items": []
}
},
"closed_transfer_reason": null,
"order_transfer_uuid": null,
"accounting_uuid": null,
"vendor_status": "approved",
"is_has_need_correction": false,
"import_uuid": null,
"is_from_import": false,
"payout_gateways": [
{
"key": "MyB2B_batch_payout",
"name": "Cathay United Bank - Global MyB2B"
}
],
"creator_name": null,
"creator_type": null
}
],
"status": 200
}
Next steps
- Learn more about Orders API details, including updating and retrieving order data.
- Apply for order reconciliation
Updated over 1 year ago