Create payments or mandates with the HPP

Learn the steps required to accept payments through the hosted payment page.

Before you start

Before you get started with the hosted payment page, there are a couple of steps to cover first.

Build a hosted payment page URL

After creating a payment or VRP through the Payments API, you can build a hosted payment page URL for the transaction. The URL should include the following hash parameters:

Hash parameterDescriptionRequired
payment_id or mandate_idReturned by Payments API on payment creation or mandate creation.Yes
resource_tokenReturned on payment creation.Yes
return_uriWhere the user is redirected when they exit the payment flow. This should match one of the entries you've added to your redirect_uri allow list in Console.Yes

To build the URL, substitute these parameters for the text and enclosing curly brackets in the URL below:

EnvironmentURL structure
SandboxFor payments:{payment_id}&resource_token={resource_token)&return_uri={return_uri}

For VRP mandates:{payment_id}&resource_token={resource_token)&return_uri={return_uri}
ProductionFor payments:{payment_id}&resource_token={resource_token)&return_uri={return_uri}

For VRP mandates:{payment_id}&resource_token={resource_token)&return_uri={return_uri}

Here is an example of a hosted payment page link built correctly:

Direct your user to the HPP

Direct your user to the hosted payment page URL you've just built.

Typically, you direct your users to the hosted payment page through a button in your app named Instant Bank Transfer. Learn more about how to design your user experience and interface.

Confirm the payment result

After the user has successfully authorised their payment they are redirected to the return_uri specified in your hosted payment page URL. The payment_id is appended as a query parameter to your return_uri.

For example:

If your user chooses not to complete the payment and cancels on the hosted payment page, then an extra error query parameter is appended, containing tl_hpp_abandoned.

For example:

In order to communicate the payment result to your user, you can retrieve the payment status via webhooks notifications.