Create payment
2021-03-23 14:37:44
Type:
POST
URL:
Sandbox: https://api.modenpay.io/pay/sandbox/gateway
Production: https://api.modenpay.io/pay/gateway
Request parameter
parameter | type | Required | description | Reference |
coin | string | Yes | Currency, the current system only supports USDT. | USDT |
currency_code | string | Yes | Currency code, refer to "USD", for more supported currencies, please click me to check. | VND |
payment_provider | string | No | Payment methods. The system supports more than 130 payment methods, but not every payment method is available in time. You can click me to check the payment methods currently supported by the system. You can also leave this parameter blank, and the system will list the currently available The payment method is for users to choose. | PayPal |
amount | double | Yes | The amount paid. | 1000.00 |
sn | string | Yes | order number. | 9621755adecdc83eb69143f73882e380 |
notify_url | string | Yes | Callback address. When the user pays successfully, the system will send a notification to the callback address (asynchronous). Click me to view the parameters and format sent | http://www.youdomain.com/xxxx |
timestamp | integer | Yes | Timestamp of the current time | 1616305564 |
Request example
curl -X POST https://api.modenpay.io/pay/gateway \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic <Your Basic Auth>'
-d '{
"coin" : "USDT",
"currency_code" : "VND",
"payment_provider" : "PayPal",
"amount" : 1000.00,
"sn" : "9621755adecdc83eb69143f73882e380",
"notify_url" : "http://www.youdomain.com/xxxx",
"timestamp" : 1616305564,
}'
Example 200
response
{
"status" : "success",
"url" : "https://modenpay.io/
}
Example 412
response
{
"status" : "fail",
"code" : 10000,
"message" : "xxxxxxx"
}
This is an error json return, you can find the corresponding error information according to the error code code. Error code reference table