创建订单接口

请求地址:

https://trano.io/api/createOrder

请求方式:POST

请求类型:application/x-www-form-urlencoded


请求参数

参数名
类型
是否必传
说明

payId

String

必传

商户单号(不可重复)

currency

String

必传

支付方式:

格式:token_chain 示例:usdt_tron

price

String

必传

订单金额,6位小数

(如:0.010000)

apiKey

String

必传

apiKey,在【API管理】中创建

sign

String

必传

签名(见签名示例)

param

String

可选

自定义参数

isHtml

int

可选

1=自动跳转支付页,0=返回 JSON 结果,不传时默认返回页面

notifyUrl

String

可选

异步回调地址

returnUrl

String

可选

同步回调地址

签名示例:

MD5(payId + currency + price + apiKey + apiSecret)

返回数据示例

{
	"msg": "操作成功",
	"code": 0,
	"data": {
		"payId": "PAY17483499400075427",
		"currency": "usdt_tron",
		"price": 0.010000,
		"param": "abc123",
		"orderId": "20250527204540631887432",
		"payUrl": "TDFRxL3gvZjfbrqG8VUCKp5dTCXwqN4bFa",
		"orderStatus": "0",
		"reallyPrice": 0.010000,
		"autoFlag": "1",
		"validityTime": 1,
		"createTime": 1748349940632
	}
}

返回数据示例

参数名
类型
说明

code

int

返回代码: 0:请求成功 500:请求失败(具体查看 msg 字段)

msg

String

调用结果说明

data

object

订单数据对象,如果失败则为 null

data 字段说明

字段名
类型
说明

payId

String

商户单号

orderId

String

订单编号,可用于查询状态

currency

String

支付方式:

格式:token_chain 示例:usdt_tron

price

Decimal

订单金额,6位小数

reallyPrice

Decimal

实际支付金额,6位小数

payUrl

String

Tron钱包地址

autoFlag

String

是否需要手动输入金额

1=手动输入

0=自动

orderStatus

String

订单状态:

0:订单待支付 1:订单已支付 2:订单已支付,通知失败 -1:订单已过期 -2:订单已取消

validityTime

int

有效时长(分钟)

createTime

Long

订单创建时间(13位时间戳)

param

String

自定义参数

Last updated