Gift Card (Beta)
1 - Freeze Gift Card
1 | POST https://api.latipay.net/v2/gift-card/freeze |
- Request Parameters
Name | Type | Description | Optional |
---|---|---|---|
user_id | string | The Latipay user account which is using for processing the transactions. | N |
wallet_id | string | The wallet ID that using for online transactions. | N |
merchant_reference | string | A unique id identifying the redeeming order in Merchant’s system. |
N |
gift_card_code | string | A 12 digits code for identifying the gift card. | N |
currency | string | The currency code of the transaction. | Y |
amount | number | A decimal amount. | Y |
freeze_type | string | Set it as freeze means to freeze the gift card, while set it as unfreeze the request would unfreeze the gift card. |
N |
signature | string | The SHA-256 HMAC API signature. | N |
- 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) |
- Response
Name | Type | Description |
---|---|---|
code | number | Result Code of the request |
face_value | number | The value of the redeemming gift card. |
2 - Redeem Gift Card
1 | POST https://api.latipay.net/v2/gift-card/redeem |
- Request Parameters
Name | Type | Description | Optional |
---|---|---|---|
user_id | string | The Latipay user account which is using for processing the transactions. | N |
wallet_id | string | The wallet ID that using for online transactions. | N |
merchant_reference | string | A unique id identifying the order in Merchant’s system. |
N |
confirm_codes | string | A string of the frozon gift cards, seperated by , . |
N |
signature | string | The SHA-256 HMAC API signature. | N |
- Response
Name | Type | Description |
---|---|---|
code | number | Result Code of the request |
3 - Drawback Gift Card
1 | POST https://api.latipay.net/v2/gift-card/drawback |
- Request Parameters
Name | Type | Description | Optional |
---|---|---|---|
user_id | string | The Latipay user account which is using for processing the transactions. | N |
wallet_id | string | The wallet ID that using for online transactions. | N |
merchant_reference | string | A unique id identifying the redeeming order in Merchant’s system. |
N |
drawback_reference | string | A reference that can be added for the merchant’s intention | Y |
signature | string | The SHA-256 HMAC API signature. | N |
- Response
Name | Type | Description |
---|---|---|
code | number | Result Code of the request |