Redirection
We have 3 solutions for the redirection. And please consider these options and choose the solution that best fits your business requirements.
Solution 1: Using Our Default Landing Pages
Processing page:
https://static.cpayapi.com/pages/payment-processing.html?orderId={cpay-transaction-id}Success page:
https://static.cpayapi.com/pages/payment-success.html?orderId={cpay-transaction-id}Fail page:
https://static.cpayapi.com/pages/payment-fail.html?orderId={cpay-transaction-id}
When calling the pay-in endpoint, you should pass an empty string to the retURL, successURL and failURL parameters.
In the synchronous response body, the redirectURL field will contain the URL of either the processing page URL or the 3DS URL from the acquirer.
After finishing the 3DS process, users will be redirected to the processing page. Within this page, the transaction status will be automatically queried from the acquirer, and if the transaction status changes, users will be redirected to either the success page or the fail page based on the updated status.
if it is successful, users will be redirected to the
success page.If it is failed, users will be redirected to the
fail page.
Solution 1 focuses on utilizing the default landing pages provided by our system for expediting the integration process.

Processing Page

Success Page

Fail Page
Solution 2: Using Your Custom Landing Pages
Processing page:
https://your.domain.com/pages/payment-processing.html?orderId={your-transaction-id}Success page:
https://your.domain.com/pages/payment-success.html?orderId={your-transaction-id}Fail page:
https://your.domain.com/pages/payment-fail.html?orderId={your-transaction-id}
When calling the pay-in endpoint, you should pass your landing pages' URLs as the retURL, successURL and failURL parameters.
In the synchronous response body, the redirectURL field may have different values based on orderStatus:
If
orderStatus=11, theredirectURLfield will be eitheryour processing pageURL or the3DSURL from the acquirer. If thehtmlSourcefield is not empty, you can render the3DS pageusing your own domain by utilizing thehtmlSourcefield.If
orderStatus=14, theredirectURLfield will beyour success pageURL.If
orderStatus=15, theredirectURLfield will beyour fail pageURL.
After finishing the 3DS process, users will be redirected to your processing page directly from the acquirer. In your processing page, you will need to implement the necessary logic to handle the redirection to the success or fail page based on the transaction status.
With solution 2, you have the flexibility to use your own landing pages for the processing, success and fail stages, and you can implement the redirect logic according to your requirements in your custom processing page.
Note:
Some acquirers can not redirect to your custom processing page with your parameters.
For example, we pass retURL=https://your.domain.com/pages/payment-processing.html?orderId={your-transaction-id}, and expect the users will be redirected to this URL, while the users redirected to https://your.domain.com/pages/payment-processing.html, without the paramters, after the 3DS process.
Solution 3: Using Our Processing Page and Your Custom Success/Fail Pages
Our processing page:
https://static.cpayapi.com/pages/payment-processing.html?orderId={cpay-transaction-id}Your success page:
https://your.domain.com/pages/payment-success.html?orderId={your-transaction-id}Your fail page:
https://your.domain.com/pages/payment-fail.html?orderId={your-transaction-id}
When calling the pay-in endpoint, you should pass your landing pages' URLs as successURL and failURL parameters. The retURL parameter must be empty.
In the synchronous response body, the redirectURL field will be our processing page URL or the 3DS URL from the acquirer.
After finishing the 3DS process, users will be redirected to our processing page. Within this page, the transaction status will be automatically queried from the acquirer, and if the transaction status changes, users will be redirected to either your success page or your fail page based on the updated status.
If the payment is successful, users will be redirected to
your success pagefrom our domain.If the payment is failed, users will be redirected to
your fail pagefrom our domain.
With solution 3, the processing page is handled by us, while the success and fail pages are your own customized pages. And the redirection from our processing page to your pages will occur within our domain.
Last updated