Skip to main content

Overview

An ecommerce purchase checkout allows customers to buy physical goods — nutraceuticals, peptides, supplements, and other products. This uses line items to define what the customer is buying, with a traditional shopping cart experience.

How It Works

1

Create Your Products

Before creating a checkout, you must first create products in Soap that represent your physical goods (nutraceuticals, peptides, supplements, etc.). Contact your Soap account team to set up your product catalog.
2

Create a Checkout Session

Create a checkout session with type: "deposit" and include line_items referencing those 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

curl -X POST 'https://api-sandbox.paywithsoap.com/api/v1/checkouts' \
--header 'Content-Type: application/json' \
--header 'Authorization: YOUR_API_KEY' \
--data '{
    "customer_id": "cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870",
    "type": "deposit",
    "line_items": [
        {
            "product_id": "pr_protein_powder_vanilla",
            "quantity": 2
        },
        {
            "product_id": "pr_creatine_30day",
            "quantity": 1
        }
    ],
    "experience": "web",
    "return_url": "https://myapp.com/orders"
}'

Key Parameters

ParameterRequiredDescription
customer_idYesThe customer’s unique identifier
typeYesMust be "deposit"
line_itemsYesArray of products with product_id and quantity
experienceNo"web" or "webview"
return_urlNoWhere to redirect the customer after completion

When to Use

  • Nutraceuticals and peptide products
  • Supplements and wellness items
  • Any physical goods catalog

← Back to Create Checkout

View the full API reference for creating checkouts.