Skip to main content
POST
/
api
/
v1
/
merchant
/
payment
支付下单
curl --request POST \
  --url https://stageapi.paymatrixpay.com/api/v1/merchant/payment \
  --header 'Content-Type: application/json' \
  --header 'X-Merchant-Id: <x-merchant-id>' \
  --header 'X-Nonce: <x-nonce>' \
  --header 'X-Signature: <x-signature>' \
  --header 'X-Timestamp: <x-timestamp>' \
  --data '
{
  "merchant_transaction_id": "<string>",
  "notification_url": "<string>",
  "redirect_url": "<string>",
  "country": "HK",
  "customer": {
    "customer_type": "I",
    "full_name": "John Doe",
    "address": {
      "line1": "5678 Oak Ave",
      "country": "US",
      "city": "Los Angeles",
      "state": "CA",
      "postal_code": "90001",
      "line2": "<string>",
      "district": "<string>",
      "house_number": "<string>"
    },
    "first_name": "Doe",
    "last_name": "John",
    "gender": "male",
    "id_type": "CPF",
    "id_no": "<string>",
    "email": "<string>",
    "phone": "<string>",
    "company": "<string>"
  },
  "merchant_order": {
    "merchant_order_id": "20200808000888888",
    "merchant_order_time": "20221231135923",
    "order_amount": 88.88,
    "order_currency_code": "USD",
    "products": [
      {
        "product_id": "50306",
        "name": "测试商品",
        "description": "测试商品描述",
        "price": 88.88,
        "quantity": 1
      }
    ],
    "merchant_user_no": "100036",
    "order_description": "测试订单",
    "shipping": {
      "full_name": "Zhang San",
      "cycle": "other",
      "address": {
        "line1": "5678 Oak Ave",
        "country": "US",
        "city": "Los Angeles",
        "state": "CA",
        "postal_code": "90001",
        "line2": "<string>",
        "district": "<string>",
        "house_number": "<string>"
      },
      "first_name": "San",
      "last_name": "Zhang",
      "phone": "+8618600000000"
    }
  },
  "cancel_url": "<string>"
}
'
{
  "code": "<string>",
  "msg": "<string>",
  "trace_id": "<string>",
  "data": {
    "platform_transaction_id": "<string>",
    "merchant_transaction_id": "<string>",
    "payment_url": "<string>",
    "payment_data": {
      "payment_currency_code": "<string>",
      "payment_amount": "<string>",
      "payment_status": "<string>"
    }
  }
}

Headers

X-Merchant-Id
integer<int64>
required

商户 Id

X-Signature
string
required

签名字符串

Maximum string length: 5000
X-Timestamp
integer<int64>
required

时间戳毫秒值

X-Nonce
string
required

随机字符串

Maximum string length: 10

Body

application/json
merchant_transaction_id
string
required

商户交易 id

Required string length: 1 - 19
notification_url
string
required

回调通知地址

Maximum string length: 250
redirect_url
string
required

支付成功跳转地址

Maximum string length: 250
country
string
required

国家

Maximum string length: 5
Example:

"HK"

customer
object
required
merchant_order
object
required
cancel_url
string

取消支付跳转地址

Maximum string length: 250

Response

200 - */*

OK

code
string

状态码

msg
string

消息

trace_id
string

调用链ID, 用于定位问题

data
object