Skip to main content

Overview

A balance withdrawal presents the customer with an input form where they can choose how much to withdraw, up to their available balance. This is the standard withdrawal experience.

How It Works

  1. You create a checkout session with type: "withdrawal" and include balance_amount_cents (the customer’s available balance).
  2. The customer is redirected to the Soap-hosted checkout page.
  3. The customer enters the amount they’d like to withdraw (up to their balance) and selects a payout method.
  4. 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": "withdrawal",
    "balance_amount_cents": 10000,
    "experience": "web",
    "return_url": "https://myapp.com/wallet"
}'

Key Parameters

ParameterRequiredDescription
customer_idYesThe customer’s unique identifier
typeYesMust be "withdrawal"
balance_amount_centsYesThe customer’s available balance in cents (max they can withdraw)
experienceNo"web" or "webview"
return_urlNoWhere to redirect the customer after completion

When to Use

  • Letting the customer choose their withdrawal amount
  • Standard cashout flows where the customer has a balance
  • Any scenario where the withdrawal amount is not predetermined

← Back to Create Checkout

View the full API reference for creating checkouts.