API reference

Base URL: https://api.swellpayments.com · Auth: Bearer secret key · All amounts in the smallest currency unit (cents).

Endpoints

POST/v1/checkout/sessionsCreate a hosted checkout session
GET/v1/checkout/sessions/:idRetrieve a session
POST/v1/checkout/sessions/:id/completeComplete a session (processor callback)
POST/v1/payment-linksCreate a payment link
GET/v1/payment-linksList payment links
POST/v1/refundsCreate a refund
GET/v1/paymentsList payments
GET/v1/payments/:idRetrieve a payment
GET/v1/customersList customers
GET/v1/balanceRetrieve available / pending balance
POST/v1/webhooksRegister a webhook endpoint
GET/v1/webhooksList webhook endpoints
POST/v1/api-keysCreate an API key
GET/v1/analyticsRevenue and conversion metrics
POST/v1/payoutsRequest a payout
GET/v1/payoutsList payouts

Example response

checkout.session
{
  "id": "cs_01hx...",
  "object": "checkout.session",
  "amount": 4999,
  "currency": "usd",
  "status": "open",
  "url": "https://checkout.swellpayments.com/session/cs_01hx...",
  "livemode": false,
  "created": 1720000000
}

Amounts are always integers. Never send floating-point currency values.