Skip to main content

Payment

Responsible for payments. Payment methods are a driver registry — PaymentMethodEnum × config('payment.drivers') — with eight drivers today: manual, stripe, paypal, adyen, mercadopago, nowpayments (crypto), checkoutcom, and razorpay. The end-to-end payment sequence is documented in Payment flow.

Tables​

TableDescription
payment_paymentsPayments (amount and currency snapshotted from the order)
payment_methodsPer-method admin state (is_active, sort_order); credentials stay in env

A method is offered to customers only when its driver is registered, its credentials are configured, and an admin has activated it — GET /payment/user/methods returns exactly that set and the choice is re-checked when a payment starts. New gateways appear in the admin list disabled until switched on.

Endpoints​

EndpointAudiencePurpose
GET /payment/user/methodsUserOfferable payment methods (registered, configured and active)
POST /payment/user/processUserStart a payment for an order_code
POST /payment/webhook/{driver}WebhookGateway callback; signature-verified, idempotent settlement
GET /payment/admin/methodsAdminList methods with computed is_configured / is_registered
PATCH /payment/admin/methods/{id}AdminActivate/deactivate a method and set its sort_order
GET /payment/admin/paymentsAdminFilter (status/method/order/transaction) and sort the payments list
PATCH /payment/admin/payments/{id}AdminSettle a pending payment (confirm/fail) — the manual driver's path

Events emitted​

EventWhen
PaymentInitiatedEventA payment is initiated
PaymentSucceededEventA payment succeeds
PaymentFailedEventA payment fails

Dependencies​

ModuleReason
CorePayment event contracts and currency facts
OrderOrder lookup and markAsPaid on settlement