Getting Started
POS Integration Guide
11 min
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 please refer to sandbox and live environment https //docs sg latitudepay com/sandbox and live environment for production env urls authorization the api to create the dynamic qrcode requires an authorization key create authorization key from merchant console following https //docs sg latitudepay com/integration prerequisite#f9 get your merchant keys include the following header http authorization api key \<your public key> apis how to generate dynamic qrcode tab examples url https latitudepay me api v2 partner qrcode name create qrcode method post request pathparameters queryparameters headerparameters kind optional name parhttp authorizationameter name type string description the public key bodydataparameters formdataparameters results languages id zfefih0rcmhpsec0 6usf code n status code 200 n message success n data n qrcode https lpaymys page link bepv n qrcode id e55014c5 9072 4035 a45d 9a1fa92a188b n app payment link https lpaymys page link bepv n n errors null n errors code n language 200 customlabel id l78t3tkz 69aiv cgpabd code n status code 400 n message qr code not encoded ! n data n errors n bill total amount n n errors code generic error code n language 404 customlabel selectedlanguageid zfefih0rcmhpsec0 6usf examples languages id giyaslagx9walmwwsp5sg code n metadata n key1 value1 n key2 value2 n n merchant n merchant id n store id 6 n terminal id 7 n public key demo hardcoded public key btl7eqg9 fixed my n n bill n merchant order id f0f73318 73d8 4df6 b801 0d0096da082b n display name string n tax amount 0 0 n total amount 100 n currency myr n reference id string n pre checkout token string n type offline n version v2 n n customer n phone number 65599017300 n email cx 552952 t com n n language json customlabel body selectedlanguageid giyaslagx9walmwwsp5sg description create a qrcode via this api currentnewparameter label body parameter value bodydataparameters 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" "joedoe\@123fakestreet com" } }' 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 tab examples url https latitudepay me api v1 partner qrcode status qrcode id name status api method get request pathparameters queryparameters headerparameters kind required name paramehttp authorizationter name type string description your public api end point bodydataparameters formdataparameters results languages id wddh5xvap36zq3dy2qt9s code n status code 200 n message success n data n steps n download true n signup true n profile true n order true n payment true n n qr details n bill n type offline n version v2 n currency myr n tax amount 0 0 n display name macbook pro 2020 n reference id null n total amount 2400 99 n merchant order id 1f25097d 75af 4ec7 bb57 cffc4d7e305d n pre checkout token 99206615 0495 4a94 937f 575f7e265e47 n n customer n email joedoe 123fakestreet com n phone number n n merchant n store id null n public key demo hardcoded public key btl7eqg9 fixed my n merchant id 912 n terminal id null n merchant user user bpy lzs 316 n merchant user id 3083 n n metadata n n result n merchant order id 1f25097d 75af 4ec7 bb57 cffc4d7e305d n checkout token b61c6a1b f7c2 42ea b6d1 03c268798f1b n statuscode 200 n n status success n n errors null n errors code n language 200 customlabel id 2fwxw1u0ku9wkn6f8kb2o code n n language 404 customlabel selectedlanguageid wddh5xvap36zq3dy2qt9s examples languages id a3 s2a8v7xsnmh3fhpmup code language none customlabel id akebxd4ocvh 2 lfc9gld code language curl customlabel selectedlanguageid akebxd4ocvh 2 lfc9gld description get status of the qrcode qrcode id generated above currentnewparameter label header parameter value headerparameters 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