Chingchingpay Payment Gateway
  1. 支付網關
Chingchingpay Payment Gateway
  • 支付網關
    • 查詢交易狀態
      POST
    • 發起支付交易
      POST
    • 發起退款交易
      POST
    • 創建PaymentLink H5 頁面
      POST
  1. 支付網關

發起退款交易

测试环境
https://test-api.chingchingpay.com/gateway
测试环境
https://test-api.chingchingpay.com/gateway
POST
https://test-api.chingchingpay.com/gateway
/api/v1/payments/transactions/refund
Last modified:2025-03-25 01:43:51
發起退款交易

Request

Header Params
x-api-key
string 
optional
Default:
{{API_KEY}}
x-signature
string 
optional
Body Params application/json
amount
integer 
required
退款金額 單位: 分
callback_url
string 
optional
退款狀態回調地址
currency
string 
required
退款幣種
description
string 
optional
退款描述
merchant_reference
string 
required
商户退款订单号
original_merchant_reference
string 
optional
商户原支付订单号,支付ID和商户原支付订单号至少一个不为空
transaction_id
string 
optional
支付ID
transaction_type
string 
required
交易類型: refund
Example
{
  "amount": 0,
  "callback_url": "string",
  "currency": "string",
  "description": "string",
  "merchant_reference": "string",
  "original_merchant_reference": "string",
  "transaction_id": "string",
  "transaction_type": "string"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://test-api.chingchingpay.com/gateway/api/v1/payments/transactions/refund' \
--header 'x-api-key: ' \
--header 'x-signature;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": 0,
    "callback_url": "string",
    "currency": "string",
    "description": "string",
    "merchant_reference": "string",
    "original_merchant_reference": "string",
    "transaction_id": "string",
    "transaction_type": "string"
}'

Responses

🟢200OK
application/json
OK
Body
code
integer 
optional
data
object 
v1.TransactionResponse
optional
amount
integer 
optional
交易金额 單位: 分
channel_id
integer 
optional
渠道ID
created_at
integer 
optional
支付订单创建时间
currency
string 
optional
交易幣種
description
string 
optional
详细信息
device_id
string 
optional
設備ID
extra
string 
optional
额外信息
merchant_id
string 
optional
商戶ID
merchant_reference
string 
optional
商家訂單編號, 需保證唯一
original_merchant_reference
string 
optional
原商家訂單編號, 退款订单才有值
original_payment_reference
string 
optional
原支付服務商交易號碼, 退款订单才有值
original_transaction_id
string 
optional
原交易ID
payed_time
integer 
optional
付款時間
payer_id
string 
optional
付款人ID
payment_id
string 
optional
订单ID
payment_method
string 
optional
支付方式
payment_reference
string 
optional
支付服務商交易號碼, 例如WeChat Pay order No.
platform
string 
optional
支付平台
status
string 
optional
結果: completed, failed, pending
store_id
string 
optional
商店ID
transaction_id
string 
optional
ChingchingPay 交易 ID
transaction_type
string 
optional
交易類型: sale, refund
updated_at
integer 
optional
支付订单更新时间
message
string 
optional
Example
{
  "code": 0,
  "data": {
    "amount": 0,
    "channel_id": 0,
    "created_at": 0,
    "currency": "string",
    "description": "string",
    "device_id": "string",
    "extra": "string",
    "merchant_id": "string",
    "merchant_reference": "string",
    "original_merchant_reference": "string",
    "original_payment_reference": "string",
    "original_transaction_id": "string",
    "payed_time": 0,
    "payer_id": "string",
    "payment_id": "string",
    "payment_method": "string",
    "payment_reference": "string",
    "platform": "string",
    "status": "string",
    "store_id": "string",
    "transaction_id": "string",
    "transaction_type": "string",
    "updated_at": 0
  },
  "message": "string"
}
Previous
發起支付交易
Next
創建PaymentLink H5 頁面
Built with