Use this endpoint to create a new checkout session for a customer. We support these checkout types:Documentation Index
Fetch the complete documentation index at: https://docs.paywithsoap.com/llms.txt
Use this file to discover all available pages before exploring further.
| Parameter | Required | Description |
|---|---|---|
customer_id | Yes | Soap customer ID for the customer starting the checkout. |
type | Yes | Checkout direction. Use "deposit" for deposits, purchases, and subscriptions. Use "withdrawal" for withdrawals. |
line_items | Required for purchase and subscription checkouts | Products included in the checkout. Supports existing product references and inline dynamic products. |
subscription_data | Required for subscription checkouts | Billing cadence for a recurring subscription checkout. Includes interval and interval_count. |
fixed_amount_cents | Required for preset amount flows | Fixed amount in cents for preset deposits or preset withdrawals. Must be at least 1. |
balance_amount_cents | Required for balance withdrawal flows | Customer balance in cents. The customer can withdraw up to this amount. Must be at least 1. |
experience | No | Checkout presentation. Use "web" or "webview". |
return_url | No | URL where Soap redirects the customer after checkout completion. |
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:
product_id and quantity.name, price_cents, and quantity, plus optional sku, url, and dedup.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.
| Parameter | Required | Description |
|---|---|---|
line_items[].product_id | Yes for existing products | Soap product ID for an existing product. Use this shape with quantity when the product is already in Soap. |
line_items[].name | Yes for inline products | Product name to create and display in checkout. |
line_items[].price_cents | Yes for inline products | Unit price in cents for the inline product. Must be at least 1. |
line_items[].quantity | Yes | Number of units to purchase. Must be at least 1. |
line_items[].sku | Required when dedup is true | Stable merchant SKU used with price_cents to find an existing product for this business. |
line_items[].url | No | Product image URL shown in checkout where supported. |
line_items[].dedup | No | When true, Soap looks for an existing product for the same business by sku and price_cents before creating a new product. Requires sku. |
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.
| Parameter | Required | Description |
|---|---|---|
subscription_data.interval | Yes | Billing interval. Must be day, week, month, or year. |
subscription_data.interval_count | Yes | Number of intervals between charges. Use interval: "month" and interval_count: 3 for quarterly billing. |
Bearer token authentication using your API key
Standard sports-book styles deposit.
Unique identifier for the customer
"cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870"
Type of transaction - deposit
deposit "deposit"
The experience type for the checkout flow
web, webview URL to redirect the customer after completion (if you are opening a new tab or window for your customer you do not need this)
"https://myapp.com/game/:id"
Use the url field in the response. In web, you can redirect or open a new tab. In native, you can use a WebView.
The url of the checkout experience
Unique identifier for the checkout
Secret used for client-side checkout processing
Line items contained in the checkout (non-empty only for purchases)
Total amount in cents for all line items
Amount in cents withdrawn from or to be added to balance
Type of checkout transaction
deposit, withdrawal The experience type for the checkout flow
web, webview Subscription metadata returned only for subscription checkouts