curl --request POST \
--url https://sandbox-openplatform.keysecure.io/open-api/v1/simulate/refund \
--header 'Content-Type: application/json' \
--data '{
"card_no": "C02606050CI1Y0HS",
"amount": 10,
"consume_no": "YOUR_CONSUME_NO"
}'
curl --request POST \
--url https://sandbox-openplatform.keysecure.io/open-api/v1/simulate/refund \
--header 'Content-Type: application/json' \
--data '{
"card_no": "C02606050CI1Y0HS",
"amount": 10,
"transaction_currency": "USD",
"pay_type": "atm"
}'
{
"code": 0,
"msg": "Success"
}
交易模拟
模拟退款
POST
/
open-api
/
v1
/
simulate
/
refund
curl --request POST \
--url https://sandbox-openplatform.keysecure.io/open-api/v1/simulate/refund \
--header 'Content-Type: application/json' \
--data '{
"card_no": "C02606050CI1Y0HS",
"amount": 10,
"consume_no": "YOUR_CONSUME_NO"
}'
curl --request POST \
--url https://sandbox-openplatform.keysecure.io/open-api/v1/simulate/refund \
--header 'Content-Type: application/json' \
--data '{
"card_no": "C02606050CI1Y0HS",
"amount": 10,
"transaction_currency": "USD",
"pay_type": "atm"
}'
{
"code": 0,
"msg": "Success"
}
模拟退款,用于测试退款通知。
consume_no 可选。
- 传入
consume_no则关联授权交易单号;不传则直接模拟一笔退款 - 不传
consume_no时,可传transaction_currency、pay_type - 不使用
Api-Key/Access-Token
请求头
string
默认值:"application/json"
必填
固定为
application/json; charset=utf-8请求体
string
必填
卡号
number
必填
金额
string
消费单号,关联授权交易单号;不传则不关联
string
默认值:"USD"
交易币种;仅在不传
consume_no 时生效返回参数
number
响应状态码,
0 表示成功;失败时与 HTTP 状态码一致(如 400 / 500)string
响应消息。成功为
Success,失败为具体原因(无 data 字段)curl --request POST \
--url https://sandbox-openplatform.keysecure.io/open-api/v1/simulate/refund \
--header 'Content-Type: application/json' \
--data '{
"card_no": "C02606050CI1Y0HS",
"amount": 10,
"consume_no": "YOUR_CONSUME_NO"
}'
curl --request POST \
--url https://sandbox-openplatform.keysecure.io/open-api/v1/simulate/refund \
--header 'Content-Type: application/json' \
--data '{
"card_no": "C02606050CI1Y0HS",
"amount": 10,
"transaction_currency": "USD",
"pay_type": "atm"
}'
{
"code": 0,
"msg": "Success"
}
