billing

Create checkout session

Creates a Dodo Payments subscription checkout. There is no trial: the Free plan is what a customer tries the product on, and checkout charges immediately.

post/api/v1/billing/checkout

Request

  • Base URL: https://api.cadencz.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.cadencz.com/api/v1/billing/checkout
  • Auth: HTTP bearer

Request body

tierstring nullable
billing_period'monthly' | 'yearly'
topup_credits100 | 500 nullable
return_urlstring nullable
cancel_urlstring nullable

Example request

{
  "cancel_url": "http://localhost:3000/billing",
  "return_url": "http://localhost:3000/billing/success",
  "tier": "solo"
}

Response

Successful Response

action'checkout' | 'plan_change' | 'unchanged' | 'resumed' | 'portal'
attempt_idstring nullable
session_idstring nullable
checkout_urlstring nullable required
mode'test' | 'live' required
client_secretstring nullable
payment_idstring nullable
publishable_keystring nullable
effective_at'immediately' | 'next_billing_date' nullable
messagestring nullable

Example response

{
  "action": "checkout",
  "checkout_url": "https://test.dodopayments.com/checkout/chk_123",
  "mode": "test",
  "session_id": "chk_123"
}

Changes

No recorded changes to this operation across all 1 revision of this API.