Checkout Page (General)
How to use Luxtak Checkoutpage to submit a payin.
post
https://gateway-test.luxtak.com/trade/create
Payin by using Luxtak checkout page
This endpoint allows you to submit a payin by using Luxtak checkout page
Parameters
Header
| Name | Type | Description |
|---|---|---|
| Content-Type* | string | application/json; chartset=UTF-8 |
| Authorization* | string | Basic Base($app_id:$security_key) |
Body
| Name | Type | Description |
|---|---|---|
| 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 - |
| method | string | Add this object to show only the selected method. For instance, “method”: “PIX” will only show the PIX method. To show all the methods do not add this object in the request body. Check here for all methods. |
| channel | string | only use when method = Wallet |
| order_currency* | string | order currency - Max. 3 chars - Check here for all methods. |
| order_amount* | string | order amount - 0.01 ~ 999999999 - (refer to amount limit for different methods) |
| 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 - |
| trade_type* | string | fixed value: WEB |
| version* | string | fixed value: 2.0 |
| timeout_express | string | m(minutes), h(hours), d(days), c(always end in current day). Used to control the expiration time of submitting an order (from initial to processing). (90m in default, max 15d) |
| notify_url* | string | Where luxtak will send notification to |
| return_url | string | web redirect url when payment is finish |
| buyer_id* | string | merchant user's id |
| regions | array | regions of the payment. The format is ["XXX"] - BRA, etc. Check here - |
| customer.name | string | User's name - Will be pre-filled on the checkout page - |
| customer.phone | string | User's phone - Will be pre-filled on the checkout page - |
| customer.email | string | User's email - Will be pre-filled on the checkout page - |
| customer.identify.number | string | User's identification number - Will be pre-filled on the checkout page - |
| customer.identify.type | string | User's identification type - Will be pre-filled on the checkout page - |
| address.zip_code | string | zip code - Will be pre-filled on the checkout page - |
Responses
| 200 | submit successfully |
{
"code": "10000",
"msg": "Success",
"trade_no": "2022010110293900083",
"out_trade_no": "202201010354003",
"web_url": "http://checkout-testv2.luxtak.com?prepay_id=123456",
"prepay_id":"123456"
}
| 400 | duplicate out_trade_no |
{
"code": "40002",
"msg": "Business Failed",
"sub_code": "duplicate-out_trade_no",
"sub_msg": "out_trade_no is duplicate"
}
Example
curl --location --request POST 'https://gateway-test.luxtak.com/trade/create' \
--header 'Authorization: Basic MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNmUzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ==' \
--header 'Content-Type: application/json' \
--data-raw '{
"charset": "UTF-8",
* "app_id": "162************38",
* "out_trade_no": "202201010354002",
* "order_currency": "BRL",
* "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",
* "version": "2.0",
"customer": {
"identify": {
"type": "CPF",
"number": "50284414727"
},
"name": "Test User Name",
"email": "test@luxtak.com"
},
"regions": ["BRA"],
"address": {
"zip_code": "38082365"
}
}'
Warning
Return _url is not required in the request parameters. However if needed, you can overwrite it by appending the return__url after the web_url when redirect. http://checkout.luxtak.com?prepay_id={$prepay_id} ↓↓↓ http://checkout.luxtak.com?prepay_id={$prepay_id}&return_url=encodeURIComponent({$return_url})
Tips
Note: 162********38 is luxtak's test app id for sandbox, and MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNmUzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ== is authorization token associated with the test app id.
Warning
Please use your own app_id and generate your own authorization token when testing.
