Architecture Overview

This service handles payment-provider checkout creation and webhook normalization. Your application owns order creation and fulfilment logic.

  1. Create your own order endpoint in your backend, create the order, then call POST /payment with tenant headers and payment payload.
  2. Configure tenant setup with API key, tenant/auth secrets, and tenant properties (including provider and redirect props).
  3. Use redirect URL returned by this service and send it to your frontend so the user is redirected to checkout.
  4. Provider redirects back to your success/cancel pages configured in tenant properties.
  5. Show payment status screen and let the user continue based on your business flow.
  6. Create /payment/webhook in your backend to process final payment updates and update your order (credits, tickets, subscriptions, etc.).

Available Endpoints

Method Endpoint Purpose
POST/paymentCreate checkout using tenant default provider
POST/yocoCreate checkout explicitly with Yoco
POST/stripeCreate checkout explicitly with Stripe
POST/paystackCreate checkout explicitly with Paystack
POST/yoco/webhookProvider webhook receiver (Yoco)
POST/stripe/webhookProvider webhook receiver (Stripe)
POST/paystack/webhookProvider webhook receiver (Paystack)
POST/webhooksRegister your downstream webhook endpoint
GET/healthService health check