Handling Redirects
There are two different redirect methods you may need to use:
- Redirect for payment method page
- Redirect for 3D secure authentication page
1. Payment Page Redirect
KNET, BENEFIT, and mada require redirections in the Charges and Authorize API requests.
- First, you should provide
redirect_url
in the request.
{
...
"redirect": {
"url": "http://your_website.com/redirect_url"
}
...
}
- In the response, you will receive a
url
in thetransaction
object. Redirect the user to this URL.
"transaction": {
...
"url":"https://sandbox.payments.tap.company/test_gosell/v3/payment/
tap_process.aspx?chg=B2nmqEv7L9oCR0gKuACqGFfKPon2yWrh%2f87o6VPmjWc%3d",
...
},
-
The user is redirected to a page where they need to provide their debit card’s information, depending on the payment method. When they are done, they are redirected back to your
redirect_url
. -
You will receive
tap_id
in the response. from your server, send a Retrieve a Charge request using thistap_id
to retrieve the status of the transaction.
2. 3D Secure Redirect
3D secure credit cards and mada requires redirections in the Charges and Authorize API requests.
- First, you should provide
redirect_url
in the request.
{
...
"redirect": {
"url": "http://your_website.com/redirect_url"
}
...
}
- In the response, you will receive an
url
in thetransaction
object. Redirect the user to this URL.
"transaction": {
...
"url":"https://sandbox.payments.tap.company/test_gosell/v3/payment/
tap_process.aspx?chg=B2nmqEv7L9oCR0gKuACqGFfKPon2yWrh%2f87o6VPmjWc%3d",
...
},
-
The user is redirected to the issuer page to complete the 3D Secure authentication. When they are done, they are redirected back to your
redirect_url
. -
You will receive
tap_id
in the response. from your server, send a Retrieve a Charge request using thistap_id
to retrieve the status of the transaction.
Updated about 1 year ago