Learn about the web integration for a Cashfree hosted payment page
order_id
and payment_session_id
that you need for subsequent steps.
You can view all the complete api request and response for /orders
here.
sandbox
or production
.
Sandbox is used for test environment, whereas production is used for production mode.
cashfree.checkout()
method. This method can take in following parameters -
paymentSessionId
(required) - Received from Create Order ResponseredirectTarget
(optional) - This parameter decides how the payment page will open up. You can provide the following values: Property Value | Description |
---|---|
_self(default) | Opens the payment link in the same frame as it was clicked. |
_blank | Opens the payment link in a new window or tab. |
_top | Opens the linked document in the full body of the window. |
_modal | Opens the payment link in a pop-up window on the current page. |
DOM element | Opens the payment link directly within a specified DOM element. |
Redirect Checkout
- For redirectTarget _self
, _blank
, _top
Popup Checkout
- For redirectTarget _modal
Inline Checkout
- For redirectTarget DOM element
cashfree.checkout()
function returns a promise which should be handled by the merchant
Order Status - Verification
To verify an order you can call our /pg/orders
endpoint from your backend. You can also use our SDK to achieve the same.