Billing API
POST /api/v1/billing/webhooks/stripe
Summary: Stripe Webhook
Stripe webhook endpoint.
Receives and processes Stripe events to keep subscriptions in sync.
IMPORTANT: This endpoint must be registered in Stripe Dashboard:
- Go to Developers > Webhooks
- Add endpoint: https://your-domain.com/billing/webhooks/stripe
- Select events to listen for:
- customer.subscription.created
- customer.subscription.updated
- customer.subscription.deleted
- customer.subscription.trial_will_end
- invoice.paid
- invoice.payment_failed
- invoice.upcoming
- Copy webhook signing secret to STRIPE_WEBHOOK_SECRET env var
Security: Verifies webhook signature to ensure events are from Stripe.
Response Schema (WebhookEventResponse - Status 200):
| Property | Type | Required | Description |
|---|---|---|---|
event_id | string | * | |
event_type | string | * | |
processed | boolean | * | |
message | string | * |
POST /api/v1/billing/webhooks/paystack
Summary: Paystack Webhook
Paystack webhook endpoint.
Receives and processes Paystack events to keep subscriptions in sync.
IMPORTANT: This endpoint must be registered in Paystack Dashboard:
- Go to Settings > Webhooks
- Add webhook URL: https://your-domain.com/billing/webhooks/paystack
- Copy webhook secret to PAYSTACK_WEBHOOK_SECRET env var
Security: Verifies webhook signature using HMAC SHA512.
Paystack Events:
- subscription.create - New subscription created
- subscription.disable - Subscription canceled
- subscription.enable - Subscription reactivated
- charge.success - Payment successful
- charge.failed - Payment failed
- invoice.create - Invoice generated
- invoice.update - Invoice status changed
Response Schema (WebhookEventResponse - Status 200):
| Property | Type | Required | Description |
|---|---|---|---|
event_id | string | * | |
event_type | string | * | |
processed | boolean | * | |
message | string | * |
GET /api/v1/billing/addons/catalog
Summary: List Addon Catalog
List available add-ons (public).