Create payment

2021-03-23 06:37:44


Type:

POST

URL:

Sandbox: https://api.payotc365.com/pay/sandbox/gateway

Production: https://api.payotc365.com/pay/gateway

Request parameter


parametertypeRequireddescriptionReference
coinstringYesCurrency, the current system only supports USDT.USDT
currency_codestringYesCurrency code, refer to "USD", for more supported currencies, please click me to check.VND
payment_providerstringNoPayment 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
amountdoubleYesThe amount paid.1000.00
snstringYesorder number.9621755adecdc83eb69143f73882e380
notify_urlstringYesCallback 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 senthttp://www.youdomain.com/xxxx
timestampintegerYesTimestamp of the current time1616305564

 

Request example


 

curl -X POST https://api.payotc365.com/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://www.payotc365.com/
}

 

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