Decode QR

View as Markdown
Decodes a QR code string and returns a decode response with the fields needed for **getQuotation** and **executePayout**. **Flow:** 1. Authenticates the request and verifies `customer_id` exists under your account (registered via `registerCustomer`). 2. Derives routing hints from the QR, then **parses and enriches the QR string through country-appropriate local payment providers.** 3. Validates supported country/currency for the QR against your account configuration (`INVALID_COUNTRY_CODE`, `INVALID_CURRENCY` when not allowed). 4. Computes `is_dynamic` and `is_business` from provider QR metadata when available, otherwise from fallback rules on the decoded data. 5. Creates a **PENDING** transaction and returns `tx_id`. **Authentication:** - **REQUIRED**: Basic Auth: `Authorization: Basic base64(client_id:client_secret)`. - Body-based `client_id` / `client_secret` is deprecated and **not supported**. **Request body** - `qr_string` (string, **required**) - `customer_id` (string, **required**) - be provided in request body, - not contain `/`, - exist under your account's `registered_customers`, and - match the `customer_id` bound to the transaction. - `partner_transaction_id` (string, optional) - `payment_currency` (string, optional): ISO 4217. For **Indonesia**, required when currency cannot be resolved from the QR; otherwise **400** with `payment_currency is required for Indonesia QR decode (or provide a QR that includes currency)`. - `wallet_identifier` (string, optional): stored on the transaction when provided. **Response (200 JSON)** — curated public fields only (no internal `_`\-prefixed blobs). - `is_dynamic`, `is_business`, `amount`, `merchant`, `country`, `tx_id`, `currency`, `partner_transaction_id` (empty string if not sent) - `missing_fields` (optional): machine-readable schemas for required data not yet satisfied - `suggested_values` (optional): hints keyed by field paths for UI prefill - `sender` / `recipient` (optional): grouped echoes when meaningful after decode - When `amount` > **0** and pricing succeeds: `amount_usd`, `fee`, `percentage_fee`, `fixed_fee` (USD values rounded to **2** decimal places in JSON). `exchange_rate` is **not** returned here (use **getQuotation** / **executePayout** for rate details). **Bank terminology:** Prefer grouped `recipient.bank_no`; legacy flat keys are mapped internally. **Currency precision:** Decimal amounts follow the currency table in this collection overview. **Payout flow:** **decodeQr** → **getQuotation** (recommended when locking fees/amount) → **executePayout**. **Note:** Stored `qr_data` may include provider-internal fields; they are not returned on this endpoint.

Authentication

AuthorizationBasic

Basic Auth: base64(client_id:client_secret)

Request

This endpoint expects an object.
qr_stringstringRequired

EMV QR string, or for KE/TZ a numeric till/paybill number. Required unless routing supplies an alternative (see country_code + merchant_id for Africa manual decode).

customer_idstringRequired
partner_transaction_idstringOptional
payment_currencystringOptional
ISO 4217. Required for Indonesia when currency cannot be resolved from the QR.
wallet_identifierstringOptional
country_codestringOptional

ISO alpha-2 override. Required when QR is not EMV-parseable: BO, BR, PE (+ network), CO, or KE/TZ (+ merchant_id for Africa manual decode).

networkenumOptional
Required for Peru phone payments only.
Allowed values:
payment_destinationstringOptional

Alias for qr_string (LATAM manual destination flows).

merchant_idstringOptional

Till or paybill number for KE/TZ manual decode. May also be supplied via a numeric qr_string.

account_referencestringOptional

Paybill bill reference for KE/TZ when the merchant expects one.

Response

OK
is_dynamicboolean
is_businessboolean
amountdouble
merchantstring
merchant_idstring

Africa (KE/TZ) till or paybill number.

merchant_namestring

Africa (KE/TZ) verified merchant display name.

payment_typeenum

Africa (KE/TZ) payment destination type.

merchant_infoobject

Africa (KE/TZ) merchant metadata from manual decode.

countrystring
tx_idstring
currencystring
partner_transaction_idstring
amount_usddouble
feedouble
percentage_feedouble
fixed_feedouble
missing_fieldslist of maps from strings to any
suggested_valuesmap from strings to any
sendermap from strings to any
recipientmap from strings to any

Errors

400
Bad Request Error