Checkout object
Attributes
Attribute | Required | Type | Description |
---|---|---|---|
orderID | yes | string | unique identifier of an order |
currency | yes | string | currency (i.e. USD) |
totalCost | yes | string | The amount of the total checkout in cents |
taxCost | yes | string | The amount of the total tax in cents |
shippingCost | yes | string | The amount of shipping cost in cents |
items | yes | []item | All the items within the order checkout |
addresses | no | []address | All addresses associated with the order checkout |
discounts | no | []discount | All discounts associated with the order checkout |
Example
JSON
{
"orderId": "ORD-12345",
"currency": "USD",
"totalCost": 2999,
"taxCost": 200,
"shippingCost": 100,
"items": [
{
"sku": "ABC123",
"imageUrl": "https://example.com/product_image.jpg",
"name": "Awesome Product",
"quantity": 2,
"amount": 1999
}
],
"addresses": [
{
"firstName": "John",
"lastName": "Doe",
"street1": "123 Main Street",
"street2": "Apt. B",
"city": "Anytown",
"state": "CA",
"zip": "12345",
"email": "johndoe@example.com",
"phoneNumber": "15551234567",
"addressType": "shipping"
}
],
"discounts": [
{
"name": "Summer Sale Discount",
"code": "SUMMER2024",
"discountAmount": 1000
}
]
}