# 独家汇率

# 请求信息

请求地址:

https://a.mypaynz.com/rate/forex_rate
  1. 请求方式: POST
  2. 参数传递方式: Form URL-Encoded
  3. 设置Content-Type: 'Content-Type: application/x-www-form-urlencoded;charset=utf-8'

# 接口请求限制

同一 IP 每小时60次。

提示

  1. 该接口汇率仅供参考,实际支付汇率以支付时候为准
  2. 该接口数据不会频繁更新,开发者应该在自己服务器缓存改数据

# 参数详情

参数 类型 是否可空 参数描述
mid int(4) No Merchant ID
sign string(32) No Signature, please refer to signature explaination section

Examples

  • Curl
  • PHP
  • Golang
  • JavaScript
  • Java
## Query Rate
curl -X "POST" "https://a.mypaynz.com/rate/forex_rate" \
     -H 'Content-Type: application/x-www-form-urlencoded;charset=utf-8' \
     -H 'Cookie: ci_session=msasjhcraj1k6682htouhm5ra2rt7685' \
     --data-urlencode "mid=10224" \
     --data-urlencode "sign=ac05fe25fcc7de8b53d38d0246ac0e0a"

# 结果详情

# 成功

{
  "code": "200",
  "msg": "SUCCESS",
  "data": {
    "currency": "NZD",
    "alipay": {
      "rate": 4.732188
    },
    "wechat": {
      "rate": 4.734636
    }
  },
  "timestamp": 1606712986
}

# 错误

签名错误

{
    'is_success':'FALSE'
    'message': 'SIGN_ERROR'
}

其他错误

{
    'is_success':'FALSE'
    'message': 'COMBINE_ERROR'
}

# 普通汇率查询 (即将废弃)

# 请求信息

请求地址:

https://a.mypaynz.com/rate/query_rate
  1. 请求方式: GET

# 接口请求限制

同一 IP 每小时60次。

提示

  1. 该接口汇率仅供参考,实际支付汇率以支付时候为准
  2. 该接口数据不会频繁更新,开发者应该再自己服务器缓存改数据

Examples

  • Curl
  • PHP
  • Golang
  • JavaScript
  • Java
## Query Rate
curl "https://a.mypaynz.com/rate/query_rate" \
     -H 'Cookie: ci_session=msasjhcraj1k6682htouhm5ra2rt7685'

# 结果详情

# 成功

{
  "is_success": "TRUE",
  "message": "QUERY RATE",
  "extra": [
    {
      "id": "265662",
      "type": "alipay",
      "currency": "NZD",
      "rate": "4.6394",
      "ct": "2020-11-30 12:00:02"
    },
    {
      "id": "265673",
      "type": "wechat",
      "currency": "NZD",
      "rate": "4.6418",
      "ct": "2020-11-30 12:45:02"
    },
    {
      "id": "265663",
      "type": "alipay_web",
      "currency": "NZD",
      "rate": "4.65943",
      "ct": "2020-11-30 12:00:02"
    }
  ]
}