退款申请接口

Endpoint
POST {BASE_URL}/api/v2.0/payments/refund

退款申请接口,根据平台订单金额进行退款申请。一笔支付订单可以分多次退款,退款总金额不得超过实际支付金额,退款币种与支付订单币种需一致。

Request Body
paymentIdstringREQUIRED

AlphaPay平台订单ID

refundRequestIdstring

商户的退款单ID

refundobjectREQUIRED

退款详情

隐藏子字段
refund.refundAmountobjectREQUIRED

退款金额

隐藏子字段
refund.refundAmount.valuestringREQUIRED

退款金额金额值,单位为货币最小单位,例如传入100表示1.00CAD,单个订单退款单金额总和不能超过用户支付金额,需符合正则: ^\d{1,7}$

refund.descriptionstring

退款备注(最大长度128字符,超出自动截取)<= 128 characters

refund.notifyUrlstring

退款通知URL,退款完成后推送通知的地址

退款申请Request Body
{
    "paymentId": "string",
    "refundRequestId": "string",
    "refund": {
        "refundAmount": {
            "value": "string"
        },
        "description": "string",
        "notifyUrl": "string"
    }
}

Response (200 OK)
refundIdstring

AlphaPay平台退款单ID

paymentIdstring

AlphaPay平台订单ID

refundRequestIdstring

商户的退款单ID

refundobject

退款详情

隐藏子字段
refund.refundAmountobject

退款金额

隐藏子字段
refund.refundAmount.valuestring

退款金额金额值,单位为货币最小单位,例如传入100表示1.00CAD,单个订单退款单金额总和不能超过用户支付金额,需符合正则: ^\d{1,7}$

refund.descriptionstring

退款备注(最大长度128字符,超出自动截取)<= 128 characters

refund.notifyUrlstring

退款通知URL,退款完成后推送通知的地址

refundTimestring <date-time>

退款时间
遵循ISO8601标准,例如:2019-05-28T12:12:12+08:00

resultobject

业务结果

隐藏子字段
result.resultCodestring

业务结果码,详情查看业务结果码 (resultCode)

result.resultMessagestring

业务结果消息

result.resultStatusstring

业务结果状态,详情查看业务结果状态 (resultStatus)

  • S:接口调用成功
  • F:接口调用失败,resultMessage会有详细的错误信息描述,可能是商户也可能是平台的错误。
  • U:业务结果未知或处理中间状态。比如提交支付单后得到 PAYMENT_IN_PROCESS,则需要调用查询接口确认支付结果状态
退款申请Response
{
    "refundId": "string",
    "paymentId": "string",
    "refundRequestId": "string",
    "refund": {
        "refundAmount": {
            "value": "string"
        },
        "description": "string",
        "notifyUrl": "string"
    },
    "refundTime": "2019-08-24T14:15:22Z",
    "result": {
        "resultCode": "string",
        "resultMessage": "string",
        "resultStatus": "S"
    }
}