Durianpay enables you to create Orders (or payment intents) and link them to actual payments. Orders are important as it helps you associate every payment with an order (and a customer), thus preventing multiple/duplicate payments easily as well as eases refund/partial refunds.
We recommend creating Order as soon as amount is known, such as when customer begins the checkout process, to help track your sales funnel. If the amount changes, you can update the amount as well. For example, if your customer backs out of the checkout process and adds new items to their cart, you may need to update the amount accordingly when they start the checkout process again.
If the checkout process is interrupted and resumes later, you should attempt to reuse the same Order instead of creating a new one. Each Order has a unique ID that you can use to retrieve it if you need it again. In your application’s data model, you can store the OrderID on the customer’s shopping cart or session in order to facilitate retrieval. The benefit of reusing the Order is that the object helps track any failed payment attempts for a given customer, cart or session.
|When you create an order, it is in |
|An order moves to |
|After the successful capture of the payment, the order moves to the |