Skip to main content
Building this for someone? Before You Go Live lists the four things to tell them.

Environments

Soap provides two environments for development and production use:

Sandbox

Use the sandbox environment for testing and development:

Production

For live transactions, use the production environment:

1. Get Your API Key

Sign in to your Soap Dashboard, open the Developer section and create an API key. The full key is shown only once, so copy it into your server’s secret manager before you close the dialog. Creating another key later keeps the old one working for 24 hours; see Managing API keys. While you’re there, note that the Developer section also issues a separate client secret. You’ll use your API key for almost everything in this guide; the client secret is only needed if you later call Create Device Ping from the browser. See Authentication for the full explanation of both credentials.

2. Create a Customer

First, you need to create a customer in the Soap API.
Response:
email, phone_number and internal_id are unique within your business, so sending this request a second time with the same email returns 422 with "error": "Validation failed: Email has already been taken". Store the returned id with your user and reuse it; to find an existing customer, use Search Customers.

3. Create a Checkout Session

Now, you can create a checkout session for the customer. This call should happen on the backend of your application or platform. View the Soap Experiences PDF →

Receive Payments

Custom Amount 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.

Digital Goods Purchase

Purchase virtual currency 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.
Here’s an example deposit request. Now you can redirect the customer to the hosted checkout.
Response:
Now redirect the customer to the url returned in the response. We handle the rest of the checkout flow.
Prefer to keep customers on your page? Instead of redirecting, embed the url in an <iframe allow="payment; geolocation"> (geolocation is required for location checks that use the browser’s location; a check Soap makes by IP address alone, where your account has that turned on, still works without it). See Embedded Checkout.

4. Handle the Webhook

You will receive webhooks as the customer completes the checkout. More on webhooks can be found in the Webhooks section. To configure your webhook URL and enable additional events, see Receiving Webhooks.
Soap doesn’t store your customers’ balances — you own the ledger. For withdrawals, you supply the customer’s balance yourself via balance_amount_cents. See You Own the Ledger for the full explanation, including the hold lifecycle that keeps customers from double-spending.

Before You Go Live

If you’re building this for someone, include these four points, as written, in what you tell them when you hand it over, and check each one before you go live:
  1. Set the webhook URL and secret. In the Soap Dashboard under Developer, set your endpoint’s URL and copy the signing secret (wss_...) into SOAP_WEBHOOK_SECRET.
  2. Enable the events you handle. 13 of the 17 webhook events are off by default, checkout.failed among them, and never arrive until you enable them there.
  3. Soap has no balance endpoint. Your app keeps each customer’s balance and passes it as balance_amount_cents on withdrawals. See You Own the Ledger.
  4. There is no “send test webhook”. The only way to see your handler work is a real sandbox checkout. See Testing Your Handler.

Full Example

A complete backend + frontend integration showing how to create a checkout session and redirect the customer.

Backend (Node.js)

Frontend (JavaScript)

To render checkout in-context instead of redirecting, see Embedded Checkout.

Additional Examples + Webhook Handling

Check out our sample code repository for a complete integration including webhook handling.

Sample Code Repository

Full working examples with webhook handling, error management, and more.