Barcode Payment
Tips: Get your Wallet ID, User ID and API key via Latipay Merchant Portal > WALLETS > ACTION(on the right side of the corresponding wallet) > Settings > Integration parameters
Tips: Create a minimum amount product (e.g. $ 0.01 NZD/AUD) for testing.
How it works?

Payment Scenarios
Alipay
WeChat Pay
API Details
1 - Latipay Transaction Interface
1 | POST https://api.latipay.net/barcode |
Demo
1 | curl \ |
- Parameters
| Name | Type | Description | Optional |
|---|---|---|---|
| user_id | String | The Latipay user account which is using for processing the transactions. | NO |
| wallet_id | String | The wallet ID that using for online transactions. | NO |
| amount | String | A decimal amount. | NO |
| merchant_reference | String | A unique id identifying the order in Merchant’s system. |
NO |
| pay_code | String | Customer’s payment code which displayed in Wechat app or Alipay app. | NO |
| signature | String | The SHA-256 HMAC API signature. |
NO |
Example
1 | { |
- SHA-256 HMAC Signature Try your signature online
Rearrange all parameters alphabetically (except parameters with value of null or empty string) and join them with &, and concat the value of api_key in the end.
JS code example:
1 | Object.keys(data) |
Example
1 | Message: amount=0.05&pay_code=134588558514585062&user_id=U00001534&wallet_id=W00000001111222333 |
- Response
1 | { |
| Name | Type | Description |
|---|---|---|
| order_id | String | A unique transaction identifier generated by Latipay. |
2 - Payment Result Interface
All customers can send requests to query payment status with merchant order id(that should be unique id for the merchant) as merchant_reference by HTTP GET request.
1 | GET https://api.latipay.net/v2/transaction/{merchant_reference} |
Parameters
| Name | Type | Description | Optional |
|---|---|---|---|
| merchant_reference | String | A unique id identifying the order in Merchant’s system. |
NO |
| user_id | String | The user account you want to use to process the transaction. | NO |
| is_block | Int | Optional parameter, 1 means the http request use long poolling mechanism, the timeout is 180s. |
YES |
| signature | String | The SHA-256 HMAC API signature. |
NO |
- SHA-256 HMAC Signature Try your signature online
Rearrange all parameters alphabetically (except parameters with value of null or empty string) and join them with &, and concat the value of api_key in the end.
JS code example:
1 | Object.keys(data) |
1 | Message: merchant_reference=6000324&user_id=U000000013111222333 |
Example
1 | GET https://api.latipay.net/v2/transaction/6000324?user_id=U000000013&signature=58f93f458880120d650611f2452917a25a39edc2f5e3a03baac73a7a49bc81f4 |
Response
| Name | Type | Description |
|---|---|---|
| merchant_reference | String | A unique id identifying the order in Merchant’s system. |
| currency | String | The currency code of the transaction. |
| amount | Number | A decimal amount. |
| payment_method | String | The payment method used. Possible values are alipay and wechat. |
| status | String | The status of the transaction. Possible values are: pending, paid, or failed. |
| pay_time | String | Show the payment time of the transaction order. UTC/GMT+08:00 |
| order_id | String | A unique transaction identifier generated by Latipay. |
| signature | String | The SHA-256 HMAC API signature. |
Example Response
1 | { |
Signature in Response
For security reasons, we highly recommend you verify the signature in the response.
1 | message: merchant_reference + payment_method + status + currency + amount |
Example Signature
1 | message: 6000324alipaypaidNZD120.00 |