Creating an order is the first and critical step in processing a payment through the EnKash Payment Gateway. The Order API generates a unique OrderID
, which acts as the core reference throughout the transaction lifecycle.Purpose#
Order Security: Ensures transaction integrity by preventing tampering with amount or details.
Payment Binding: Ties a single successful payment to each order to avoid duplicates.
Integration Backbone: Links the order to Checkout, enabling a secure and traceable flow.
Workflow#
1
Customer Action
The customer clicks the "Pay" button on your platform.
2
Order Creation
Your backend calls the Order API, which returns a unique Order ID along with transaction details (amount, currency, etc.).
3
Checkout Integration
The Order ID is passed to the EnKash Checkout for secure and streamlined payment handling.
Advantages#
Single Successful Payment Enforcement
Prevents multiple payments from being accepted against the same order.
Optimized Querying
Simplifies reconciliation by associating multiple payment attempts to a single order.
Key Integration Steps#
1
Create Order
Use the Create Order API with transaction metadata such as amount
, currency
, and optional custom fields.
2
Initiate Checkout
Pass the generated OrderID
to EnKash Checkout for rendering the payment UI.
3
Track Order
Use Get Order Status or related APIs to monitor order status through the payment lifecycle.
Order Lifecycle Statuses#
Status | Description |
---|
CREATED | Order successfully created and ready for Checkout |
CHECKOUT_RENDERED | Customer redirected to EnKash Checkout |
ATTEMPTED | Customer attempted payment |
PAID | Payment completed successfully |
CANCELLED | Customer canceled the transaction |
EXPIRED | Order expired due to timeout or inactivity |