Order
Orders play a vital role in processing payments through checkout. When a customer clicks the pay button on your website, you generate an order ID containing the transaction amount and currency from your backend server, which you then pass to Glomo checkout from your frontend. This order ID secures the payment, preventing any tampering with the order amount. As a result, order integration is essential for utilizing Glomo checkout.
To proceed with the Glomo checkout integration on your site, ensure that your server is integrated with the Orders API first.
Order States
Below are the states an Order ID can have :-
State | Description |
---|---|
Created | An order created will stay in this state until a payment is attempted on it. |
Attempted | Order remains in this state until a successful payment is done. |
Success | After a payment is authorised, the order moves to a paid state. This is a terminal state and no subsequent payment attempts will be allowed. |
Expired | Order has expired without a payment attempt being made or a successful payment being created. |
Order - Payment Status Mapping
The following table shows the mapping between an order and a payment across all possible states :-
State | Payment | Description |
---|---|---|
Created | - | An order has been created but payment is yet to be tried. |
Attempted | [In progress, Failed] | Payment has been attempted but is not yet successful. |
Success | [Success, Refunded] | Payment was successful, which may be refunded later. |
Expired | Created, Failed | Order has expired without a successful payment or no payment attempt was made. |