Skip to content
Last updated

Create a redirect URL

When using Token.io's HP you'll need to create a redirect URL to redirect the user to the HP. The following information provides instructions on how to do this for each payment type and for AIS.

Payments v1

Create the redirect URL by appending the request id in the response to the redirect base URL, then send it to the user to request explicit consent for the payment.

https://{{BASE_URL}}/app/request-token/{{Insert request-id here}}
// example =https://web-app.sandbox.token.io/app/request-token/rq:3RKfCA7KQEEZERLoFsAt3MoAnoP5:5zKtXEAq

You can specify a particular language by passing its language code (lang=country-code) as a query parameter, appended to the URL above, which the user can override in the HP according to personal preference. Here's an example for passing the ISO 639-1 language code for German (de):

https://{{BASE_URL}}/app/request-token/rq:o9adbFqJXcaDGNDaykPvpSZFZDW:5zKtXEAq?lang=de

Variable Recurring Payments (VRP)

Create the redirect URL by appending the request id in the response to the redirect base URL, then send it to the user to request explicit consent for the payment.

https://{{base-url}}/app/initiation?vrp-consent-id={vrp-consent-id}
// example = https://web-app.sandbox.token.io/app/initiation?vrp-consent-id=vc:G9zUH8iKcL6G5m2H37YupKjE2HX:2gFUX1NDxaJ

Specify the country for the payment. Currently VRP is only supported in the UK. The user can either choose the country in the HP, or you can pass the ISO 3166 country code (e.g., country=gb) as a query parameter appended to the URL :

https://web-app.sandbox.token.io/app/initiation?vrp-consent-id=vc:G9zUH8iKcL6G5m2H37YupKjE2HX:2gFUX1NDxaJ?country=gb

You can specify a particular language by passing its ISO 639-1 language code (e.g., lang=de) as a query parameter, appended to the URL above, which the user can override in the HP according to personal preference:

https://web-app.sandbox.token.io/app/initiation?vrp-consent-id=vc:G9zUH8iKcL6G5m2H37YupKjE2HX:2gFUX1NDxaJ?country=gb&lang=de

AIS

Create the redirect URL by appending the request id in the response to the redirect base URL, then send it to the user to request explicit consent for the AIS request.

https://{{BASE_URL}}/app/request-token/{{Insert request-id here}}
// example = https://web-app.sandbox.token.io/app/request-token/rq:3RKfCA7KQEEZERLoFsAt3MoAnoP5:5zKtXEAq

The user can either choose the country in the HP, or you can specify a particular country by passing the ISO 3166 country code (e.g., country=gb) as a query parameter appended to the URL :

https://web-app.sandbox.token.io/app/request-token/rq:3RKfCA7KQEEZERLoFsAt3MoAnoP5:5zKtXEAq?country=gb

You can also specify a particular language by passing its ISO 639-1 language code (e.g., lang=de) as a query parameter, appended to the URL, which the user can override in the HP according to personal preference:

https:///web-app.sandbox.token.io/app/request-token/rq:o9adbFqJXcaDGNDaykPvpSZFZDW:5zKtXEAq?country=gb&lang=de

If you have any feedback about the developer documentation, please contact devdocs@token.io