This service implements a small Yoco-backed payment system. All requests require an X-Tenant-ID header.
POST //payments/create — create payment (body: orderId, amount, optional currency, items, customer)GET //payments/:id — fetch payment by internal id or external orderIdPOST //payments/webhook — Yoco webhook receiver (configure this URL in Yoco)POST //webhooks — configure tenant webhook URL to forward payment events (body: url, optional eventTypes)GET //webhooks — list configured webhooks for tenantDELETE //webhooks/:id — deactivate webhookhttps://yourapi.com//payments/webhook.POST //webhooks) will be called when the system receives payment events — the payload includes event, payment, and original (raw webhook body).YOCO_API_KEY, YOCO_API_URL, PAYMENT_SUCCESS_URL, PAYMENT_CANCEL_URL, PAYMENT_FAILURE_URL.POST //payments/create
Content-Type: application/json
X-Tenant-ID: TENANT_ABC
{
"orderId": "ORD-123",
"amount": 157.5,
"currency": "ZAR"
}