Shipping items on checkout
This document describes an alternative for physical stores where the shopper can carry the purchase at the moment, or shops that do not ship items explicitly, for instance, online courses, ebooks or downloadable content.
Instead of sending a single cart with all the items in checkout phase, the shop can include a flag to let seQura know that it will use two carts, one for unshipped and another one for shipped items.
In order to enable the flag the shop must include an option in the order payload, this option is located in merchant.options
section with the name uses_shipped_cart
and a boolean value, it must be True
to use this feature. When using uses_shipped_cart
the API requires two carts with names unshipped_cart
and shipped_cart
with the same payload as the usual cart
(check Order API Payload and Examplesfor a detailed description) and forbids the cart
key.
Each cart has its own validations and the total values must match with its items values.
{
"order": {
"state": "",
"merchant": {
...,
"options": {
"uses_shipped_cart": true
}
},
"unshipped_cart": {
"currency": "EUR",
"gift": false,
"order_total_with_tax": 3030,
"cart_ref": "123",
"created_at": "2013-10-18T12:25:20+01:00",
"updated_at": "2013-10-18T12:25:20+01:00",
"items": [
{
"reference": "12-123-1234",
"name": "Leather Case (iPod nano) - Negro / Chocolate",
"price_with_tax": 3030,
"quantity": 1,
"total_with_tax": 3030,
"downloadable": false,
"perishable": false,
"personalized": false,
"restockable": true,
"category": "ipod-accesorios",
"description": "Este estuche de cuero de última moda ...",
"manufacturer": "Apple",
"supplier": "Mayorista Makro",
"product_id": "6",
"url": "http://shop.example.com/ipod-accesorios/leather-case"
},
]
},
"shipped_cart": {
"currency": "EUR",
"gift": false,
"order_total_with_tax": 5050,
"cart_ref": "123",
"created_at": "2013-10-18T12:25:20+01:00",
"updated_at": "2013-10-18T12:25:20+01:00",
"items": [
{
"reference": "43-432-4321",
"name": "Mejores canciones de los 90",
"price_with_tax": 5050,
"quantity": 1,
"total_with_tax": 5050,
"downloadable": true,
"perishable": false,
"personalized": false,
"restockable": true,
"category": "música",
"description": "Recopilación de mejores canciones de los 90 ...",
"manufacturer": "Sony",
"supplier": "Mayorista Makro",
"product_id": "6",
"url": "http://shop.example.com/recopilaciones/90"
},
]
},
"merchant_reference" : { ... },
"delivery_method" : { ... },
"delivery_address" : { ... },
"invoice_address" : { ... },
"customer" : { ... },
"gui" : { ... },
"platform" : { ... },
}
}
Updated 5 days ago