Payrix Hosted Payment Page (HPP)
Hosted Payment Page
The Payrix platform offers the ability to utilise the Payrix Hosted Payment Page which is implemented via a re-direction to the Payrix Payment page. This offering is the simplest way to integrate a payment solution to your software with minimal development work required.
Functionality of a HPP:
Accepts payment via Card, PayTo/PayID and Wallet (Apple Pay or Google Pay)
can be set to single one-time payment with no intention to save payer data
OR supply the ‘savepayer’ paramater set to ‘true’ to save payer data to Payrix secure vault for ongoing payments
Note - Wallet Payment only available for single one-time payment
Does not accept BPAY payment
Payment submitted in real-time with real-time response
The process for using the Payrix HPP token is simply:
Call the POST Generate HPP Token to obtain a token and a redirect URL.
Redirect your customer to the URL you received with the token.
After your customer has completed the form we will redirect them back to your website using the returnURL you provided when generating the token.
Call the Token Lookup API endpoint to obtain the result of the token.
Please note the token is valid for 20 minutes. You may wish to use a landing page to trigger this if the page will not be completed as part of the flow.
For example - if your application intends to supply the customer an email of an invoice with a payment link, you will need a landing page to trigger the HPP as the token is only valid for 20 minutes.
The typical API workflow is noted below:
Use the endpoint - POST Generate HPP Token
Redirect your customer to the URL you received with the token.
Poll Token Lookup API to identify result of HPP.
If Successful and one-off payment, complete
If rejected, implement workflow to generate a subsequent HPP token to capture payment
If Saving Payer Payment Method for future payments, charge stored card (real-time transaction) or utilise scheduling API (2 business day transaction result)
Sample API flow for successful single/one-off payment via Payrix Hosted Payment Page (HPP)
API |
---|
Depending on the workflow of your application, the HPP payment can still be allocated to a Payer Reference only if a Payer Record has been created previously:
Refer to Token [HPP] Generate Model for more information around the API properties. |
Sample |
---|
Example Request
JSON
JSON
Example Request allocated to Payer record via UniqueReference
JSON
JSON
Example Response
JSON
|
Next Steps once page is completed and submitted
API |
---|
Call the Token Lookup API endpoint to obtain the result of the token.
Please note the token event and token event status do not relate to the same meaning:
|
Sample |
---|
Example Request
JSON
Example Response
JSON
Example Request allocated to Payer record via UniqueReference
JSON
JSON
|
Sample API flow for successful HPP Payment + Save Payer Data via Payrix Hosted Payment Page (HPP)
API |
---|
If payment is for one-off and no requirement to store payment details, set ‘SavePayer’ parameter = ‘false’ As seen in sample - Sample API flow for successful HPP Payment + NOT Save Payer Data Refer to Token [HPP] Generate Model for more information around the API properties. |
Sample |
---|
Example Request
JSON
JSON
Example Response
JSON
|
Next Steps once page is completed and submitted
API |
---|
Call the Token Lookup API endpoint to obtain the result of the token.
Please note the token event and token event status do not relate to the same meaning:
|
Sample |
---|
Example Request
JSON
Example Response
JSON
|
Implement Recurring Payment solutions after Saving Payer Data via HPP
When you elect to save payer data via the Payrix HPP, the payer must agree to the Direct Debit Terms & Conditions. This allows Payrix to debit their nominated account as and when required directed by the business. To collect future payments, the Payrix platform offers 3 solutions:
Process a transaction using saved card details / charge stored card
Processes a real-time card transaction on the card account registered to the payers account
Schedule a single payment
A non real-time card transaction allowing you to schedule a payment to be processed on the current or future date
Schedule multiple future payments
A non real-time card transaction allowing you to schedule multiple future payments to be processed on the current and future date
Should your application intend to utilise the scheduling API, refer to the Scheduling API guide here for steps to initiate a scheduled debit.
Refer to the links to implement a recurring payment solution after saving payer data:
What if a payment via the Payrix Hosted Payment Page fails or is unsuccessful?
When a payment is declined through the Payrix Hosted Payment Page, a new HPP will need to be generated. This is due to the fact that a HPP token is valid for 20 minutes and is a one-time use token. Ensure to keep this in mind when implementing your desired workflow and have a solution in place to generate a new HPP to re-attempt payment.
The API flow will be the same for a rejected payment and to keep it simple, a sample flow is below when implementing a HPP without saving payer data.
Sample API flow for failed HPP Payment
API |
---|
Refer to Token [HPP] Generate Model for more information around the API properties. |
Sample |
---|
Example Request
JSON
JSON
Example Response
JSON
|
Next Steps once page is completed and submitted
API |
---|
Call the Token Lookup API endpoint to obtain the result of the token.
Please note the token event and token event status do not relate to the same meaning:
Here you can see that the Token Status and Token Event Status differ:
|
Sample |
---|
Example Request
JSON
Example Response
JSON
|
This concludes the API workflow of implementing the Payrix Hosted Payment Page to your application. Refer to our other methods available for accepting payments.