跳转到内容

退款

请求

退款

标头
x-paykka-appidstring必需

Identification of Entity or Partner, eg: 978594372956732

示例:978594372956732
x-paykka-timestampstring必需

Millisecond-level timestamp, it is recommended to exceed 5min

示例:1757387467986
x-paykka-noncestring必需

Request random numbers, anti-request replay

示例:4326048250346354435
x-paykka-sign-algstring必需

Signature Algorithm, eg: SHA256_WITH_RSA

示例:SHA256_WITH_RSA
x-paykka-signstring必需

signature value

示例:Mif3gh48xxxxxxxxx
正文application/json必需
currencystring(退款币种; 传ISO 3166-1支持的货币三字码)必需

退款币种; 传ISO 3166-1支持的货币三字码

Enum:"CNY""USD""JPY""RUB""EUR""GBP""HKD""AUD""CAD""INR"
示例:"USD"
merchant_idstring, [ 0 .. 32 ] characters必需

商户号

示例:"18356675194960"
ori_order_idstring, [ 0 .. 32 ] characters必需

原交易PayKKa订单号

示例:"GW200395192979024625"
refund_amountinteger, (int64)必需

退款金额, 传对应国家币种的最小面值金额(例如: USD/CNY单位为分, JPY单位为元)

示例:100
refund_trans_idstring, [ 0 .. 32 ] characters必需

商户退款订单号

示例:"t202311081113"
reasonstring(订单拒绝理由)

DUPLICATE: 重复订单
FRAUDULENT: 欺诈
REQUESTED_BY_CUSTOMER: 客户请求
OTHER: 其他

Enum:"DUPLICATE""FRAUDULENT""REQUESTED_BY_CUSTOMER""OTHER"
notify_urlstring, [ 0 .. 200 ] characters

退款通知Webhook地址; 当退款状态变更时, 发送交易结果到对应url (推荐在PayKKa平台统一配置)

示例:"https://www.baidu.com"
customer_infoobject(RefundCustomerInfoReqDto)

退款客户信息

Refund

curl -i -X POST \
  https://openapi-sandbox.paykka.com/v3/payment/acq/refund \
  -H 'Content-Type: application/json' \
  -H 'x-paykka-appid: 978594372956732' \
  -H 'x-paykka-nonce: 4326048250346354435' \
  -H 'x-paykka-sign: Mif3gh48xxxxxxxxx' \
  -H 'x-paykka-sign-alg: SHA256_WITH_RSA' \
  -H 'x-paykka-timestamp: 1757387467986' \
  -d '{
    "merchant_id": "18356675194960",
    "refund_trans_id": "m43986y4t345436",
    "ori_order_id": "GW20620xxxxx6999",
    "refund_amount": 100,
    "currency": "USD"
  }'

响应

ok

正文application/json
error_codestring

错误码(详情见[交易错误码])

error_descriptionstring

错误描述

merchant_idstring

商户号

示例:"18356675194960"
refund_trans_idstring

商户退款订单号

示例:"t202311081113"
refund_order_idstring

PayKKa退款订单号

ori_order_idstring

原交易PayKKa订单号

statusstring(网关退款订单状态)

REVIEWING: 审核中
PROCESSING: 退款中
SUCCESS: 成功
FAILURE: 失败

Enum:"REVIEWING""PROCESSING""SUCCESS""FAILURE"
amountinteger, (int64)

退款交易金额, 对应国家币种的最小面值金额 支持部分退款, 且金额不能大于交易金额

示例:1250
currencystring(币种; 传ISO 3166-1支持的货币三字码)

币种; 传ISO 3166-1支持的货币三字码

Enum:"CNY""USD""JPY""RUB""EUR""GBP""HKD""AUD""CAD""INR"
示例:"USD"
响应

Request Success

{ "ret_code": "000000", "ret_msg": "Success", "data": { "merchant_id": "18356675194960", "refund_trans_id": "m43986y4t345436", "refund_order_id": "RG206xxxxx198", "ori_order_id": "GW20620xxxxx6999", "status": "PROCESSING", "amount": 100, "currency": "USD" } }