Handling Redirects

There are two different redirect methods you may need to use:

  1. Redirect for payment method page
  2. Redirect for 3D secure authentication page



1. Payment Page Redirect

KNET, BENEFIT, and mada require redirections in the Charges and Authorize API requests.

  1. First, you should provide redirect_url in the request.
{
  ...
  "redirect": {
     "url": "http://your_website.com/redirect_url"
  }
  ...
}
  1. In the response, you will receive a url in the transaction 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",
     ...
  },
  1. 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.

  2. You will receive tap_id in the response. from your server, send a Retrieve a Charge request using this tap_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.

  1. First, you should provide redirect_url in the request.
{
  ...
  "redirect": {
     "url": "http://your_website.com/redirect_url"
  }
  ...
}
  1. In the response, you will receive an url in the transaction 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",
     ...
  },
  1. 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.

  2. You will receive tap_id in the response. from your server, send a Retrieve a Charge request using this tap_id to retrieve the status of the transaction.