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.

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.
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.
Last updated