Skip to content

Integrate Checkout on Client-Side

To integrate the payment checkout process within your website or application, redirect the customer to the following URL:

const REDIRECT_URL = 'https://yourwebsite.com/checkout_redirect.php?orderId=' + ORDER_ID;
https://merchant.uat.gateway.ompay.com/cpbs/pg?actionType=checkout&orderId={ORDER_ID}&redirectUrl={REDIRECT_URL}&clientId={CLIENT_ID}
https://merchant.gateway.ompay.com/cpbs/pg?actionType=checkout&orderId={ORDER_ID}&redirectUrl={REDIRECT_URL}&clientId={CLIENT_ID}
Parameter Mandatory Description Type Example
orderId Yes Pass the orderId received from the server upon creating the order. String "wb-e883b28d-0cd3-455d-9903-ef5d3d8ddf27"
redirectUrl Yes URL to which the user is redirected after the payment process completes. String "https://example.com/receipt"
clientId Yes Pass your clientId. String "your-client-id"
  1. Create an order on the server.
  2. Redirect the customer to the checkout URL (UAT or Production).
  3. The customer completes the payment.
  4. The customer is redirected back to the specified redirectUrl.
  5. OMPAY also sends a webhook notification to your server with the payment result (see Handle Payment Success and Failure).
  6. Call the Status Check API to retrieve the final status of the order.