Order
Object model reference for Order object
Order
Contract representing the exchange of goods or services
Attributes
Name
Required
Type
Description
number
Yes
String
unique order identifier
buyer
Yes
Object
buyer name, phone, email and IP address
visible
-
Boolean
order visibility status
viewed
-
Boolean
flag to mark order as viewed by user
cancelled
-
Boolean
flag to mark order as cancelled
confirmed
-
Boolean
flag to mark order as confirmed
payment_method
Yes
String
payment method chosen by shopper
Example
{
"number": "R1551607648",
"buyer": {
"ip": "127.0.0.1",
"name": "John Doe",
"email": "",
"phone": "+447591234567"
},
"total": {
"amount": "25.00",
"currency": "JOD"
},
"created": <DateTime>,
"billing_address": <Address>,
"shipping_address": <Address>,
"payments": [<Payment>],
"shipments": [<Shipment>],
"purchases": [<Purchase>],
"adjustments": [<Adjustment>],
"visible": true,
"viewed": true,
"cancelled": false,
"confirmed": false,
"authorized": false,
"source": "en",
"payment_method": "cash_on_delivery"
}Notes
1. Difference between Order.payment_method and Payment.method
The field payment_method in the Order object contains the payment method chosen at checkout.
Even though this is likely to be the same as the method field in the order's Paymentobject(s), there are some edges cases in which those two fields are different. For example, a shopper may indicate that they wish to pay with a credit card, but then fail to make a credit card payment and pay with cash on delivery instead. In this case, the Order's payment_method field will be the intended payment method (here credit_card) while the method field of the order's child Payment object is the actual method used to make payment (here cash_ond_delivery).
In general, payment_method should be interpreted as the payment method preferred or attempted by the shopper, while the method field of Payment objects represent the actual method used to make payment.
2. The payment_method parameter can take one of the following values:
cashcredit_cardbank_transferother
Last updated
Was this helpful?