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.
Info |
---|
Functionality of a HPP:
|
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.
Info |
---|
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:
Payrix Hosted Payment Page (HPP)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)
Anchor | ||||
---|---|---|---|---|
|
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:
|
Sample | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Example Request
Example Request allocated to Payer record via UniqueReference
Example Response
|
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
Example Response
Example Request allocated to Payer record via UniqueReference
|
Sample API flow for successful HPP Payment + Save Payer Data via Payrix Hosted Payment Page (HPP)
API | ||||
---|---|---|---|---|
|
Sample | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Example Request
Example Response
|
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
Example Response
|
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
Info |
---|
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 | ||
---|---|---|
|
Sample | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Example Request
Example Response
|
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
Example Response
|
This concludes the API workflow of implementing the Payrix Hosted Payment Page to your application. Refer to our other methods available for accepting payments.