Bread Carts

Overview

How Bread Carts Works

Bread Carts allows merchants to pre-configure and send carts to customers who can then securely check out with financing.

Pre-configured carts can contain:

  • Items
  • Optional customer information
  • Checkout options

Common Use Cases

Bread Carts are commonly used to:

  • Complete phone or in-person sales: Send a pre-configured cart to customers directly to check out in-person or over the phone.
  • Market products to customers: Promote certain products or categories or re-market to abandoned cart customers who pre-qualified for financing.
  • Implement a secure checkout experience: Provide customers access to the Bread Checkout flow in areas of the site that do not support custom Javascript – for example, from the checkout page on certain SaaS e-commerce solutions.

Option 1: Generate A Cart In The Customer's Browser

Carts can be created leveraging the cartCreate method. cartCreate accepts two parameters: opts and callback. Opts is similar to the options object configured for Bread Checkout, with a few additional properties:

< Opts properties table >

The callback function will run once a Cart has been created in our system and the data is returned to the client. “callback” will receive err and data as parameters.

< Callback properties table >

Putting it all together in a code example: d

var opts = {
  callbackURL: '/replace/with/your/url',
  completeURL: '/replace/with/your/url',
  errorURL: '/replace/with/your/url',
  orderRef: 'ABCD1234',
  items: [{
    name: 'Couch',
    price: 150000,
    sku: 'COUCH123',
    imageUrl: '/replace/with/your/url',
    detailUrl: '/replace/with/your/url', 
    quantity: 1
  }],
  shippingOptions:[{
    type: 'Ground',
    typeId: '0123',
    cost: 1500
  }],
  tax: 1000,
  billingContact: {...}, // Optional if available
  shippingContact: {...}, // Optional if available
};
                   
bread.cartCreate(opts, function(err, data) {
  if (err) {
    // throw an error
  } else {
    // Take a look at data.asLowAs (particularly data.asLowAs.amount and data.asLowAs.asLowAsText)
    // Generate email template for customer and send data.redirectUrl
  }
});

The data returned in the callback function of cartCreate:

{
  asLowAs: {
    amount: "$126.25",
    apr: 0,
    asLowAsText: "Example payment is based on the listed product price(s) assuming a 24 month term loan and a 0.00% APR. Subject to approval of credit application. Rates range from 0.00% to 29.99% APR. APRs will vary depending on credit qualifications, loan amount, and term. Bread® pay over time loans are made by Comenity Capital Bank.",
    maxApr: 0,
    minApr: 0,
    monthly: 12625,
    termInterval: "Month",
    termLength: 12
  },
  redirectUrl: "https://checkout-sandbox.getbread.com/la0AWq"
}

Option 2: Generate a Cart Using An API Endpoint

Bread Carts can also be created through the use of a REST API. Please refer to the Carts documentation in our API Reference for more detail.

Option 3: Generate a Cart in Your Bread Merchant Portal

Bread Carts can also be created through the Bread Merchant Portal. Please refer to our Create Custom Carts documentation.