Custom Storefronts

Purchase flow

The sequence of Customer API calls from part upload to a paid order

This page shows every API call of a storefront, in order, from the first visit to a paid order. The store settings and configuration options need no token. Uploads, carts, and prices need a guest or customer token. Checkout, payment, and order tracking need a customer token. For examples, refer to Upload and price and Checkout and payment.

Before you start

All paths in the purchase flow are relative to:

<API_BASE>/api/customer/v1

All examples use these shell variables:

API="$API_BASE/api/customer/v1"
STORE="your-store-name"
TOKEN="<access token from the Auth API>"

If your store setting loginStage is BEFORE_PRICE, ask the visitor to sign in before the upload and skip the guest steps.

API flow

Each step lists its calls. Select a call to open its reference.

Read the store settings

curl "$API/operator" -H "X-Store-Name: $STORE"

The response tells you how your store is configured: currencies, payment provider, login rules, maximum file size, and more. Your storefront must obey these settings. Refer to Store settings and Storefront rules.

Get a guest token

Your server calls the Auth API, so the visitor can upload before sign-in. Refer to Guest sessions.

Get a price

Call again each time the configuration changes. Guide: Get a price.

Get the final price and create the order

Price again with shipping and the billing address, then create the order. Guide: Create the order.

Last updated on

On this page