canonical: https://jentic.com/apis/onebrick.io/onebrick

# OneBrick Payment API

OneBrick provides Indonesian financial infrastructure for disbursements, virtual accounts, QRIS, e-wallet payments, and bank account validation. The API issues OAuth-style access tokens, retrieves account balance, lists top-up bank options, and creates standard or BIFAST disbursements to local bank accounts. It also generates open and closed virtual accounts, dynamic QRIS codes, e-wallet payment requests, hosted checkout sessions, and B2C subaccounts for ledger isolation.

## For AI agents

Disburse funds to Indonesian bank accounts, generate virtual accounts and QRIS codes, accept e-wallet payments, and validate bank accounts via the OneBrick payment platform.

## Scope

Does not handle accounting, KYC document review, or general-purpose card processing outside Indonesia - use for Indonesian disbursements, virtual accounts, QRIS, and e-wallet payments only.

## Capabilities

- Generate access tokens for authenticated payment operations
- Disburse funds to Indonesian bank accounts via standard and BIFAST rails
- Validate bank account ownership before triggering a disbursement
- Create open and closed virtual accounts for incoming payments
- Generate dynamic QRIS codes for in-person and online QR payments
- Accept e-wallet payments and create hosted checkout sessions
- Create B2C subaccounts to isolate balances and ledgers per end user

## Use cases

### Marketplace Payouts to Indonesian Sellers

Disburse seller earnings to local bank accounts using OneBrick's BIFAST and standard disbursement rails. POST /bifast-disbursements supports near-real-time settlement, while GET /bank-account-validation confirms ownership before transfer to reduce failed payouts. GET `/disbursements/{disbursementId}` returns settlement status for ledger reconciliation.

Example prompt: Validate bank account 1234567890 at BCA, then create a BIFAST disbursement of 250000 IDR with reference 'payout-2026-06-order-9876'.

### QRIS and E-Wallet Acceptance

Accept Indonesian payments via QRIS QR codes and major e-wallets without integrating each rail individually. POST /generate-dynamic-qris returns a single-use QR string for the cart total; POST /create-payment-ewallet routes to wallets such as OVO, DANA, and ShopeePay through one endpoint.

Example prompt: Generate a dynamic QRIS code for an order of 75000 IDR with merchant reference 'order-12345' and a 15-minute expiry.

### Virtual Account Collection

Issue per-customer virtual accounts so each incoming bank transfer is automatically reconciled to the right buyer or invoice. POST /generate-open-va creates a reusable open virtual account; POST /generate-closed-va creates a single-use account fixed to a specific amount.

Example prompt: Create a closed virtual account for buyer 'cust-2026-001' fixed to 199000 IDR for invoice INV-998.

### Agent-Run Disbursements via Jentic

Finance agents validate accounts and trigger disbursements through Jentic without ever holding the OneBrick bearer token. The agent searches for the disbursement intent, loads the schema, and executes the call with structured parameters from upstream tooling.

Example prompt: Use Jentic search 'create onebrick disbursement' to locate POST /disbursements, load its schema, and execute the disbursement with verified bank details.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/auth/token` | Generate a public access token |
| POST | `/disbursements` | Create a disbursement |
| POST | `/bifast-disbursements` | Create a BIFAST disbursement |
| GET | `/bank-account-validation` | Validate an Indonesian bank account |
| POST | `/generate-open-va` | Create an open virtual account |
| POST | `/generate-dynamic-qris` | Create a dynamic QRIS code |
| POST | `/create-payment-ewallet` | Create an e-wallet payment |
| GET | `/balance` | Get the current account balance |

## Key resources

- **Authentication** — Generate public access tokens via POST `/auth/token`
- **Disbursement** — Standard and BIFAST disbursements with status retrieval
- **Virtual Account** — Open and closed virtual account creation for incoming payments
- **QRIS** — Dynamic QRIS code generation for QR-based payments
- **E-Wallet** — Routing payments to Indonesian e-wallet providers
- **Subaccount** — B2C subaccount creation for per-user ledger isolation

## Why Jentic

- **Setup:** Wiring the OneBrick Payment API by hand means exchanging client credentials at `/auth/token` for a bearer token, refreshing it, and building each Indonesian disbursement, virtual account, and QRIS call against the OneBrick host yourself. Through Jentic you install once, import the OneBrick Payment API from the API Directory, store the client credentials once, and your agent calls it.
- **Permission scoping:** OneBrick takes its disbursement, virtual account, and e-wallet targets in the request body rather than the URL path, so you limit the agent to the operations it needs, such as validating a bank account or checking balance. Money-moving operations like disbursements or bifast-disbursements are excluded unless you add them to the allowed set.
- **Credential handling:** Your OneBrick client secret and bearer token are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'disburse funds to an indonesian bank account' or 'generate a QRIS code', and Jentic returns the matching OneBrick operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Stripe API** — Stripe offers global payment acceptance and payouts but lacks native Indonesian rails like QRIS and BIFAST.
- **Paystack API** — Paystack covers similar local payment rails for African markets.
- **Plaid API** — Plaid provides bank account data and verification, useful when expanding the same product into other regions.

## FAQ

### What authentication does the OneBrick Payment API use?

The API uses HTTP bearer tokens. Call POST `/auth/token` to mint a public access token, then send it in the Authorization header. Through Jentic the secret credentials live in the encrypted vault and the agent only handles a scoped reference.

### Can I disburse funds to Indonesian bank accounts with OneBrick?

Yes. POST /disbursements creates a standard disbursement and POST /bifast-disbursements uses the BIFAST rail for near-real-time settlement. Validate the destination first with GET /bank-account-validation to reduce failed payouts.

### Does the OneBrick API support QRIS payments?

Yes. POST /generate-dynamic-qris returns a single-use QR string for a specified amount. The QR can be displayed in checkout flows or printed for in-person collection.

### How do I check the status of a disbursement?

GET `/disbursements/{disbursementId}` returns the current status of a previously submitted disbursement. Use this for reconciliation against your internal ledger or in webhook-style polling loops.

### What are the rate limits for the OneBrick Payment API?

Rate limits are not declared in the OpenAPI spec. Consult onebrick.readme.io for the current sandbox and production tier limits before scaling traffic.

### How do I generate an access token through Jentic?

Search Jentic for 'onebrick generate token', load the POST `/auth/token` schema, and execute with the client credentials stored in your Jentic One instance. Subsequent operations reuse the returned bearer token automatically.

### Can I limit what my agent is allowed to do with the OneBrick Payment API?

Yes. Because you self-host Jentic One, your own rules decide which OneBrick operations the agent may call and which stored credentials it may use. You can allow read-only or non-moving calls such as GET /balance and GET /bank-account-validation while excluding money-moving operations like POST /disbursements and POST /bifast-disbursements from the allowed set. OneBrick takes its disbursement, virtual account, and e-wallet targets in the request body rather than the URL path, so you scope access at the operation level rather than by path pattern.
