Skip to main content
POST
/
api
/
billing
/
credits
/
purchase
Purchase Credits
curl --request POST \
  --url https://api.example.com/api/billing/credits/purchase \
  --header 'Content-Type: application/json' \
  --header 'X-Organization-Id: <x-organization-id>' \
  --data '{
  "amount": 123
}'
{
  "checkout_url": "https://checkout.dodopayments.com/pay/cs_abc123",
  "session_id": "cs_abc123",
  "credits_to_receive": 10000
}
Create a checkout session to purchase additional platform credits. This endpoint is available across all plan tiers.

Request

X-Organization-Id
string
required
The unique identifier of the organization.
amount
integer
required
The dollar amount of credits to purchase (e.g., 10, 50, 100, 250, 500).

Response

checkout_url
string
The URL to redirect the user to complete their payment via Dodo Payments.
session_id
string
The unique identifier of the checkout session.
credits_to_receive
integer
The number of credits that will be added to the balance upon successful payment.
{
  "checkout_url": "https://checkout.dodopayments.com/pay/cs_abc123",
  "session_id": "cs_abc123",
  "credits_to_receive": 10000
}