Routing Rules
This is one of the core strengths of Gerbang Pay as a Payment Orchestrator. The Routing Rules feature allows you to configure which payment methods should be handled by which provider, without needing to change a single line of your source code.
Example use cases:
- BCA Virtual Account payments are routed to Winpay.
- GoPay E-Wallet payments are routed to Midtrans.
Creating a New Rule
- Navigate to Integration > Routing Rules.
- Click Add New Rule.
- Configure the following three settings:
- Method Type: Select the payment type (e.g.,
Virtual Account). - Channel: Select the specific bank or channel (e.g.,
BCA). - Target Provider: Select the executing provider (e.g.,
Winpay).
- Method Type: Select the payment type (e.g.,
- Click Save.

Instant Effect
Every change in Routing Rules is instantly synchronized in the Gerbang Pay cache system. As soon as you click Save, the next POST /v1/payments/create API request will immediately follow your latest routing rules.
If a payment method hasn't been defined in your Routing Rules, and a client attempts to create a payment with that method, the system will reject it with a 400 PAYMENT_METHOD_UNAVAILABLE HTTP error.