Instantly charge your saved payment method to add credits without a Stripe checkout redirect
cURL
curl --request POST \ --url https://api.example.com/credits/quick-topup \ --header 'Content-Type: <content-type>' \ --header 'x-api-key: <x-api-key>' \ --data '{ "dollars": 123 }'
curl -X POST https://xquik.com/api/v1/credits/quick-topup \ -H "x-api-key: xq_YOUR_KEY_HERE" \ -H "Content-Type: application/json" \ -d '{"dollars": 25}' | jq
application/json
"charged"
{ "outcome": "charged", "balance": 1450, "credits": 1000 }
clientSecret
"requires_action"
{ "outcome": "requires_action", "clientSecret": "pi_3abc...secret_xyz" }
"no_payment_method"
{ "outcome": "no_payment_method" }
{ "error": "Minimum top-up is $10" }
{ "error": "unauthenticated" }
Was this page helpful?