Appearance
Billing
4-tier developer subscription from €9.99/mo to €129/mo. See Pricing for the full model.
Developer Billing
Developers subscribe once to access the API. The subscription covers all their businesses.
POST /v1/developer/billing/checkout
Create a Stripe Checkout session to subscribe.
bash
curl -X POST https://api.availengine.com/v1/developer/billing/checkout \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"plan": "starter"}'Returns:
json
{
"checkout_url": "https://checkout.stripe.com/..."
}Redirect the developer to checkout_url. On success they're sent to /developer?subscription=success.
POST /v1/developer/billing/portal
Open the Stripe Customer Portal to manage payment method, view invoices, or cancel.
bash
curl -X POST https://api.availengine.com/v1/developer/billing/portal \
-H "Authorization: Bearer YOUR_JWT_TOKEN"Returns:
json
{
"portal_url": "https://billing.stripe.com/..."
}Stripe Connect
For businesses that want to accept deposits directly into their own Stripe account.
POST /v1/billing/connect/onboard
Create or reuse a Stripe Express connected account. Returns an onboarding URL — the business owner completes setup on Stripe's hosted page.
bash
curl -X POST https://api.availengine.com/v1/billing/connect/onboard \
-H "Authorization: Bearer avail_live_YOUR_KEY"Returns:
json
{
"onboarding_url": "https://connect.stripe.com/..."
}On completion, the owner is redirected to /dashboard?stripe=connected.
GET /v1/billing/connect/status
Check the status of the business's Stripe Connect account.
bash
curl https://api.availengine.com/v1/billing/connect/status \
-H "Authorization: Bearer avail_live_YOUR_KEY"json
{
"connected": true,
"details_submitted": true,
"payouts_enabled": true,
"connect_id": "acct_1ABC..."
}| Field | Description |
|---|---|
connected | A Connect account exists |
details_submitted | Owner completed Stripe onboarding |
payouts_enabled | Account can receive transfers |
connect_id | Stripe account ID |
Stripe Webhooks
POST /webhooks/stripe
Stripe sends events here. AvailEngine handles:
| Event | Action |
|---|---|
checkout.session.completed | Activates developer subscription, confirms deposit bookings |
checkout.session.expired | Cancels pending deposit bookings |
customer.subscription.updated | Syncs subscription state |
customer.subscription.deleted | Marks subscription cancelled |
invoice.payment_succeeded | Clears past-due status |
invoice.payment_failed | Sets past_due — API returns 402 |
payment_intent.succeeded | Confirms deposit payment |
payment_intent.payment_failed | Marks deposit as failed |
payment_intent.amount_capturable_updated | Moves deposit to held status |
account.updated | Syncs Stripe Connect account status |
Never call this endpoint directly — it's for Stripe server-to-server communication. Verify signatures with STRIPE_WEBHOOK_SECRET.