> ## Documentation Index
> Fetch the complete documentation index at: https://developers.uqpay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Static QR codes

> Create reusable payment QR codes, retrieve their payloads, and reconcile payments through acquiring webhooks.

A static QR code lets you display a reusable payment code at a store or checkout. You can set a fixed amount or let the payer enter an amount. Each payment is tracked separately through PaymentIntent and PaymentAttempt resources.

## Before you begin

Use an API credential and a valid [access token](https://developers.uqpay.com/account-center/v1.6/api-reference/access-token.md). Send `x-client-id` and `x-auth-token` with each request.

If you manage a connected sub-account, use `x-on-behalf-of` to select the authorized sub-account. Use the same target account when creating, retrieving, listing, or updating a code. Omitting the header uses the account associated with your credential.

## Check available options

Call [Get static QR options](https://developers.uqpay.com/global-acquiring/v1.6/api-reference/get-static-qr-options.md) for the target account. Review `eligible` and `ineligible_reasons` alongside the setup requirements of your selected methods. Inclusion in `payment_methods` does not establish that channel configuration is complete. Missing configuration for one method does not necessarily prevent creation with another method. The create response determines whether your specific request is accepted. Contact UQPAY support for configuration assistance.

Choose payment methods and a currency from the returned `payment_methods` and `currencies`. Available options depend on the target account; a method listed for another account does not establish availability for yours.

## Create a code

Call [Create a static QR code](https://developers.uqpay.com/global-acquiring/v1.6/api-reference/create-static-qr-code.md) with the selected payment methods, currency, and amount mode. Use a new `x-idempotency-key` for each new creation; retry the same request with the same key after an uncertain response. Reusing a key with different parameters returns HTTP 409.

| Amount mode | How the payer enters the amount |
| - | - |
| `FIXED` | Supply a positive `amount` string in major currency units with exactly two decimal places. |
| `DYNAMIC` | The payer enters the amount. Omit `amount` entirely from the create request. |

`DYNAMIC` describes the amount mode of the static code; it does not mean you must generate a new QR code for every payment. Do not send `null`, an empty string, or `"0.00"` as `amount` in this mode.

You can provide a store name and a custom `code_no`. If omitted or empty, the store name defaults to the target account name and a code number is generated. A new custom code number has at most 10 ASCII letters or digits; `options` and `requests` are reserved. Treat `code_no` as a case-sensitive string and preserve leading zeros. Store names have a 25-byte limit. Optional text fields do not accept `null`.

Use `extension` for your own reference information. It is not encoded into the QR payment parameters.

## Retrieve and display the code

Save the returned `code_no`. A create response with `status: INITIATED` means that creation has started; it does not mean that the code is ready for display or that a customer has paid.

Use [Retrieve a static QR code](https://developers.uqpay.com/global-acquiring/v1.6/api-reference/retrieve-static-qr-code.md) to check the resource. Use [Retrieve static QR code details](https://developers.uqpay.com/global-acquiring/v1.6/api-reference/retrieve-static-qr-code-details.md) to obtain `qr_payload`. While creation is `INITIATED`, details may return 404; wait and retry instead of creating another code. Set a retry limit and contact UQPAY support if the code does not become ready. Display the QR code only after creation succeeds and the payload is available. Encode the returned payload unchanged with your QR rendering library.

The static code's `SUCCEEDED` status describes code creation. Use payment notifications to determine whether a particular payment succeeded.

## Receive and reconcile payments

Configure [PaymentIntent Result](https://developers.uqpay.com/global-acquiring/v1.6/webhooks/paymentintent-result.md) and [PaymentAttempt Result](https://developers.uqpay.com/global-acquiring/v1.6/webhooks/paymentattempt-result.md) notifications. Static QR payments use these acquiring events.

Identify the transaction account with `data.account_id`, associate it with a static code using the code number, and track each payment with `data.payment_intent_id` and `data.payment_attempt_id` (in PaymentAttempt notifications). A code number can be reused across payments and must not replace a payment identifier.

In the table, `<method>` is the payment-method details object named by `data.payment_method.type`, such as `paynow`. Static QR association fields are returned only when the transaction contains that information.

| Static QR field or configuration | Webhook field | Reconciliation meaning |
| - | - | - |
| `extension` | `data.payment_method.<method>.static_qrcode_extension` | Your store or business reference information; not `data.metadata` or a merchant order ID. |
| `code_no` | `data.payment_method.<method>.static_qrcode_number_plate` | The code number associated with this payment; preserve case and leading zeros. |
| Detail response `qr_payload` | `data.payment_method.<method>.static_qrcode` | The static QR payload associated with this payment. |
| `payment_methods` | `data.payment_method.type` and its details object | The single method used for this transaction, not the array supplied at creation. |
| `currency`, `amount` | `data.currency`, `data.amount` | Reconcile using the transaction currency and amount; a DYNAMIC code's `amount: null` is not a transaction amount. |
| Target account | `data.account_id` | The transaction account; combine it with the code number to identify the business association. |

Amount mode, store name, city, code creation status, and code creation time describe the static QR resource. Do not treat them as same-named payment notification fields. Notification timestamps and statuses describe the transaction.

See the static QR payment example in [PaymentIntent Result](https://developers.uqpay.com/global-acquiring/v1.6/webhooks/paymentintent-result.md) for the notification structure. A failed PaymentAttempt alone does not establish that its PaymentIntent has failed.

## Find codes and update reference information

Use [List static QR codes](https://developers.uqpay.com/global-acquiring/v1.6/api-reference/list-static-qr-codes.md) to search within the target account. Filters include code number, currency, payment method, and creation time. Preserve leading zeros when filtering by `code_no`. The list returns items in `data`, the total number of matching codes in `total_items`, and the total number of pages in `total_pages`. Request the next page while `page_number` is less than `total_pages`.

Supply both `create_start_time` and `create_end_time` in `YYYY-MM-DDTHH:mm:ss+08:00` format when filtering by time. Start must be earlier than end, with a maximum range of 30 days. Encode the plus sign in query strings as `%2B`.

Use [Update static QR code extension](https://developers.uqpay.com/global-acquiring/v1.6/api-reference/update-static-qr-code-extension.md) to change `extension`. The limit is 512 characters. An empty string clears the value; `null` is not accepted. An idempotency key is not required and does not replay an earlier update. This operation updates reference information; it does not change the code's payment methods, currency, amount mode, or amount.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.