Architecture Overview
This service handles payment-provider checkout creation and webhook normalization. Your application owns order creation and fulfilment logic.
- Create your own order endpoint in your backend, create the order, then call
POST /paymentwith tenant headers and payment payload. - Configure tenant setup with API key, tenant/auth secrets, and tenant properties (including provider and redirect props).
- Use redirect URL returned by this service and send it to your frontend so the user is redirected to checkout.
- Provider redirects back to your success/cancel pages configured in tenant properties.
- Show payment status screen and let the user continue based on your business flow.
- Create
/payment/webhookin your backend to process final payment updates and update your order (credits, tickets, subscriptions, etc.).
Available Endpoints
| Method | Endpoint | Purpose |
|---|---|---|
POST | /payment | Create checkout using tenant default provider |
POST | /yoco | Create checkout explicitly with Yoco |
POST | /stripe | Create checkout explicitly with Stripe |
POST | /paystack | Create checkout explicitly with Paystack |
POST | /yoco/webhook | Provider webhook receiver (Yoco) |
POST | /stripe/webhook | Provider webhook receiver (Stripe) |
POST | /paystack/webhook | Provider webhook receiver (Paystack) |
POST | /webhooks | Register your downstream webhook endpoint |
GET | /health | Service health check |
Next: Using the Service or REST APIs.