Skip to main content
POST
/
v3
/
billing
/
top-up
curl
curl -X POST 'https://verification.didit.me/v3/billing/top-up/' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "amount_in_dollars": 500,
    "success_url": "https://yourapp.com/billing/success",
    "cancel_url": "https://yourapp.com/billing/cancel"
  }'
{
  "checkout_session_id": "cs_test_a1B2c3D4e5F6g7H8i9J0",
  "checkout_session_url": "https://checkout.stripe.com/c/pay/cs_test_a1B2c3D4e5F6g7H8i9J0"
}

Authorizations

x-api-key
string
header
required

Body

application/json
amount_in_dollars
number
required

Amount to charge, in USD. Must be at least 50. Tax is added automatically at checkout based on the customer's billing address.

Required range: x >= 50
success_url
string<uri>

URL Stripe redirects the customer to after a successful payment. Defaults to https://console.didit.me. Append the literal placeholder {CHECKOUT_SESSION_ID} if you want Stripe to substitute the session ID.

cancel_url
string<uri>

URL Stripe redirects the customer to when they abort or close the Checkout window. Defaults to https://console.didit.me.

Response

Stripe Checkout session created. Redirect the user to checkout_session_url to complete payment.

checkout_session_id
string
required

Stripe Checkout Session identifier (e.g. cs_test_a1B2c3...). Useful for server-side reconciliation.

checkout_session_url
string<uri>
required

Single-use Stripe-hosted payment page URL. Redirect the customer here to complete payment.