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.
Payload Structure
interface WebhookEvent {
event_id: string;
type: "checkout.hold";
data: {
id: string; // id of the checkout you originally created
type: "withdrawal" // only sent on withdrawals
charge: {
id: string;
status: "held";
from_status: "created";
amount_cents: number;
transaction_type: "debit";
};
customer: {
id: string;
};
line_items: Array<{
product_id: string;
quantity: number;
}>;
line_items_total_amount_cents: number | null;
}
}
Example Payload
{
"event_id": "ev_tDaWu5aTVa2kbvDjGe55rxZpaMEmVFWB",
"type": "checkout.hold",
"data": {
"id": "chk_SUuEdtXWK3wmui6c4guq5xdLke21uvRt",
"type": "withdrawal",
"charge": {
"id": "ch_96rVNn94oKSRDZ69fQsUQbaigaice9Tx",
"status": "held",
"from_status": "created",
"amount_cents": 100,
"transaction_type": "debit"
},
"customer": {
"id": "cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870"
},
"line_items": [],
"line_items_total_amount_cents": null
}
}
You must respond with status
2xx: if the customer has available funds
Not 2xx: if the customer has insufficient funds
Updating Your Internal Ledger
You can choose to debit the customer’s balance immediately or wait until you receive the checkout.succeeded event.
It is recommended to debit immediately and then skip the checkout.succeeded event.