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.
Order Life Cycle
|When you create an order, it is in
started state. It stays in this state till any payment is attempted against it
|An order moves to
processing state when a payment is created/attempted on it. It remains in this state till one payment associated with this order (at least) is captured
|After the successful capture of the payment, the order moves to the
paid state. No further payment requests are permitted once the order moves to the paid state. The order stays in this state even if the payment associated with the order is refunded
string The unique identifier of Order
string The amount for which the Order was created
string The type of payment option with which order is created. Can be of type
installment. Default value:
string The currency associated with the Order's amount
string The status of Order
string The unique identifier of Order from the merchant
boolean Flag denoting if the order has been created in
integer Indicates the Unix timestamp when this Order was created
object Information about the customer who created the Order
array Array of payment objects against the Order
json object Key-Value pair that can be used to store additional information about the entity. e.g.
Force is with this order