๐Ÿ”ฅGodFocus Platformยท Docs
โ† HomeDashboard โ†’

Billing Checkout

POST/v1/billing/checkoutFree

Creates a Stripe checkout session for purchasing credits. Redirect your user to the returned URL to complete payment.

Request body

{
  "packId": "growth"
}
FieldTypeRequiredDescription
packIdstringYesThe pack id from /v1/billing/packs

Response

{
  "url": "https://checkout.stripe.com/pay/cs_live_a1b2c3d4..."
}
FieldTypeDescription
urlstringStripe checkout URL โ€” redirect your user here

After payment completes, Stripe redirects the user to your configured success URL and the credits are added to the account balance immediately.

Example

curl -X POST https://platform.godfocus.io/v1/billing/checkout \
  -H "Authorization: Bearer $GODFOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"packId": "growth"}'

Webhook

After payment succeeds, Stripe sends a checkout.session.completed event to our webhook. Credits are applied automatically โ€” you do not need to poll or confirm.