12. Close order
When the order is in partial_paid / over_paid, you can mark the order as paid via the close API.
Header Parameters
random 16 bytes alphanumerics
Please follow the OpenAPI authentication section
Please follow the OpenAPI authentication section
Request Body
order object required
- 200
Response Headers
Schema
- Array [
- ]
- Array [
- ]
data object required
order object required
Transaction source
Order type
Wonder unique id
your side unique id
due date
Order total
Order tips
sum of successful transaction amount
initial_total - paid_total
Order state
Order payment state
for payment link, when payment finished redirect to this url
if you fill it, wonder will callback your this url after state changed
line_items object[]
Possible values: [RearTips
, Charge
]
transactions object[]
Possible values: [Sales
, Authorization
, Refund
, Capture
]
Wonder transaction uuid
transaction currency
transaction amount
if transaction successful
for async payment,if transaction still pending
for card pure-auth,if transaction captured
if transaction allowed to void
if transaction allowed to refund
if void still pending
which payment method
transaction remark
payment_data object required
related to payment method
original transacation uuid
{
"error_code": "string",
"error_message": "string",
"data": {
"order": {
"source": "string",
"type": "string",
"number": "string",
"reference_number": "string",
"due_date": "string",
"initial_total": 0,
"initial_tips": 0,
"subtotal": 0,
"paid_total": "string",
"unpaid_total": "string",
"state": "string",
"correspondence_state": "string",
"currency": "string",
"return_url": "string",
"notify_url": "string",
"line_items": [
{
"uuid": "string",
"purchasable_type": "RearTips",
"purchase_id": 0,
"price": 0,
"quantity": 0,
"total": 0,
"label": "string"
}
],
"transactions": [
{
"type": "Sales",
"uuid": "string",
"currency": "string",
"amount": "string",
"success": true,
"is_pending": true,
"captured": true,
"allow_void": true,
"allow_refund": true,
"void_is_pending": true,
"payment_method": "string",
"note": "string",
"payment_data": {
"acquirer_name": "string",
"acquirer_type": "string",
"auth_code": "string",
"brn": "string",
"card_id": "string",
"card_number_len": 0,
"card_read_mode": "string",
"credit_card_type": "string",
"first_6_digits": "string",
"last_4_digits": "string",
"merchant_id": "string",
"new_gateway_txn_id": "string",
"payment_method": "string",
"receipt_id": "string",
"rrn": "string",
"transaction_state": "string"
},
"original_transaction_uuid": "string"
}
]
}
}
}