Carts

A Cart contains the product and custom cart items that a user may wish to purchase. Once a Cart is ready for Checkout, you can use the Checkout endpoint to convert the cart to an order.

Adding, modifying or removing any cart items, custom items or promotions will always return the cart meta, caculated using the calculation method. This is useful to update the client with up-to-date totals.

We'll automatically delete carts 7 days after they were last updated.

If you do not pass a X-MOLTIN-CURRENCY header specifying what currency you would like the cart to use, the products in the cart will be converted to your default currency.

The Cart Object

Attribute

Type

Description

id

string

The unique identifer for the cart. Use SDK or create it yourself.

type

string

This represents the type of object being returned

links

The links object

meta

The meta object

Attribute

Type

Description

self

string

The URL of this cart

The Cart meta object

The meta object includes the calculated card totals.

Attribute

Type

Description

meta.display_price

object

A collection of fields related to the total and currency of this cart

meta.display_price.with_tax

object

Tax inclusive totals

meta.display_price.with_tax.amount

integer

The raw total of this cart (incl. tax)

meta.display_price.with_tax.currency

string

The currency set for this cart

meta.display_price.with_tax.formatted

string

The tax inclusive formatted total based on the currency

meta.display_price.without_tax

object

Tax exclusive totals

meta.display_price.without_tax.amount

integer

The raw total of this cart (excl. tax)

meta.display_price.without_tax.currency

string

The currency set for this cart

meta.display_price.without_tax.formatted

string

The tax exclusive formatted total based on the currency

meta.display_price.tax

object

Tax totals

meta.display_price.tax.amount

integer

The subtotal of the added tax value

meta.display_price.tax.currency

string

The currency set for the tax

meta.display_price.tax.formatted

string

The formatted value for the tax subtotal

meta.timestamps

object

Timestamps for this cart

meta.timestamps.created_at

string

The date this cart was created

meta.timestamps.updated_at

string

The date this cart was last updated

Last updated