- Product Introduction
- Quick Guide
- Must-Read for Integration
- Integration Scenarios
- API List
- Frequently Asked Questions
- Integration Example
- Version Notes
Payment Order Creation
正式环境
正式环境
POST
https://api.sparkpay.top/v4/pay/cashier
openapi
Request
Header Params
Content-Type
string
required
Default:
application/json
User-Agent
string
required
Sparkpay-App-Id
string
required
Sparkpay-Signature
string
required
Sparkpay-Timestamp
string
required
Sparkpay-Nonce
string
required
Body Params application/json
Field description
merchant_no
string
Merchant Customer Number
request_no
string
Merchant payment request number
merchant_order_time
integer
Merchant platform order time
total_amount
string
Merchant order amount
merchant_order_currency
string
Order Currency Symbol
merchant_order_timeout
integer
Merchant platform order payment deadline. Timestamp
merchant_order_desc
string
Order description, which will be displayed on the checkout page when the user makes a payment.
goods_info
string
Product description
merchant_order_no
string
Merchant original order number
merchant_application_user_id
string
User ID that the customer used to place the order, which is the UserID in the merchant's app.
notify_url
string
Asynchronous notification address for payment results[POST method]
redirect_url
string
The callback address for the payment success page. If the merchant doesn't specify a callback address, the user will be redirected to the payment platform's success page after the payment is complete.
business_info
string
Industry-related special attributes
divide_detail
object
multi-party payment Information
seller_amount
string
Seller amount
seller_addr
string
Seller's address
merchant_amount
string
merchant service fee
other_details
array [object {2}]
optional
extension
string
Used to expand request parameters
receive_network
string
Supported payment channels
Example
{
"merchant_no": "string",
"request_no": "string",
"merchant_order_time": 0,
"total_amount": "string",
"merchant_order_currency": "string",
"merchant_order_timeout": 0,
"merchant_order_desc": "string",
"goods_info": "string",
"merchant_order_no": "string",
"merchant_application_user_id": "string",
"notify_url": "string",
"redirect_url": "string",
"business_info": "string",
"divide_detail": {
"seller_amount": "string",
"seller_addr": "string",
"merchant_amount": "string",
"other_details": [
{
"receiver_addr": "string",
"amount": "string"
}
]
},
"extension": "string",
"receive_network": "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://api.sparkpay.top/v4/pay/cashier' \
--header 'User-Agent;' \
--header 'Sparkpay-App-Id;' \
--header 'Sparkpay-Signature;' \
--header 'Sparkpay-Timestamp;' \
--header 'Sparkpay-Nonce;' \
--header 'Content-Type: application/json' \
--data-raw '{
"merchant_no": "string",
"request_no": "string",
"merchant_order_time": 0,
"total_amount": "string",
"merchant_order_currency": "string",
"merchant_order_timeout": 0,
"merchant_order_desc": "string",
"goods_info": "string",
"merchant_order_no": "string",
"merchant_application_user_id": "string",
"notify_url": "string",
"redirect_url": "string",
"business_info": "string",
"divide_detail": {
"seller_amount": "string",
"seller_addr": "string",
"merchant_amount": "string",
"other_details": [
{
"receiver_addr": "string",
"amount": "string"
}
]
},
"extension": "string",
"receive_network": "string"
}'
Responses
🟢200成功
application/json
Body
code
number
required
message
string
required
data
object
required
cashier_url
string
收银台地址
request_no
string
商户收款请求号
Example
{
"code": 0,
"message": "string",
"data": {
"cashier_url": "string",
"request_no": "string"
}
}
Modified at 2024-10-11 08:59:08