跳转到内容

代付/提现接口

发起代付/提现

发起提现请求。以下情况会导致接口调用失败,请注意接口返回的错误消息

  1. 若提现金额超过商户设置的最低与最高提现限制(提现范围限制请参见商户后台,提现手续费请咨询客服),将返回『提现金额超出限制』
  2. 若代付提交的收款银行卡有误,如卡号无效,接口将返回『无效卡号……』,请务必将此错误消息返回给下游展示,以便客服第一时间知晓提现失败原因
  3. 若是支付宝下发,请填写支付账户相关的信息即可,即将银行设置为『支付宝』,『开户行』留空,『账号』填写支付宝的手机号或邮箱即可
参数名越南泰国巴西印度菲律宾说明
mch_id商户 ID,请在商户后台配置中查看
trans_id商户交易 ID,由商户提供
channel通道代码,对接测试使用 mock。其他各国通道代码参见系统通道代码
amount订单金额,法币标准单位。⚠️:使用字符串传递,比如 100.00,传递 "100.00"
currency币种代码,参见系统货币代码
account_no收款账号或数字钱包账号/地址,GCASH 使用手机号
account_name收款账户姓名
account_org⭕️收款银行名称(越南银行参见附录中的银行名称)
account_org_code⭕️⭕️⭕️收款银行代码(越南银行参见附录中的银行代码,印度银行使用 IFSC)
account_sub_org⭕️⭕️⭕️⭕️⭕️开户行
account_type⭕️⭕️⭕️⭕️账户类型,巴西使用:CPF, CNPJ, PHONE, EMAIL, EVP
account_tin⭕️⭕️⭕️⭕️账户税号,巴西使用:CPF 或 CNPJ 号
account_phone⭕️⭕️⭕️⭕️账户手机,巴西的 account_type 如果是 PHONE,此参数必填
account_email⭕️⭕️⭕️⭕️账户邮箱,巴西的 account_type 如果是 EMAIL,此参数必填
callback_url回调 URL,用于通知代付结果
nonce随机字符串,至少 6 位
timestampUNIX 时间戳,10 位
sign参数签名。参见签名算法
  • 返回结果:
参数名类型说明
idstring平台唯一订单 ID
mch_idstring商户 ID
trans_idstring交易 ID
channelstring通道代码
order_amountnumber订单金额
currencystring币种
account_namestring收款姓名
account_nostring收款账号
account_orgstring收款银行名称
account_org_codestring收款银行代码
account_sub_orgstring(选填)开户行
created_atstring下单时间
statusstring订单状态,50 表示取消或驳回,60 表示成功,10,20 表示正在处理中

响应示例:

json
{
  "code": 200,
  "payload": {
    "id": "WT1729187424AJCT",
    "trans_id": "2019uZP8KImVd2Xbzae",
    "mch_id": "8888",
    "channel": "bank",
    "order_amount": 100,
    "account_no": "2333667799212341",
    "account_name": "Nguyễn Xuân Hưng",
    "account_org": "PVCOMOBANK",
    "account_org_code": "970425",
    "account_suborg": "Ho Chi Minh City",
    "account_email": "[email protected]",
    "account_tel_no": "+969839182913",
    "currency": "VND",
    "attatch": "withdrawal",
    "created_at": "2019-04-12 14:12:31",
    "status": 20
  }
}

支付成功后,系统会向平台发送通知,查看代付回调说明。

代付/提现查询

提现状态查询。

参数名必填说明
id订单 ID 或交易 ID。请注意,此参数也要参与签名
mch_id商户 ID,请在商户后台配置中查看
nonce随机字符串,至少 6 位
timestampUNIX 时间戳,10 位
sign参数签名。参见签名算法
  • 返回结果:
参数名类型说明
idstring平台唯一订单 ID
mch_idstring商户 ID
trans_idstring交易 ID
order_amountnumber订单金额
currencystring币种,默认为人民币(cny)
account_namestring收款姓名
account_nostring收款账号
account_orgstring收款银行名称
account_org_codestring收款银行代码
account_suborgstring开户行
attachmentsstring代付凭证文件,字符串数组
created_atstring提现时间
statusnumber订单状态,50 表示取消或驳回,60 表示成功,其他表示正在处理中
  • 响应示例
json
{
  "code": 200,
  "payload": {
    "id": "WOu154sgKfZB",
    "trans_id": "2019uZP8KImVd2Xbzae",
    "mch_id": "8888",
    "channel": "bank",
    "order_amount": 100,
    "account_no": "2333667799212341",
    "account_name": "Nguyễn Xuân Hưng",
    "account_org": "PVCOMOBANK",
    "account_org_code": "970425",
    "account_email": "[email protected]",
    "account_tel_no": "+969839182913",
    "currency": "VND",
    "attachments": [],
    "created_at": "2019-04-12 14:12:31",
    "status": 10
  }
}

Released under the MIT License.