API by router
Billing subscriptions
POST
HTTPBearerheader
AuthorizationBearer <token>X-Api-Key?string|nullapplication/json- body
Create a Stripe Checkout Session for a customer subscription. "Take my money!" — Fry, Futurama
cancel_url?string|nullcustomer_id*Customer IdFormat
uuidproduct_tier_id*Product Tier IdFormat
uuidsuccess_url?string|nullSuccessful Response
application/json- response
checkout_url*Checkout Urlsession_id*Session Idstripe_customer_id*Stripe Customer Idcurl -X POST 'https://example.com/v1/billing/checkout-session' \ -H 'Content-Type: application/json' \ -d '{ "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e", "product_tier_id": "e95435a2-aad1-40af-8dd9-c7935a7100fe"}'Example Response
{ "checkout_url": "string", "session_id": "string", "stripe_customer_id": "string"}GET
HTTPBearerheader
AuthorizationBearer <token>X-Api-Key?string|nullSuccessful Response
application/json- response
pricing*array<>total*Totalcurl -X GET 'https://example.com/v1/billing/tier-pricing'Example Response
{ "pricing": [ { "billing_interval": "string", "created_at": "string", "currency": "string", "customer_price_cents": 0, "id": "string", "is_active": true, "platform_fee_percent": "string", "product_name": "string", "product_tier_id": "string", "stripe_price_id": "string", "tier_name": "string", "updated_at": "string" } ], "total": 0}POST
HTTPBearerheader
AuthorizationBearer <token>X-Api-Key?string|nullapplication/json- body
Create or update tier pricing for end-customers. "Greed, for lack of a better word, is good." — Gordon Gekko, Wall Street
billing_interval?Billing IntervalMatch
^(month|year)$Default
"month"currency?CurrencyLength
length <= 3Default
"usd"customer_price_cents*Customer Price CentsRange
0 <= valueplatform_fee_percent?|Default
"20.00"product_tier_id*Product Tier IdFormat
uuidSuccessful Response
application/json- response
billing_interval*Billing Intervalcreated_at*Created Atcurrency*Currencycustomer_price_cents*Customer Price Centsid*Idis_active*Is Activeplatform_fee_percent*Platform Fee Percentproduct_name*Product Nameproduct_tier_id*Product Tier Idstripe_price_id*string|nulltier_name*Tier Nameupdated_at*Updated Atcurl -X POST 'https://example.com/v1/billing/tier-pricing' \ -H 'Content-Type: application/json' \ -d '{ "customer_price_cents": 0, "product_tier_id": "e95435a2-aad1-40af-8dd9-c7935a7100fe"}'Example Response
{ "billing_interval": "string", "created_at": "string", "currency": "string", "customer_price_cents": 0, "id": "string", "is_active": true, "platform_fee_percent": "string", "product_name": "string", "product_tier_id": "string", "stripe_price_id": "string", "tier_name": "string", "updated_at": "string"}PUT
HTTPBearerheader
AuthorizationBearer <token>pricing_id*Pricing IdFormat
uuidX-Api-Key?string|nullapplication/json- body
billing_interval?|nullcurrency?|nullcustomer_price_cents?|nullis_active?boolean|nullplatform_fee_percent?|string|nullSuccessful Response
application/json- response
billing_interval*Billing Intervalcreated_at*Created Atcurrency*Currencycustomer_price_cents*Customer Price Centsid*Idis_active*Is Activeplatform_fee_percent*Platform Fee Percentproduct_name*Product Nameproduct_tier_id*Product Tier Idstripe_price_id*string|nulltier_name*Tier Nameupdated_at*Updated Atcurl -X PUT 'https://example.com/v1/billing/tier-pricing/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "billing_interval": "string", "created_at": "string", "currency": "string", "customer_price_cents": 0, "id": "string", "is_active": true, "platform_fee_percent": "string", "product_name": "string", "product_tier_id": "string", "stripe_price_id": "string", "tier_name": "string", "updated_at": "string"}