Skip to main content

Overview

An ecommerce purchase checkout allows customers to buy physical goods such as nutraceuticals, peptides, supplements, and other products. This uses line items to define what the customer is buying, with a traditional shopping cart experience. Every Soap API request is authenticated with a bearer token in the Authorization header:
Your API key is in the Soap Dashboard under the Developers section. It looks like key_.... Requests with a missing or invalid API key return 422 — never 401 — with a JSON error field, usually {"error": "API key not found."}. Branch on the status code rather than the message: GET /api/v1/device_pings/latest_geo_check does not yet return the same wording. Never expose your API key in client-side code — it is server-side only.

How It Works

1

Create Or Provide Products

You can create products in Soap ahead of time or pass inline dynamic product details directly in line_items.
2

Create a Checkout Session

Create a checkout session with type: "deposit" and include line_items.
Line items with sku: "shipping" or sku: "tax" are treated as special product types and are rendered in the checkout UI as you would expect (as shipping and tax line items rather than regular products).
3

Customer Completes Purchase

The customer is redirected to the Soap-hosted checkout page showing the cart and total, selects a payment method, and completes the purchase.
4

Receive Confirmation

Upon completion, a webhook is fired and the customer is redirected back to your app.

API Request

You can also manage products from the Soap dashboard and reference them by ID. Simply pass line_items: [{ "product_id": "pr_XXX", "quantity": 1 }] instead of inline product details.

Key Parameters

Line Item Parameters

Each line item can reference an existing product or define a product inline.

When to Use

  • Nutraceuticals and peptide products
  • Supplements and wellness items
  • Any physical goods catalog or dynamically priced cart

← Back to Create Checkout

View the full API reference for creating checkouts.