About Cart-to-Cart

📘

Cart-to-Cart is only available to select partners. Please contact Locally to learn more and be added to the wait-list.

Locally’s “Buy It Locally” cart enables retailers to accept reservations or payments for in-store pickup and delivery from hundreds of major brand sites, Locally.com, search engines, and more. Normally, Buy It Locally sends stores order alerts via email or SMS, and payments are captured in Locally’s cart via the retailer’s Stripe merchant account.

We understand that larger, enterprise retailers need a more integrated solution.

With Cart-To-Cart, Locally redirects the shopper checkout to a retailer’s ecommerce shopping cart instead, enabling the shopper to complete the transaction and make their payment through the enterprise retailer’s existing Buy Online, Pickup In Store (BOPIS) solution.

Locally offers a variety of hand-off methods to redirect shoppers from Locally to a retailer’s site and track the outcome. This User Guide focuses on the API method.

Configuring Cart-to-Cart

Prerequisites

Inventory Feeds

Locally offers several ways to sync store inventory. If your system is already sending on-hand inventory to Locally, no action is required.

In order to use Cart-to-Cart your system must be updating inventory feeds at least once every 24 hours. Inventory setup is outside of the scope of this document; please review our documentation here or contact your Locally support representative about getting started.

Ecommerce Product Feed

To offer Cart-to-Cart, Locally requires a product feed from your ecommerce site that provides your website’s availability. This way, we will only present Buy Online Pickup In Store as an option on products in-stock at your stores that are also available on your website.

At a minimum, the product feed should include all columns to identify a product (UPC, product name, image, description) as well as a “Buy Link” (a URL to the PDP for a given product).

Webhook URL for Order Updates

You will need to provide Locally with a webhook URL endpoint. This URL can be changed at any time via your configuration panel. Locally will send a payload containing the cart object (see API documentation below) to this endpoint whenever a new cart is created and ready for hand-off to your website.

It will be your company’s responsibility to consume this payload and respond in real-time with a cart URL to redirect the customer to.

API Key

You will need an API Key to access your CartAPI endpoint. See Generate An API Key for more info.

Accepting orders with the Carts API

Our Carts API provides real-time order hand-offs. You’ll receive payloads from our system and respond with a Cart URL that our system will redirect the shopper to complete their transaction through your BOPIS checkout.

Provide a Cart URL with our /api/v2/cart/{cart_hash} endpoint

When a shopper has constructed their cart on Locally and is ready to check-out, Locally will send a payload to your webhook with the contents of the shoppers cart:

{
    "created_at": "2022-01-01T00:00:00.000Z",
    "hash": "abc123",
    "locally_store_id": 123,
    "external_store_id": 4857,
    "items": [
        {
            "upc": "12345",
            "quantity": 1
        },
        {
            "upc": "12346",
            "quantity": 3
        }
    ]
}

You’ll respond in real-time with a cart URL for the particular order, and Locally will redirect the customer to that URL.

{  
    "date": "2022-01-01T00:00:00.000Z",  
    "url": "<https://www.ourwebsite.com/cart/abcdef123456>"  
}

Reconciling Orders

With Cart-to-Cart, a 3.5% network fee is logged on all outbound orders. This fee is waived when the retailer indicates that the redirect did not result in a completed sale, such as an abandoned cart or a refund within 30 days.

To record the outcome of each order, you’ll POST to our /api/v2/cart/{cart_hash} endpoint with a status parameter:

POST https://www.locally.com/api/v2/cart/abc123

{  
    "date": "2022-01-01T00:00:00.000Z",  
    "status": "confirmed"  
}

Reference Doc: /cart/{cart_hash}

statusoptionsDescription
confirmedDefault. indicates a successfully completed transaction
abandonedUse this for when a hand-off results in an abandoned cart (fee is waived)
refundedUse this to indicate a completed transaction was refunded (fee is waived). Available for up to 30 days after the order

If no status is set, the status will default to confirmed.

For multi-product carts where you need to record a different outcome per product, you can send us line-item level status updates by specifying the UPC.

POST to /api/v2/cart/{cart_hash}/{upc} endpoint with outcome of the order:

POST [https://www.locally.com/api/v2/cart/abc123/123456789123

{  
    "hash": "abc123",  
    "upc": "12347",  
    "date": "2022-01-01T00:00:00.000Z",  
    "status": "refunded"  
}

Reference Doc: POST /cart/{cart_hash}/{upc}

Additional Cart API functionality

GET /carts/{page} endpoint

To access a list of all Locally orders placed at your company, use:

GET [https://www.locally.com/api/v2/carts

This will return the list of all carts your account has access to, ordered by most recent first, and broken up via 50 per page. The first page can be accessed via just /api/v2/carts or /api/v2/carts/0 and latter pages can be defined by updating the page number.

Reference Doc: GET /carts

GET /cart/{cart_hash} endpoint

This will give you all the data for a specific order. To access a cart’s information, use this endpoint:

GET https://www.locally.com/api/v2/cart/{cart_hash}

Reference Doc: GET /carts/{cart_hash}