⚓️ Portcall

Creating checkout session in your app

Create checkout sessions and understand provider requirements for paid flows.

Requirement for paid subscriptions

For live paid checkout, your app must have an active payment provider connection in Portcall (Stripe or Braintree).

If no provider is connected, live payment collection cannot complete.

Request

curl -sS -X POST "$PORTCALL_API_BASE/v1/checkout-sessions" \
  -H "x-api-key: $PORTCALL_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "plan_id": "plan_starter",
    "user_id": "user_123",
    "redirect_url": "https://app.example.com/success",
    "cancel_url": "https://app.example.com/cancel"
  }'

Checkout UI

Checkout form rendered from checkout session

Success state

Checkout success page after payment details are accepted

Response shape

{
  "data": {
    "id": "cs_...",
    "url": "https://checkout.example.com?id=cs_...&st=..."
  }
}

Redirect your customer to data.url.