ShopGo
1.0.0
1.0.0
  • Welcome
  • Developer Guides
    • Order Processing
    • Webhooks
      • Calculate Shipping Rates
  • Management API
    • Introduction
    • Authentication
      • Using User API Key
      • Using Platform API Key
    • Authorization
    • Objects
      • Primitives
      • Order
      • Payment
      • Shipment
      • Purchase
      • Adjustment
      • Charge
      • Attribute
    • API Endpoints
  • Platform API
    • Introduction
    • Authentication
    • Objects
    • API Endpoints
      • Tenant
Powered by GitBook
On this page

Was this helpful?

  1. Management API
  2. Objects

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

total

-

total amount of money due for payment

created

-

order creation timestamp

billing_address

Yes

address to send order invoice to

shipping_address

Yes

address to ship order purchases to

payments

-

payments made to settle order

shipments

-

shipments created to fulfill order

purchases

-

order line items

adjustments

-

order price adjustments

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:

  • cash

  • credit_card

  • bank_transfer

  • other

PreviousPrimitivesNextPayment

Last updated 4 years ago

Was this helpful?

[]

[]

[]

[]

Money
DateTime
Address
Address
Payment
Shipment
Purchase
Adjustment