Skip to main content
POST
Use this endpoint to create a new checkout session for a customer. 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. The type field accepts exactly two values, "deposit" and "withdrawal". The checkout flows below are built from those two values plus the other parameters — there is no "purchase" or "subscription" value for type.
  • A deposit checkout (type: "deposit") deposits money into a customer’s balance.
  • A purchase checkout is a deposit that carries line_items, used to buy a product or service such as credits, sweepstakes coins, or digital goods.
  • A subscription checkout is a deposit that carries line_items and subscription_data, for recurring billing.
  • A withdrawal checkout (type: "withdrawal") withdraws money from a customer’s balance.
View the Soap Experiences PDF →

Receive Payments

Draft King's Style Deposit

Input form where the customer enters a custom deposit amount.

Preset Amount Deposit

Deposit a fixed amount (e.g. $100) into the customer’s balance.

Subscription Checkout

Create a recurring deposit checkout with subscription billing metadata.

Digital Goods Purchase

Purchase virtual currency, in-game tokens, sweepstakes coins, and other digital goods.

Ecomm Purchase

Purchase physical goods such as nutraceuticals, peptides, supplements, and more.

Send Payments

Balance Withdrawal

Input form where the customer withdraws up to their available balance.

Preset Amount Withdrawal

Withdraw a fixed amount (e.g. $100) from the customer’s balance.

Common Parameters

Line Items and Dynamic Pricing

Use line_items for purchase and subscription checkout flows where Soap should show purchased products and compute the checkout total from product quantities. Line items are not used for balance amount, fixed amount, or withdrawal-only flows. Each line item can be either:
  • An existing product reference with product_id and quantity.
  • An inline dynamic product with name, price_cents, and quantity, plus optional sku, url, and dedup.
When dedup is true, include a stable sku. Soap reuses a matching product for the same business when both sku and price_cents match. If dedup is absent or false, Soap creates a new active product from the inline line item.

Line Item Parameters

Dynamic Purchase Example

Subscription Checkouts

Create a subscription checkout by sending subscription_data on POST /api/v1/checkouts. Subscription checkouts are deposit-only and require line_items. Subscription checkouts use the same line item formats as purchase checkouts: either existing products by product_id or inline dynamic products with name, price_cents, and quantity. The subscription_data.interval value can be day, week, month, or year. For quarterly billing, use interval: "month" and interval_count: 3.

Subscription Parameters

Redirect the customer to url, or embed it in an <iframe allow="payment"> to render checkout in context. See Embedded Checkout.
subscription is only present when you created a subscription checkout. It is omitted from the response entirely otherwise, rather than returned as null, so check whether the key exists instead of comparing it to null. This differs from webhook payloads, where data.subscription is always present and is null for non-subscription checkouts.

Authorizations

Authorization
string
header
required

Bearer token authentication using your API key (key_...). Used for every endpoint except POST /api/v1/device_pings.

Body

application/json

Standard sports-book styles deposit.

customer_id
string
required

Unique identifier for the customer

Example:

"cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870"

type
enum<string>
required

Type of transaction - deposit

Available options:
deposit
Example:

"deposit"

experience
enum<string>

The experience type for the checkout flow. Use "iframe" when embedding the checkout in an iframe.

Available options:
web,
webview,
iframe
return_url
string

URL to redirect the customer after completion (if you are opening a new tab or window for your customer you do not need this)

Example:

"https://myapp.com/game/:id"

Response

Use the url field in the response. In web, you can redirect or open a new tab. In native, you can use a WebView.

url
string

The url of the checkout experience

id
string

Unique identifier for the checkout

client_secret
string

Secret used for client-side checkout processing

line_items
object[]

Line items contained in the checkout (non-empty only for purchases)

line_items_total_amount_cents
integer | null

Total amount in cents for all line items

balance_amount_cents
integer | null

Amount in cents withdrawn from or to be added to balance

type
enum<string>

Type of checkout transaction

Available options:
deposit,
withdrawal
fixed_amount_cents
integer | null

A merchant-set amount that locks the checkout to a single value. Always present in the response, and null unless your account is configured for fixed-amount flows. Mutually exclusive with both line_items and balance_amount_cents.

experience
enum<string>

The experience type for the checkout flow. Use "iframe" when embedding the checkout in an iframe.

Available options:
web,
webview,
iframe
subscription
object

Subscription metadata. This key is omitted entirely for non-subscription checkouts rather than being returned as null, so check for its presence rather than comparing it to null.