POS Integration Guide
POS Integration using QRCode
Introduction
Are you a merchant partner looking to integrate octifi in your Application/POS terminal?
Welcome
Integrate OctiFi by integrating a dynamic qrcode within your App.
Step 1: Create a dynamic qrcode by passing a bill {} to LatitudePay api (details below). Show the qrcode on your terminal.
Step 2: Customer scans the qrcode pay using octifi App

ο»Ώ
Step 3: If you need updates on the order use the status api (details below)
Staging vs Live Environment
- This document only covers the staging environment api's.
Authorization
- The api to create the dynamic qrcode requires an authorization key.
- Include the following header:
HTTP_AUTHORIZATION: Api-Key <your public key>
Apis
How to generate dynamic QRCode
- ParHTTP_AUTHORIZATIONameter namestringDescription
{
"metadata": {
"key1":"value1",
"key2":"value2"
},
"merchant": {
"merchant_id": "",
"store_id": "6",
"terminal_id": "7",
"public_key": "demo_hardcoded_public_key_btL7eqg9_fixed_my"
},
"bill": {
"merchant_order_id":"f0f73318-73d8-4df6-b801-0d0096da082b",
"display_name": "string",
"tax_amount": 0.0,
"total_amount": 100,
"currency": "MYR",
"reference_id": "string",
"pre_checkout_token": "string",
"type": "OFFLINE",
"version": "v2"
},
"customer": {
"phone_number": "+65599017300",
"email": "[email protected]"
}
}{
"status_code": 200,
"message": "Success",
"data": {
"qrcode": "https://lpaymys.page.link/bepv",
"qrcode_id": "e55014c5-9072-4035-a45d-9a1fa92a188b",
"app_payment_link": "https://lpaymys.page.link/bepv"
},
"errors": null,
"errors_code": ""
}{
"status_code": 400,
"message": "QR code not encoded !",
"data": {},
"errors": {
"bill": "total_amount"
},
"errors_code": "GENERIC_ERROR_CODE"
}Example Curl command
curl --location --request POST 'https://latitudepay.me/api/v2/partner/qrcode/' \
--header 'Authorization: Api-Key demo_hardcoded_public_key_btL7eqg9_fixed_my' \
--header 'Content-Type: application/json' \
--data-raw '{
"metadata": {
"key1":"value1",
"key2":"value2"
},
"merchant": {
"merchant_id": "",
"store_id": "string",
"terminal_id": "string",
"public_key": "demo_hardcoded_public_key_btL7eqg9_fixed_my"
},
"bill": {
"merchant_order_id": "67baeb37-904f-4bc8-9b31-61cf25f12c7e",
"display_name": "Macbook Pro 2020",
"tax_amount": 0.0,
"total_amount": 2400.99,
"currency": "MYR",
"reference_id": "string",
"pre_checkout_token": "string",
"type": "OFFLINE",
"version": "v2"
},
"customer": {
"phone_number": "+60599625033",
"email": "[email protected]"
}
}'Response:
- Note down the qrcode text (which is a deep link) to be shown as a Qrcode Text
2. Note down the qrcode_id which can be used next in the status api.
Status Api
We provide the status API as well to check the status of the QRCode above.
- ParameHTTP_AUTHORIZATIONter namestringrequiredDescription
{
"status_code": 200,
"message": "Success",
"data": {
"steps": {
"download": true,
"signup": true,
"profile": true,
"order": true,
"payment": true
},
"qr_details": {
"bill": {
"type": "OFFLINE",
"version": "v2",
"currency": "MYR",
"tax_amount": 0.0,
"display_name": "Macbook Pro 2020",
"reference_id": null,
"total_amount": 2400.99,
"merchant_order_id": "1f25097d-75af-4ec7-bb57-cffc4d7e305d",
"pre_checkout_token": "99206615-0495-4a94-937f-575f7e265e47"
},
"customer": {
"email": "[email protected]",
"phone_number": ""
},
"merchant": {
"store_id": null,
"public_key": "demo_hardcoded_public_key_btL7eqg9_fixed_my",
"merchant_id": 912,
"terminal_id": null,
"merchant_user": "USER-bpy-lzs-316",
"merchant_user_id": 3083
},
"metadata": {}
},
"result": {
"merchant_order_id": "1f25097d-75af-4ec7-bb57-cffc4d7e305d",
"checkout_token": "b61c6a1b-f7c2-42ea-b6d1-03c268798f1b",
"statuscode": 200
},
"status": "SUCCESS"
},
"errors": null,
"errors_code": ""
}{
}Result:
Keep calling the /status api until status changes to "SUCCESS".
These are valid values for status:
- PENDING : meaning order is still pending customer payment
- SUCCESS : customer payment is complete
- FAILED : customer payment is failed.
Timeout in status
- We recommend that you keep calling the status api with 5second delay for upto 10mins to 15mins (until customer has made the final payment).
ο»Ώ
WebHooks
ο»Ώ