發起支付交易
测试环境
测试环境
POST
https://test-api.chingchingpay.com/gateway/api/v1/payments/checkout
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
optional
callback_url
string
optional
cancel_url
string
optional
channel_id
integer
required
client_ip
string
optional
complete_url
string
optional
currency
string
optional
description
string
optional
device_id
string
optional
expires_at
string
optional
merchant_id
string
required
merchant_reference
string
optional
payment_id
string
optional
payment_method
string
required
payment_method_option
string
optional
store_id
string
optional
transaction_type
string
required
Example
{
"amount": 0,
"callback_url": "string",
"cancel_url": "string",
"channel_id": 0,
"client_ip": "string",
"complete_url": "string",
"currency": "string",
"description": "string",
"device_id": "string",
"expires_at": "string",
"merchant_id": "string",
"merchant_reference": "string",
"payment_id": "string",
"payment_method": "string",
"payment_method_option": "string",
"store_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/checkout' \
--header 'x-api-key: ' \
--header 'x-signature;' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢200OK
application/json
Body
code
integer
optional
data
object
v1.CreateTransactionResponse
merchant_reference
string
optional
message
string
optional
next_action
object
optional
payment_id
string
required
payment_reference
string
optional
result
string
required
transaction_id
string
required
transaction_type
string
required
message
string
optional
Example
{
"code": 0,
"data": {
"merchant_reference": "string",
"message": "string",
"next_action": {
"alipay_auto_debit": {
"access_token": "string",
"auth_site_user_id": "string",
"expires_in": "string",
"re_expires_in": "string",
"refresh_token": "string",
"token_status": "string"
},
"alipay_mobile_security_pay": {
"order_str": "string"
},
"crypto_payment": {
"amount": 0,
"contract_id": "string",
"expiration": 0,
"fee_rate": 0,
"memo": "string",
"merchant_address": "string",
"token_id": "string",
"tx_id": "string"
},
"display_qr_code": {
"qr_code": "string",
"url": "string"
},
"redirect_to_url": {
"http_method": "string",
"params": "string",
"url": "string"
},
"type": "string",
"wechat_inapp_payment": {
"app_id": "string",
"nonce_str": "string",
"package": "string",
"partner_id": "string",
"pay_sign": "string",
"prepay_id": "string",
"time_stamp": "string"
},
"wechat_jsapi_payment": {
"app_id": "string",
"nonce_str": "string",
"package": "string",
"pay_sign": "string",
"sign_type": "string",
"time_stamp": "string"
},
"wechat_official_account_auth_code": {
"auth_code": "string"
},
"wechat_official_account_openid": {
"openid": "string"
},
"wechat_pay_in_mini_program": {
"app_id": "string",
"nonce_str": "string",
"package": "string",
"pay_sign": "string",
"sign_type": "string",
"time_stamp": "string"
}
},
"payment_id": "string",
"payment_reference": "string",
"result": "string",
"transaction_id": "string",
"transaction_type": "string"
},
"message": "string"
}
Modified at 2025-03-25 01:43:51