Open source payment router

Route payments from a CLI your systems can trust.

Rute Bayar connects Indonesian payment gateways through one Go CLI and webhook daemon. It keeps provider logic modular, stores raw JSON for debugging, and gives product teams a clean path from invoice to webhook verification.

Rute Bayar - Payment Router for Indonesian Payment Gateway | Product Hunt
create invoice
$ rutebayar pay create --provider xendit \
  --method payment_link \
  --reference agent-run-1001 \
  --amount 25000

payment_url: https://checkout.example/...
status: pending
webhook daemon
$ rutebayar webhook serve --addr :8080
listening on /webhooks/xendit
listening on /webhooks/midtrans
forwarding enabled: orders-api
Live: Xendit Live: Midtrans Released: Doku Released: iPaymu* Roadmap: Flip Business Roadmap: Duitku

Available payment gateways

Providers already supported by Rute Bayar.

These logo/wordmark cards represent active gateways that already have Rute Bayar adapters. Refund behavior still follows each provider's capability.

Raw API mode

Call official provider APIs directly when needed.

This path is for experimentation and quick debugging: use operation aliases or raw paths, still powered by the same onboarded credentials.

api mode
$ rutebayar api midtrans --operation status --path-param order_id=rb-001
HTTP/2 200
transaction_status: settle

$ rutebayar api xendit --operation auth-balance
HTTP/2 200
message: Success

$ rutebayar api doku --operation order-status --path-param invoice_number_or_request_id=RB-INV-001
HTTP/2 200
transaction.status: SUCCESS

Payment rail clarity

One operational line between your product and many providers.

Rute Bayar keeps your business logic away from provider-specific details. Create payments, check status, receive webhooks, replay events, and forward callbacks without scattering gateway code across every service.

CLI-first onboarding

Set provider credentials, test accounts, create payments, request refunds for providers that support them, and inspect status from the same command surface.
*iPaymu refunds are not available yet because the public iPaymu API v2 does not expose an official verified refund endpoint.

Webhook daemon

Receive provider callbacks, verify signatures where configured, persist raw payloads, and replay events for recovery.

Pass-through forwarding

Forward provider webhooks to your own service while keeping the original payload available for audit and debugging.

AI Agent billing

Let agents create invoices and verify payments without embedding gateway code.

An AI Agent can call `rutebayar` to create a dynamic invoice, store its own run reference, check payment status, and react to verified webhooks. The CLI becomes a narrow, inspectable tool boundary between automation and money movement.

agent tool call
$ rutebayar pay status --provider xendit --reference agent-run-1001
reference: agent-run-1001
provider: xendit
status: paid

$ rutebayar reconcile --provider xendit --reference agent-run-1001
local status is in sync

Install

Start with the fast installer.

The shortest path uses the installer script. Homebrew, Go install, and manual binaries are covered on the install options page.

quick install
$ curl -fsSL https://raw.githubusercontent.com/pendig/rute-bayar/main/scripts/install.sh | bash
$ rutebayar version

$ rutebayar provider list
$ rutebayar onboard xendit --environment sandbox