Shipping items on checkout
This document describes an alternative for physical stores where shoppers take their purchase immediately, or shops that don't ship items—like online courses, ebooks, or downloadable content.
Instead of sending a single cart at checkout, you can use two carts: one for unshipped items and one for shipped items.
To enable this, include the uses_shipped_cart option in merchant.options and set it to true. When using uses_shipped_cart, the API requires two carts named unshipped_cart and shipped_cart with the same payload structure as the usual cart (see Order API Payload and Examples). The cart key is not allowed.
Each cart has its own validations. The totals must match the sum of item 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 2 months ago