Atome QR
Topics covered on this page
Accept online payments from Atome users through your website using the Atome QR payment method.
Atome is a buy now, pay later (BNPL) service that lets customers split a purchase into installments. This document covers the in-person, offline QR-code checkout flow. For the online redirect flow, see Atome.
This guide walks you through the payment flow and details how to implement it.
ð How to enable
- Supported Countries: Thailand, Singapore, Malaysia
- Minimum API version:
2017-11-02
To enable Atome QR, send an email requesting this feature to support@omise.co. You will need to review and accept new terms and conditions.
ðģ Payment flow
Customers paying via Atome QR go through an offline payment flow. As a result, once the charge is created, it can only be authorized offline
: the customer must scan the generated QR code with the Atome app on their phone to complete the flow.
After the customer selects Atome QR as their preferred payment method, your site should generate the Atome QR code. The customer must scan it to complete the payment.
Using a POS device

âķ The merchant shows the QR code on their POS device. â· The customer scans the code using their Atome app. âļ The customer confirms the purchase through the app. âđ Once the merchant receives a webhook completion event, they confirm the payment with the customer.
ð ïļ Implementation
To create a charge using Atome QR, make the following API requests.
- Create a payment source (
type:atome_qr) using Omise.js or one of the mobile SDKs (iOS and Android). - Create a charge using the identifier of the source created in Step 1.
- After receiving the charge completion webhook event, retrieve the charge to verify its status (optional, but recommended).
Use your public key to create the Atome QR source on the client (a customer's browser or mobile phone). Use your secret key to create the Atome QR charge on the server.
ðĄ Tip: If both the creation and charge of a source must happen server-side, you can create and charge the source in a single API request using your secret key.
Creating an Atome QR source
When the customer confirms that they wish to pay with this payment method, create a source specifying the amount, currency, and type.
| Parameter | Type | Description |
|---|---|---|
amount |
integer | (required) Amount in subunits of source currency |
currency |
string | (required) Currency for source as three-letter ISO 4217 code (THB for Thailand, SGD for Singapore, MYR for Malaysia) |
type |
string | (required) Payment source type atome_qr |
phone_number |
string | (optional) Customer mobile number with a country code (example: +66876543210) |
items |
Item | (optional) Details of item |
shipping |
Address | (optional) Shipping address |
name |
string | (optional) Customer name |
email |
string | (optional) Customer email |
billing |
Address | (optional) Billing address |
The following examples demonstrate the creation of a new Atome QR source for āļŋ500. Replace the omise_public_key and $OMISE_PUBLIC_KEY variables with the test public key on your dashboard.
âđïļ Note: Using Omise.js, the type parameter is supplied as the first argument to the createSource method.
Omise.setPublicKey(omise_public_key);
Omise.createSource('atome_qr', {
"amount": 50000,
"currency": "THB",
}, function(statusCode, response) {
console.log(response)
});
For testing, you can create the same request using curl.
curl https://api.omise.co/sources \
-u $OMISE_PUBLIC_KEY: \
-d "amount=50000" \
-d "currency=THB" \
-d "type=atome_qr"
{
"object": "source",
"id": "src_test_5ug0fx8sn9xw75uf0h4",
"livemode": false,
"location": "/sources/src_test_5ug0fx8sn9xw75uf0h4",
"amount": 50000,
"barcode": null,
"bank": null,
"created_at": "2023-01-12T10:40:54Z",
"currency": "THB",
"email": null,
"flow": "offline",
"installment_term": null,
"absorption_type": null,
"name": null,
"mobile_number": null,
"phone_number": null,
"platform_type": null,
"scannable_code": null,
"billing": null,
"shipping": null,
"items": [],
"references": null,
"store_id": null,
"store_name": null,
"terminal_id": null,
"type": "atome_qr",
"zero_interest_installments": null,
"charge_status": "unknown",
"receipt_amount": null,
"discounts": []
}
The id attribute is the source identifier (begins with src).
Creating an Atome QR charge
Create a charge specifying the parameters source, amount, and currency.
sourcespecifies the source identifier.amountandcurrencymust match the source'samountandcurrency.
The following example demonstrates how to create a charge using curl.
Replace $OMISE_SECRET_KEY with the test secret key on your dashboard.
Replace $SOURCE_ID with the id of the source.
curl https://api.omise.co/charges \
-u $OMISE_SECRET_KEY: \
-d "amount=50000" \
-d "currency=THB" \
-d "source=$SOURCE_ID"
{
"object": "charge",
"id": "chrg_test_5ug0fxc8vlqb5zg9g4p",
"location": "/charges/chrg_test_5ug0fxc8vlqb5zg9g4p",
"amount": 50000,
"net": 48047,
"fee": 1825,
"fee_vat": 128,
"interest": 0,
"interest_vat": 0,
"funding_amount": 50000,
"refunded_amount": 0,
"transaction_fees": {
"fee_flat": "0.0",
"fee_rate": "3.65",
"vat_rate": "7.0"
},
"platform_fee": {
"fixed": null,
"amount": null,
"percentage": null
},
"currency": "THB",
"funding_currency": "THB",
"ip": null,
"refunds": {
"object": "list",
"data": [],
"limit": 20,
"offset": 0,
"total": 0,
"location": "/charges/chrg_test_5ug0fxc8vlqb5zg9g4p/refunds",
"order": "chronological",
"from": "1970-01-01T00:00:00Z",
"to": "2023-01-12T10:40:56Z"
},
"link": null,
"description": null,
"metadata": {},
"card": null,
"source": {
"object": "source",
"id": "src_test_5ug0fx8sn9xw75uf0h4",
"livemode": false,
"location": "/sources/src_test_5ug0fx8sn9xw75uf0h4",
"amount": 50000,
"barcode": null,
"bank": null,
"created_at": "2023-01-12T10:40:54Z",
"currency": "THB",
"email": null,
"flow": "offline",
"installment_term": null,
"absorption_type": null,
"name": null,
"mobile_number": null,
"phone_number": null,
"platform_type": null,
"scannable_code": {
"object": "barcode",
"type": "qr",
"image": {
"object": "document",
"livemode": false,
"id": "docu_test_5ug0fxibl7d1ee5hqj8",
"deleted": false,
"filename": "qrcode.jpg",
"location": "/charges/chrg_test_5ug0fxc8vlqb5zg9g4p/documents/docu_test_5ug0fxibl7d1ee5hqj8",
"kind": "qr",
"download_uri": "https://api.omise.co/charges/chrg_test_5ug0fxc8vlqb5zg9g4p/documents/docu_test_5ug0fxibl7d1ee5hqj8/downloads/679C6686556F8F0A",
"created_at": "2023-01-12T10:40:55Z"
}
},
"billing": null,
"shipping": null,
"items": [],
"references": null,
"store_id": null,
"store_name": null,
"terminal_id": null,
"type": "atome_qr",
"zero_interest_installments": null,
"charge_status": "pending",
"receipt_amount": null,
"discounts": []
},
"schedule": null,
"customer": null,
"dispute": null,
"transaction": null,
"failure_code": null,
"failure_message": null,
"status": "pending",
"authorize_uri": null,
"return_uri": null,
"created_at": "2023-01-12T10:40:55Z",
"paid_at": null,
"expires_at": "2023-01-12T22:40:55Z",
"expired_at": null,
"reversed_at": null,
"zero_interest_installments": true,
"branch": null,
"terminal": null,
"device": null,
"authorized": false,
"capturable": false,
"capture": true,
"disputable": false,
"livemode": false,
"refundable": false,
"reversed": false,
"reversible": false,
"voided": false,
"paid": false,
"expired": false
}
Creating an Atome QR source and charge
Alternatively, you can create and charge a source in a single API request.
curl https://api.omise.co/charges \
-u $OMISE_SECRET_KEY: \
-d "amount=50000" \
-d "currency=THB" \
-d "source[type]=atome_qr"
Setting an Atome QR code to expire
By default, the QR code expires 12 hours after creation.
You can assign different expiration periods to each QR code by entering a timestamp between 30 seconds and 12 hours from the current time in the expires_at field of the Charge API. If the timestamp is entered correctly, the QR code expires at the designated time instead of the default period.
After creating the charge, you can manually call the Expire API to expire a pending charge.
curl https://api.omise.co/charges \
-u $OMISE_SECRET_KEY: \
-d "amount=50000" \
-d "currency=THB" \
-d "source[type]=atome_qr" \
-d "expires_at=2020-12-17T00:00:00Z"
âđïļ Note: the expires_at value above is illustrative only. It must fall between 30 seconds and 12 hours from the actual time the charge is created, or the request is rejected.
Completing an Atome QR charge
You have created a new charge with its status set to pending.
Other possible values for charge status are successful, failed, and expired.
The following sections detail how to authorize a charge, receive its completion webhook event, and update its status.
This sequence diagram shows the entire flow.
Authorizing an Atome QR charge
Present the customer with a QR code generated at charge creation. The customer scans the QR code using their Atome app to authorize the charge.
You can simulate the authorization phase in test mode. Go to the charge on the dashboard, click Actions, and manually mark the charge as Successful or Failed.
Find the QR code nested within the charge object as follows:
charge:
source:
scannable_code:
image:
download_uri: QR code image to present to the customer
{
"object": "barcode",
"type": "qr",
"image": {
"object": "document",
"livemode": false,
"id": "docu_test_5ug0fxibl7d1ee5hqj8",
"deleted": false,
"filename": "qrcode.jpg",
"location": "/charges/chrg_test_5ug0fxc8vlqb5zg9g4p/documents/docu_test_5ug0fxibl7d1ee5hqj8",
"kind": "qr",
"download_uri": "https://api.omise.co/charges/chrg_test_5ug0fxc8vlqb5zg9g4p/documents/docu_test_5ug0fxibl7d1ee5hqj8/downloads/679C6686556F8F0A",
"created_at": "2023-01-12T10:40:55Z"
}
}
Receiving the Atome QR charge completion event
The best way to be notified of a charge completion is by using webhook events. Set up a location on your server to receive webhook events, and add this location as a webhook endpoint on the dashboard.
Once a charge is completed, a POST request with the charge response embedded is sent to this endpoint.
The key attribute for the event object contains charge.complete, and the data attribute contains the charge object.
See Events API for the event object structure.
Checking an Atome QR charge status
After receiving this event, retrieve the charge using its id and confirm that its status matches the status of the charge contained in the event.
If the value of status is successful, the payment succeeded.
If the value of status is failed, check the failure_code and failure_message in the charge object for an explanation.
Possible failure codes are listed as follows.
| Failure Code | Description |
|---|---|
payment_expired |
Payment expired. |
payment_rejected |
Payment rejected by the issuer. |
failed_processing |
General payment processing failure. |
ðļ Voids and refunds
Atome QR charges can be partially or fully refunded within 60 days of the transaction date.
ð Limits
Thailand
- Minimum:
2000(THB 20.00) - Maximum: Subject to the customer's individual Atome credit limit.
Singapore
- Minimum:
150(SGD 1.50) - Maximum:
300000(SGD 3,000.00)
Malaysia
- Minimum:
1000(MYR 10.00) - Maximum:
500000(MYR 5,000.00)
â FAQ
What's the difference between Atome and Atome QR?
Atome uses a redirect flow: the customer is sent to Atome's hosted checkout page to authorize the payment online. This document (Atome QR) uses an offline flow instead: your site generates a QR code, and the customer scans it with the Atome app (for example, at a POS device) to authorize the payment. Because it's offline, Atome QR charges have no authorize_uri or return_uri.
What happens if the customer doesn't scan the QR code before it expires?
The charge's status changes to expired and the QR code can no longer be used to authorize it. Create a new source and charge to generate a fresh QR code.
How do I test success or failure scenarios before going live?
In test mode, open the charge on the dashboard, click Actions, and manually mark it as Successful or Failed to simulate either outcome without a real Atome app.
Can I issue more than one partial refund within the 60-day window? This isn't specified in this document â confirm the supported refund pattern (single partial refund vs. multiple partial refunds up to the full amount) with the payments team before documenting it further.
Does Atome QR support recurring or scheduled payments? Not covered by this document. The flow described here is a one-time offline payment per charge; confirm with the payments team whether scheduled/recurring charges are supported for Atome QR specifically before advising merchants either way.
Do the minimum/maximum limits apply per charge or per customer? Not stated in this document. The Limits section gives per-country thresholds, but whether they're enforced per transaction or aggregated per customer isn't specified here â worth confirming and calling out explicitly if it's the latter, since that's a common merchant question.
ð Next steps
- Atome (online redirect checkout flow)
- Charge API
- Source API
- Webhooks API