问题解答
-- OTP验证的接口,返回“INVALID_REQUEST” 是否代表验证码不正确,还是有可能其他的原因导致的这个错误返回;
-- 支付超时时间多长?
回答:11分钟。
支付请求(Charge)
- Request
Test Card number:5399830000000008
{
"currency": "NGN",
"amount": 3000000,
"reference": "Paypay_Charge_0001",
"narration": "FlowersNG/Ajibade Orchids 4 Derin",
"mcc": "5193",
"metadata": {
"buying": "Japhet Orchids"
},
"card": {
"number": "5399830000000008",
"expiry": {
"month": "05",
"year": "30"
},
"cvc": "000"
}
}
- Response
- "response_code": "V0"
说明:GTB银行会发送短信给客户预留在银行的认证手机号,客户需要先做OTP验证
{
"response": {
"response_code": "V0",
"response_message": "Enter the OTP code sent to your phone to complete the transaction",
"reference": "Paypay_Charge_0001",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 627,
"amount": 3000000,
"metadata": {
"buying": "Japhet Orchids"
},
"card_token": null
}
}
- "response_code": "VR"、 "VC"、 "VB"、"VF"、"XX"
{
"response": {
"response_code": "VR",
"response_message": "Card Validation failed. Received invalid response from remote entity.",
"reference": "Paypay_Charge_0002",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 629,
"amount": 3000000,
"metadata": {
"buying": "Japhet Orchids"
},
"card_token": null
}
{
"response": {
"response_code": "VF",
"response_message": "Unable to retrieve card details.",
"reference": "Paypay_Charge_0006",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 633,
"amount": 3000000,
"metadata": {
"buying": "Japhet Orchids"
},
"card_token": null
}
}
{
"response": {
"response_code": "VC",
"response_message": "Card Validation failed. Error occured while processing your request.",
"reference": "Paypay_Charge_0004",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 631,
"amount": 3000000,
"metadata": {
"buying": "Japhet Orchids"
},
"card_token": null
}
}
{
"response": {
"response_code": "VB",
"response_message": "Your account does not seem to have a phone number, email or hardware token provisioned. Please contact your account officer.",
"reference": "Paypay_Charge_0005",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 632,
"amount": 3000000,
"metadata": {
"buying": "Japhet Orchids"
},
"card_token": null
}
}
{
"response": {
"response_code": "XX",
"response_message": "Error occured while processing your request",
"reference": "Paypay_Charge_0007",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 634,
"amount": 3000000,
"metadata": {
"buying": "Japhet Orchids"
},
"card_token": null
}
}
- "error":
{
"error": {
"cause": "CONFLICT",
"messages": [
"Reference: 'Paypay_Charge_0003' conflicts with an existing transaction"
]
}
}
OTP验证(Validate)
- Request
transaction_number:通过Charge请求中,返回的字段获取。相当于银行的支付流水号。
{
"transaction_number": 627,
"OTP": "123456"
}
- Response
- Bad Request
说明:无效请求
{
"error": {
"cause": "INVALID_REQUEST",
"messages": [
"You can not provide an OTP to conclude this transaction"
]
}
}
- Approved
说明:验证码通过后,完成支付
{
"response": {
"response_code": "00",
"response_message": "Approved",
"reference": "Paypay_Charge_0009",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 678,
"amount": 3000000,
"metadata": {
"buying": "Japhet Orchids"
},
"card_token": "TK_1u968ey0egn8ugssawu451rh0w3"
}
}
- "response_code": "VG"
说明:短信验证码不正确
{
"response": {
"response_code": "VG",
"response_message": "Token Authentication Failed. Incorrect Token Supplied.",
"reference": "Paypay_Charge_0011",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 681,
"amount": 3000000,
"metadata": {
"buying": "Japhet Orchids"
},
"card_token": null
}
}
查询支付/退款流水状态(Query)
当请求超时,请不渠道支付系统是否已经接收到了支付/退款请求,可以使用此接口来确定订单状态。
- Request
支付 reference:Paypay_Charge_0001
退款 reference:Paypay_Refund_0001
无需报文体,流水号在请求地址中代入
- 支付流水 Response
- "response_code": "VE"
说明:支付操作完成超过了有效期的错误信息
{
"response": {
"response_code": "VE",
"response_message": "Your payment has exceeded the time required to pay",
"reference": "Paypay_Charge_0001",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 627,
"amount": 3000000,
"metadata": {
"buying": "Japhet Orchids"
},
"card_token": null
}
}
- "cause": "NO_RECORD"
说明:订单号不存在的错误信息
{
"error": {
"cause": "NO_RECORD",
"messages": [
"No transaction exists with reference: 'PalmPay_Charge_0002' in your test domain"
]
}
}
- "response_code": "V0"
说明:GTB银行会发送短信给客户预留在银行的认证手机号,客户需要先做OTP验证
{
"response": {
"response_code": "V0",
"response_message": "Enter the OTP code sent to your phone to complete the transaction",
"reference": "Paypay_Charge_0001",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 628,
"amount": 3000000,
"metadata": {
"buying": "Japhet Orchids"
},
"card_token": null
}
}
- "response_code": "00"
说明:验证通过,支付成功。
会返回支付token: "card_token": "TK_1u968ey0egn8ugssawu451rh0w3"
{
"response": {
"response_code": "00",
"response_message": "Approved",
"reference": "Paypay_Charge_0009",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 678,
"amount": 3000000,
"metadata": {
"buying": "Japhet Orchids"
},
"card_token": "TK_1u968ey0egn8ugssawu451rh0w3"
}
}
- 退款流水 Response
退款(Refund)
对已经支付成功的订单能做部分退款处理;
支持部分退款;
支持多长部分退款;
- Request
{
"transaction_number": 678,
"amount": 100,
"reference": "Paypay_Refund_0009",
"metadata": {
"reason": "Out of stock"
}
}
- Response
- 同一笔订单第一次退款,退款总金额未超过支付订单金额
{
"response": {
"response_code": "00",
"response_message": "Approved",
"reference": "Paypay_Refund_0009",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 679,
"amount": -100,
"metadata": {
"reason": "Out of stock"
},
"card_token": "TK_1u968ey0egn8ugssawu451rh0w3",
"refunding": {
"response_code": "00",
"response_message": "Approved",
"reference": "Paypay_Charge_0009",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 678,
"amount": 3000000,
"metadata": {
"buying": "Japhet Orchids"
},
"card_token": "TK_1u968ey0egn8ugssawu451rh0w3"
}
}
}
- 同一笔订单第二次退款,退款总金额
未超过
支付订单金额
{
"response": {
"response_code": "00",
"response_message": "Approved",
"reference": "Paypay_Refund_00010",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 680,
"amount": -200,
"metadata": {
"reason": "Out of stock"
},
"card_token": "TK_1u968ey0egn8ugssawu451rh0w3",
"refunding": {
"response_code": "00",
"response_message": "Approved",
"reference": "Paypay_Charge_0009",
"retrieval_reference_number": "UNAVAILABLE.",
"transaction_number": 678,
"amount": 3000000,
"metadata": {
"buying": "Japhet Orchids"
},
"card_token": "TK_1u968ey0egn8ugssawu451rh0w3"
}
}
}
- 同一笔订单第三次退款,退款总金额
超过
支付订单金额
{
"error": {
"cause": "ATTEMPTED_EXCESS",
"messages": [
"Max refundable is 2999700!"
]
}
}