SparkPay OpenAPI Docs
English
  • English
  • 简体中文
English
  • English
  • 简体中文
  1. API List
  • Product Introduction
  • Quick Guide
    • Integration Preparation
    • Interface Signature Description
  • Must-Read for Integration
    • Interface Rules
    • Asynchronous Notification
    • Interface Error Codes
    • Network and Currency
  • Integration Scenarios
    • Payment
    • Close Order
  • API List
    • Payment Order Creation
      POST
    • Payment Order Query
      GET
    • Payment Order Closure
      POST
    • Payment Order Creation(Pro Edition)
      POST
    • Payment Order Query(Pro Edition)
      GET
  • Frequently Asked Questions
    • Notification Related Issues
    • Redirect Failure Issues
    • Interface Error Issues
    • Test Token Acquisition/Test Network Connection
  • Integration Example
    • Interface Signature Example - PHP
    • Interface Signature Example - Postman
  • Version Notes
    • Version Notes
  1. API List

Payment Order Creation(Pro Edition)

正式环境
https://api.sparkpay.top
正式环境
https://api.sparkpay.top
POST
https://api.sparkpay.top
/v4/pro/pay/cashier
openapi

Request

Header Params
Content-Type
string 
required
Only supports application/json.
Default:
application/json
User-Agent
string 
required
Content cannot be empty.
Sparkpay-App-Id
string 
required
Merchant Application ID
Sparkpay-Signature
string 
required
Request for Signature
Sparkpay-Timestamp
string 
required
Request timestamp, timestamp (accurate to the second)
Sparkpay-Nonce
string 
required
Request random string
Body Params application/json
Field description
merchant_no
string 
Merchant Customer Number
required
request_no
string 
Merchant payment request number
required
The unique identifier for the merchant platform order is custom-defined by the merchant, limited to 64 characters, case-insensitive, and only supports letters, numbers, and underscores. It must also ensure no duplicates on the merchant side. Note: each request_no corresponds to a payment order. If the payer's payment wasn’t successful, the merchant should continue using the same request_no from the last payment request for that payer when initiating the payment again.
merchant_order_time
integer 
Merchant platform order time
required
timestamp (accurate to the second)
pricing_amount
string 
Merchant order amount
required
It must be a large unit, with a minimum decimal precision of 6 places.
pricing_currency
string 
Order Currency Symbol
required
See Network and Currency
merchant_order_timeout
integer 
Merchant platform order payment deadline. Timestamp
required
timestamp (accurate to the second)
merchant_order_desc
string 
Order description, which will be displayed on the checkout page when the user makes a payment.
required
goods_info
string 
Product description
required
merchant_order_no
string 
Merchant original order number
required
merchant_application_user_id
string 
User ID that the customer used to place the order, which is the UserID in the merchant's app.
required
notify_url
string 
Asynchronous notification address for payment results[POST method]
optional
Asynchronous notification URL for payment result
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.
optional
The callback URL for the payment success page.
business_info
string 
Industry-related special attributes
optional
divide_detail
object 
multi-party payment Information
optional
If it's a multi-party payment order, then every field in this section must not be empty.
seller_amount
string 
Seller amount
required
For large units, the smallest precision for the decimal point is 6 digits.
seller_addr
string 
Seller's address
required
merchant_amount
string 
merchant service fee
required
For large units, the smallest precision for the decimal point is 6 places.
other_details
array [object {2}] 
optional
extension
string 
Used to expand request parameters
optional
available_payment_currency_networks
array [object {2}] 
Supported payment channels
optional
currency
string 
required
Enum See Network and Currency
networks
array[integer]
required
Enum See Network and Currency
Example
{
    "merchant_no": "string",
    "request_no": "string",
    "merchant_order_time": 0,
    "pricing_amount": "string",
    "pricing_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",
    "available_payment_currency_networks": [
        {
            "currency": "string",
            "networks": [
                0
            ]
        }
    ]
}

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/pro/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,
    "pricing_amount": "string",
    "pricing_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",
    "available_payment_currency_networks": [
        {
            "currency": "string",
            "networks": [
                0
            ]
        }
    ]
}'

Responses

🟢200成功
application/json
Body
code
number 
required
message
string 
required
data
object 
required
cashier_url
string 
收银台地址
required
The address will include the merchant_ca_addr, request_no, and sign parameters.
request_no
string 
商户收款请求号
required
Example
{
    "code": 0,
    "message": "string",
    "data": {
        "cashier_url": "string",
        "request_no": "string"
    }
}
Modified at 2025-04-14 05:39:19
Previous
Payment Order Closure
Next
Payment Order Query(Pro Edition)
Built with