Skip to main content
POST
/
billing
/
topup
Create topup payment
curl --request POST \
  --url https://api.videodb.io/billing/topup \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "amount": 50,
  "currency": "usd"
}
'
{
  "success": true,
  "data": {
    "url": "https://checkout.stripe.com/pay/xxx"
  }
}
Manually purchase and add credits to your account balance using your preferred payment method.
import requests

payload = {
    "amount": 100,
    "redirect_url": "https://yourapp.com/dashboard"
}

response = requests.post(
    "https://api.videodb.io/billing/topup",
    json=payload,
    headers={"x-access-token": "your_api_key"}
)

result = response.json()
print(f"Payment URL: {result.get('payment_url')}")
print(f"Session ID: {result.get('session_id')}")
  • Amount is specified in USD (whole dollars)
  • Redirect URL is optional and directs users after payment completes
  • Topup credits are added immediately upon successful payment
  • Your payment method must be configured in your account settings
  • Topup is independent of auto-recharge and can be used alongside it

Authorizations

x-access-token
string
header
required

API key for authentication (sk-xxx format)

Body

application/json
amount
number
required
Example:

50

currency
string
Example:

"usd"

Response

200 - application/json

Topup checkout URL

success
boolean
Example:

true

data
object