HitPay’s Static QR feature enables businesses to create multiple “Static” QR codes that will facilitate QR payments. This solution is particularly beneficial for small and micro businesses, donation drives, and businesses with multiple locations.
A Static QR Code for payments contains fixed payment information, such as the merchant account or business name. Once generated, the code does not change and can be reused indefinitely by any number of customers.
Because the payment amount is not embedded in the QR code, customers must enter the correct amount during payment. Consider using Embedded QR codes for automated billing and precise transaction tracking.
Before integration, it’s essential to understand how Hitpay APIs are authenticated. Hitpay utilizes API keys to grant access to the API. You can locate this key in your dashboard under “API keys.”
Hitpay requires the API key to be included in all API requests to the server. This key should be placed in a header that follows the format shown below:
The response will include a qr_value object, which contains the data to be converted into a scannable QR code (qr_code).
{"id":"9eabab19-da42-4913-9644-2b3d8b55070e","name":"Static QR 2025-04-14T03:31:11.758Z","reference":"DICNSQRCM3EUHQAMQNX2","payment_provider":"dbs_sg","payment_provider_method":"paynow_online","payment_provider_method_logos":[{"sm":"https://api.hit-pay.com/icons/methods/sm/dbs_paylah.png","md":"https://api.hit-pay.com/icons/methods/md/dbs_paylah.png","lg":"https://api.hit-pay.com/icons/methods/lg/dbs_paylah.png","svg":"https://api.hit-pay.com/icons/methods/svg/dbs_paylah.svg","svg_square":"https://api.hit-pay.com/icons/methods/svg_square/dbs_paylah.svg","png_square":"https://api.hit-pay.com/icons/methods/png_square/dbs_paylah.png","method":"dbs_paylah","iconName":"dbs_paylah","displayName":"dbs_paylah"},{"sm":"https://api.hit-pay.com/icons/methods/sm/grabpay.png","md":"https://api.hit-pay.com/icons/methods/md/grabpay.png","lg":"https://api.hit-pay.com/icons/methods/lg/grabpay.png","svg":"https://api.hit-pay.com/icons/methods/svg/grabpay.svg","svg_square":"https://api.hit-pay.com/icons/methods/svg_square/grabpay.svg","png_square":"https://api.hit-pay.com/icons/methods/png_square/grabpay.png","method":"grabpay","iconName":"grabpay","displayName":"GrabPay"},{"sm":"https://api.hit-pay.com/icons/methods/sm/googlepay.png","md":"https://api.hit-pay.com/icons/methods/md/googlepay.png","lg":"https://api.hit-pay.com/icons/methods/lg/googlepay.png","svg":"https://api.hit-pay.com/icons/methods/svg/googlepay.svg","svg_square":"https://api.hit-pay.com/icons/methods/svg_square/googlepay.svg","png_square":"https://api.hit-pay.com/icons/methods/png_square/googlepay.png","method":"googlepay","iconName":"googlepay","displayName":"googlepay"},{"sm":"https://api.hit-pay.com/icons/methods/sm/dbs.png","md":"https://api.hit-pay.com/icons/methods/md/dbs.png","lg":"https://api.hit-pay.com/icons/methods/lg/dbs.png","svg":"https://api.hit-pay.com/icons/methods/svg/dbs.svg","svg_square":"https://api.hit-pay.com/icons/methods/svg_square/dbs.svg","png_square":"https://api.hit-pay.com/icons/methods/png_square/dbs.png","method":"dbs","iconName":"dbs","displayName":"dbs"},{"sm":"https://api.hit-pay.com/icons/methods/sm/uob.png","md":"https://api.hit-pay.com/icons/methods/md/uob.png","lg":"https://api.hit-pay.com/icons/methods/lg/uob.png","svg":"https://api.hit-pay.com/icons/methods/svg/uob.svg","svg_square":"https://api.hit-pay.com/icons/methods/svg_square/uob.svg","png_square":"https://api.hit-pay.com/icons/methods/png_square/uob.png","method":"uob","iconName":"uob","displayName":"uob"},{"sm":"https://api.hit-pay.com/icons/methods/sm/ocbc.png","md":"https://api.hit-pay.com/icons/methods/md/ocbc.png","lg":"https://api.hit-pay.com/icons/methods/lg/ocbc.png","svg":"https://api.hit-pay.com/icons/methods/svg/ocbc.svg","svg_square":"https://api.hit-pay.com/icons/methods/svg_square/ocbc.svg","png_square":"https://api.hit-pay.com/icons/methods/png_square/ocbc.png","method":"ocbc","iconName":"ocbc","displayName":"ocbc"},{"sm":"https://api.hit-pay.com/icons/methods/sm/citi.png","md":"https://api.hit-pay.com/icons/methods/md/citi.png","lg":"https://api.hit-pay.com/icons/methods/lg/citi.png","svg":"https://api.hit-pay.com/icons/methods/svg/citi.svg","svg_square":"https://api.hit-pay.com/icons/methods/svg_square/citi.svg","png_square":"https://api.hit-pay.com/icons/methods/png_square/citi.png","method":"citi","iconName":"citi","displayName":"citi"},{"sm":"https://api.hit-pay.com/icons/methods/sm/standard_chartered.png","md":"https://api.hit-pay.com/icons/methods/md/standard_chartered.png","lg":"https://api.hit-pay.com/icons/methods/lg/standard_chartered.png","svg":"https://api.hit-pay.com/icons/methods/svg/standard_chartered.svg","svg_square":"https://api.hit-pay.com/icons/methods/svg_square/standard_chartered.svg","png_square":"https://api.hit-pay.com/icons/methods/png_square/standard_chartered.png","method":"standard_chartered","iconName":"standard_chartered","displayName":"standard_chartered"}],"payment_provider_method_main_logo":{"sm":"https://api.hit-pay.com/icons/methods/sm/paynow.png","md":"https://api.hit-pay.com/icons/methods/md/paynow.png","lg":"https://api.hit-pay.com/icons/methods/lg/paynow.png","svg":"https://api.hit-pay.com/icons/methods/svg/paynow.svg","svg_square":"https://api.hit-pay.com/icons/methods/svg_square/paynow.svg","png_square":"https://api.hit-pay.com/icons/methods/png_square/paynow.png","method":"paynow_online","iconName":"paynow","displayName":"PayNow"},"created_by":{"id":"902ddc83-9b67-4dd3-9d84-0e6c0f69fa48","display_name":"Nitin","first_name":"Nitin","last_name":"Muthyala"},"location_id":null,"location":null,"device_id":null,"device":null,"qr_value":"00020101021226370009SG.PAYNOW010120210201605883W030115204000053037025802SG5912HitPay Store6009Singapore62240120DICNSQRCM3EUHQAMQNX263045585","created_at":"2025-04-14T11:31:11+08:00","updated_at":"2025-04-14T11:31:11+08:00"}
After the payment is processed, handle webhooks to receive payment notifications and manage server-client communication to update the payment status in your system.
Webhook is a POST request sent from HitPay’s server to your server about the payment confirmation. If you are using hitpay APIs to integrate into your e-commerce checkout you must mark your order as paid ONLY after the webhook is received and validated.
Exclude HMAC and Values: Remove the "hmac" key and its corresponding value from the extracted payload. For example:
Concatenation and Sorting: Concatenate the keys and values from the remaining key-value pairs without using "&" and "=", and arrange them in alphabetical order of the keys. For example:
Signature Generation: Use the HMAC-SHA256 algorithm along with the secret salt from your dashboard to generate a signature for the concatenated string. This signature will be unique to this payload.
Comparison and Validation: Compare the generated signature with the HMAC value present in the original payload, both values must match.
By following these steps, you can ensure the authenticity and integrity of the webhook payload received from HitPay. This process guarantees that the payload can be trusted and processed securely.