The Cart Object
The cart object allows you to create preconfigured carts to send to customers using an offsite checkout or for retargeting customers after a cart abandonment.
{
"id": "86279175-3d85-4be7-a368-5615d932ef3c",
"cartName": "Labor Day Sale 2016",
"expiration": "2100-01-01",
"url": "https://checkout.getbread.com/qyi9Qd",
"isCustomTotal": false,
"options": {
"apiKey": "aaaaaaa-0000-bbbb-1111-cccccccccccc",
"orderRef": "",
"callbackUrl": "",
"completeUrl": "http://complete.example.com",
"errorUrl": "http://error.example.com",
"shippingOptions": [
{
"cost": 1000,
"type": "Standard",
"typeId": "std"
},
{
"cost": 2000,
"type": "Fast",
"typeId": "fast"
}
],
"requireShippingContact": true,
"items": [
{
"imageUrl": "http://image.example.com",
"detailUrl": "http://detail.example.com",
"name": "Ring",
"price": 30000,
"quantity": 1,
"sku": "i-ring-1"
},
{
"imageUrl": "http://ring.example.com",
"detailUrl": "http://ring-detail.example.com",
"name": "Ring 2",
"price": 45000,
"quantity": 1,
"sku": "i-ring-2"
}
],
"discounts": [
{
"amount": 1000,
"description": "LABOR_DAY"
}
],
"shippingContact": {
"firstName": "Carlos",
"lastName": "Ladron",
"email": "[email protected]",
"address": "540 W 112th St",
"address2": "Apt 12",
"city": "New York",
"state": "NY",
"zip": "10025",
"phone": "5553213443"
},
"billingContact": {
"firstName": "David",
"lastName": "Ladron",
"email": "[email protected]",
"address": "370 W 30th St.",
"address2": "Apt 11",
"city": "New York",
"state": "NY",
"zip": "10001",
"phone": "5551233443"
}
},
"asLowAs": {
"monthly": 3414,
"amount": "$34.14",
"termLength": 24,
"termInterval": "Month",
"apr": 0.0999,
"minApr": 0.08,
"maxApr": 0.2999,
"asLowAsText": "This example payment is the amount of equal monthly payments on a loan to finance the purchase based on the listed product price of $740.00 assuming a 24-month term and a 9.99% APR. Your terms may vary and are subject to application. Rates range from 8.00% to 29.99% APR. Bread loans are made by Cross River Bank, member FDIC."
}
}
Attribute | Type | Parent Attribute | Description |
---|---|---|---|
id | string | - | This is an identifier which can be used to relate checkouts with this cart to an entity on your backend. |
cartName | string | - | Name for identifying the cart with a promotion. |
expiration | string | - | Expiration date for cart link. |
url | string | - | Cart link URL to send to customer. |
isCustomTotal | boolean | - | Set to true for a flat cost Cart link, false for Cart link with line items. |
options | object | - | |
orderRef | string | options | Unique identifer to match with the Bread transaction ID |
callbackUrl | string | options | Where we’ll POST the transactionId of the checkout and the orderRef following a successful checkout |
completeUrl | string | options | Where the customer is redirected following a successful checkout, e.g. a confirmation page |
errorUrl | string | options | Where the customer is redirected following an unsuccessful checkout, including if no financing offer is available or if there are technical issues |
shippingOptions | object | options | Array of shipping option(s) the customer can select from when checking out with the cart, this includes type, typeId, and cost (int representing cost in cents) |
shippingContact | object | options | The customer’s shipping details. Includes firstName, lastName, email, address, address2, city, state, zip and phone |
billingContact | object | options | The customer’s billing details. Includes firstName, lastName, email, address, address2, city, state, zip and phone |
items | array | options | List of items in cart. Each item object has an imageUrl, detailUrl, name, price, quantity, sku |
discounts | array | options | List of objects of any discounts applied to the order. Factored into the cart total, unless a customTotal is provided. Each discount has an amount (in cents) and description |
asLowAs | object | - | Object containing cart information for generating advertising content or financing disclosure. |
monthly | integer | asLowAs | “As low as” monthly price as an integer in cents |
amount | string | asLowAs | “As low as” monthly price as a formatted string |
termLength | integer | asLowAs | “As low as” term length |
termInterval | integer | asLowAs | “As low as” term interval |
apr | float | asLowAs | “As low as” example APR |
minApr | float | asLowAs | “As low as” minimum APR |
maxApr | float | asLowAs | “As low as” maximum APR |
asLowAsText | string | asLowAs | “As low as” financing disclosure |