SparkPay OpenAPI Docs
English
  • English
  • 简体中文
English
  • English
  • 简体中文
  1. Integration Scenarios
  • 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. Integration Scenarios

Close Order

Scenario Overview#

If the merchant application allows users to "cancel" or "close" orders, any payment orders created by that merchant application need to be closed to prevent users from completing the payment after closing the merchant application order.

Related Interfaces#

Payment Order Closure

Flowchart#

close_order.png
Key Steps Explained:
Step 2: After the user confirms the cancellation of the order, the merchant calls the payment platform’s Payment Order Closure API;
After the merchant closes the payment order, there can be normal and abnormal return scenarios:
Normal Return: It returns the merchant's original order number, which the merchant can use to proceed to the next step.
Abnormal Return: It returns an HTTP code or error code, which the merchant can use to troubleshoot the issue based on the error code from the interface and take the necessary steps.
Step 4: Once the payment order is successfully closed, the merchant can verify the order status by calling the Payment Order Query API to check if the status is "CLOSED."
Modified at 2024-09-12 05:58:49
Previous
Payment
Next
Payment Order Creation
Built with