Order Life Cycle
One-Stage Payment​
Note
In the Create Order API endpoint, the autoCapture
parameter must be explicitly set to True
or not included in the request at all.
Two-Stage Payment (🚧 in development)​
Note
For two-stage payments in the Create Order API endpoint, the autoCapture
parameter must be set to False
. Additionally, it is required to make the POST /api/v1/order/capture
API call to complete the payment process.
Order Actions and Conditions​
Order Status | Possible Actions | Action Preconditions |
---|---|---|
in_progress | post /api/v1/order/cancel | Order status is in_progress , the payments array within the response of the Retrieve Order Details doesn't contain payment item |
in_progress | post /api/v1/order/reject | Order status is in_progress , the payments array within the response of the Retrieve Order Details contain payment item |
in_progress | post /api/v1/order/capture | Exclusive to two-stage payment. The order status should be in_progress , autoCapture must be set to false , and the payments array within the response from the Retrieve Order Details endpoint must include at least one payment item for two-stage payment type. |
completed | post /api/v1/order/refund | Order status must be completed |
rejected | Successful execution of post /api/v1/order/reject | |
cancelled | Successful execution of post /api/v1/order/cancel | |
failed | This status occurs if: - The client hasn't paid by timeout. - There are issues on the provider's side processing the payment. - The client entered invalid payment details and the payment could not be completed. | |
refunded | post /api/v1/order/refund | A refund has been processed for this order. For the refunded amount, check the sum of amount in cost objects with paymentType refund within the payments array (link for response). If the total order amount equals the sum of these amounts , a full refund is completed and no further actions can be performed. If the total refunded is less than the order amount, additional refunds may be processed if needed. |