Skip to main content
POST
/
api
/
v1
/
checkouts
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"
}'
{
    "url": "https://wallet-sandbox.paywithsoap.com?clientSecret=HMC3VTosbzJd7cLsoP3geC5QmSz8jqF6",
    "id": "chk_HBq6ExeoRDMPFCCabR8n1h7S1towds7K",
    "client_secret": "HMC3VTosbzJd7cLsoP3geC5QmSz8jqF6",
    "line_items": [],
    "line_items_total_amount_cents": null,
    "balance_amount_cents": null,
    "type": "deposit",
    "experience": null
}
Use this endpoint to create a new checkout session for a customer. We support three types of checkouts:
  • A deposit checkout is used to deposit money into a customer’s balance.
  • A purchase checkout is used to purchase a product or service (e.g., Sweepstake coins).
  • A withdrawal checkout is used to withdraw money from a customer’s balance.
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"
}'
{
    "url": "https://wallet-sandbox.paywithsoap.com?clientSecret=HMC3VTosbzJd7cLsoP3geC5QmSz8jqF6",
    "id": "chk_HBq6ExeoRDMPFCCabR8n1h7S1towds7K",
    "client_secret": "HMC3VTosbzJd7cLsoP3geC5QmSz8jqF6",
    "line_items": [],
    "line_items_total_amount_cents": null,
    "balance_amount_cents": null,
    "type": "deposit",
    "experience": null
}

Authorizations

Authorization
string
header
required

Bearer token authentication using your API key

Body

application/json
  • Deposit
  • Fixed Deposit
  • Sweeps Purchase
  • Withdrawal
  • Fixed Withdrawal

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

Available options:
web,
webview
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
experience
enum<string>

The experience type for the checkout flow

Available options:
web,
webview