Recurring Payment
Request Base URL
Test Environment : https://gateway-test.luxtak.com
Prod Environment : https://gateway.luxtak.com
EndPoints
/trade/recurring
Request Header
| Content-Type* | string | application/json; chartset=UTF-8 |
| Authorization* | string | Basic Base($app_id:$security_key) |
Request Parameters (JSON format)
| Name | Type | Remark |
|---|---|---|
| app_id* | string | created app's id at dashboard - Max. 32 chars - |
| method* | string | Fixed value: creditcard |
| timestamp* | string | yyyy-MM-dd HH:mm:ss - Max. 19 chars - |
| out_trade_no* | string | ID given by the merchant in their system - Max. 64 chars - |
| notify_url* | string | Where luxtak will send notification to |
| subject* | string | payment reason or item title - Max. 128 chars - |
| content* | string | payment reason detail or item detail.This will be shown on the bank bill. - Max. 255 chars - |
| order_amount* | number | order amount - 1~ - |
| order_currency* | string | Check here for supported currency |
| trade_type* | string | Fixed value: WEB |
| timeout_express | string | m(minutes), h(hours), d(days), c(current day) - 90m in default - |
| buyer_id* | string | merchant user's id |
| interval* | string | D(day), W(week), M(month), Y(year) |
| quantity* | number | Quantity of recurring |
| trial_period* | string | Trial period |
| trial_amount* | string | Trial amount (when trial_amount is not blank) |
Request Sample
curl --location --request POST 'https://gateway.luxtak.com/trade/recurring' \
--header 'Authorization: Basic
MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNm
UzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ==' \
--header 'Content-Type: application/json' \
--data-raw '{
"charset": "UTF-8",
* "app_id": "162************38",
* "out_trade_no": "202201010354002",
* "order_currency": "",
* "order_amount": "12.01",
* "subject": "item name",
* "content": "item description",
* "trade_type": "WEB",
"timeout_express": "1d",
* "timestamp": "2022-01-01 03:54:01",
* "notify_url": "http://merchant/callback/success",
* "buyer_id": "buyer_0101_0001",
* "trial_amount":"6.66",
* "trial_period":"5m",
* "interval":"30m",
* "quantity":3
}'
Http Response (JSON format)
| Parameter | Type | Description |
|---|---|---|
| code | string | Return code |
| msg | string | Return msg |
| sub_code | string | Return sub code(only error) |
| sub_msg | string | Return sub msg(only error) |
| out_trade_no | string | Request out_trade_no |
| trade_no | string | Luxtak trade NO. |
| web_url | string | Checkout URL |
Return Code (Success)
| 200 | submit successfully |
{
"code": "10000",
"msg": "Success",
"trade_no": "2022010110293900083",
"out_trade_no": "202201010354003",
"web_url": "http://checkouttestv2.luxtak.com?prepay_id=123456",
"prepay_id": "123456"
}
Return Code (Fail)
| 400 | duplicate out_trade_no |
{
"code": "40002",
"msg": "Business Failed",
"sub_code": "duplicate-out_trade_no",
"sub_msg": "out_trade_no is duplicate",
}
IPN Notifications
Tips
Follow the general IPN notifications guide to receive our IPN notification messages, meantime with recurring sub orders, we will also send the parameter period to specific current period of the order.
Content-Type: application/json
Method: POST
Header: Luxtak-Signature
Body:
{
"amount":"",
"out_trade_no":"",
"method":"",
"trade_status":"",
"trade_no":"",
"currency":"",
"out_request_no":"",
"app_id":"",
"timestamp":"",
"user":{
"identify":{
"number":"",
"type":""
},
"phone":"",
"email":""
},
"card":{
"card_no":"F6L4"
},
"period": 1
}
Attention
Tips
return_url is not in the request parameters, if needed, just append the return_url after the web_url when redirect: http://checkout.luxtak.com?prepay_id={$prepay_id}
Cancel Recurring Payment
Request Base URL
Test Environment : https://gateway-test.luxtak.com
Prod Environment : https://gateway.luxtak.com
EndPoints
/trade/recurring/cancel
Request Header
| Content-Type* | string | application/json; chartset=UTF-8 |
| Authorization* | string | Basic Base($app_id:$security_key) |
Request Parameters (JSON format)
| Name | Type | Remark |
|---|---|---|
| app_id* | string | created app's id at dashboard - Max. 32 chars - |
| timestamp* | string | yyyy-MM-dd HH:mm:ss - Max. 19 chars - |
| out_trade_no* | string | ID given by the merchant in their system - Max. 64 chars - |
Request Sample
curl --location --request POST 'https://gateway.luxtak.com/trade/recurring/cancel'
\
--header 'Authorization: Basic
MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNm
UzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ==' \
--header 'Content-Type: application/json' \
--data-raw '{
* "app_id": "162************38",
* "out_trade_no": "202201010354002",
* "timestamp": "2022-01-01 03:54:01",
}'
Http Response (JSON format)
| Parameter | Type | Description |
|---|---|---|
| code | string | Return code |
| msg | string | Return msg |
| sub_code | string | Return sub code(only error) |
| sub_msg | string | Return sub msg(only error) |
| out_trade_no | string | Request out_trade_no |
| recurring_status | string | Recurring status |
Return Code (Success)
| 200 | submit successfully |
{
"code": "10000",
"msg": "Success",
"out_trade_no": "202201010354003",
"recurring_status": "CANCEL"
}
Return Code (Fail)
| 400 | duplicate out_trade_no |
{
"code": "40002",
"msg": "Business Failed",
"sub_code": "duplicate-out_trade_no",
"sub_msg": "out_trade_no is duplicate"
}
