Skip to content

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 ​

  1. Navigate to Integration > Routing Rules.
  2. Click Add New Rule.
  3. 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).
  4. Click Save.

Routing Rules Placeholder

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.

Gerbang Pay API Documentation