Skip to main content
Skip table of contents

Worldpay for platforms HPP (Hosted Payment Page)

Introduction

This developer guide for implementing the Worldpay for platforms hosted payment page will allow you to integrate our payments platform to start accepting eCommerce payments including Card and ApplePay / GooglePay, as well as PayID in Australia. The HPP offers your platform the capability to accept eCommerce guest checkout payments and eCommerce payments with the ability to charge the account holder on an ongoing subscription type basis.


Worldpay for platforms HPP flowchart

This flowchart below demonstrates the typical API flow of both payment scenarios, eCommerce guest checkout and eCommerce with ongoing payments.

Note:

  • 3DS and ApplePay/GooglePay is available and built-in to the Worldpay for platforms HPP

    • No extra development required from software integration side

  • ApplePay/GooglePay not available payment method for ongoing payments

  • PayID is only available in Australia

    • Extra development required when implementing ongoing payments due to the nature of PayID structure


API steps for one-off eCommerce guest checkout

The process for using the HPP token is simply:

  1. Call the POST Generate HPP Token to obtain a token and a redirect URL.

    1. Redirect your customer to the URL you received with the token.

  2. After your customer has completed the form we will redirect them back to your website using the returnURL you provided when generating the token.

  3. 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.


API steps for Ongoing Subscription Type checkout

The process for beginning the steps HPP token is the same as a one-off eCommerce guest checkout, however you will need to supply an extra property - savepayer = true.

  1. Call the POST Generate HPP Token to obtain a token and a redirect URL.

    1. Redirect your customer to the URL you received with the token.

    2. savepayer = true

  2. After your customer has completed the form we will redirect them back to your website using the returnURL you provided when generating the token.

  3. Call the Token Lookup API endpoint to obtain the result of the token.

  4. Following the initial successful transaction of the first HPP, your application will have the authority to charge the account holder as and when required by the business via the POST Process a transaction using saved card details or POST Payment Submit for PayTo.

Note - PayTo is only available in Australia. You will need to ensure you are subscrbied to our PayTo event webhooks to receive real-time notifications around PayTo events.


Test Card details

Within the Sandbox environment, you can test card transactions using the card examples below:

  • CVC = Any 3 digit number

  • Expiry Date = Any future date

Card Type

Test Card Numbers

VISA

4111111111111111
4012888888881881
4242424242424242

Mastercard

5353535353535351
5555555555554444
5105105105105100
2221000000000009
2720990000000007

AMEX

378282246310005
371449635398431
378734493671000

3DS Test Cards to test different cases

 When testing the 3DS supports a few different card numbers for triggering different scenarios:

Frictionless Success

Frictionless Fail

Challenge Required

4907639999909022

5283901906612672

4918914107195005

4016360000000010

4016360000000028

4016360000000093

How to test wallet payments (Apple Pay / Google Pay)

Your device will need to be linked to either Apple Pay or Google Pay in order for the type of wallet payment to be available to select on our Hosted Payment Page. Any transactions pushed through the Sandbox environment will not process / deduct funds from your account.


How to simulate failed transactions

A: When using the test API, the transaction amount gives you the ability to test both successful and failed payments. When the transaction amount has zero cents or a number of cents other than the ones listed below, the test transaction will always be successful. If you provide one of the following numbers for the number of cents you will receive a transaction failed response with the corresponding reason:

  • 31 = Invalid Account

  • 54 = Expired card - Card Only

  • 51 = Declined

  • 61 = Insufficient Funds

  • 96 = Technical failure - Card Only


How to simulate PayTo agreement and payment flow - Australia only

Action Agreement

  1. Once a HPP has been generated and you select PayID as the payment option, complete the page by selecting PayID Type and entering your PayID information, then click continue:

  2. Once you have entered your PayID information, you will be directed to this page below. Do not click Continue at this time. Follow the next steps below.

    1. image-20241107-050135.png

       

  3. Open a new window or tab and log into the Sandbox Portal

    1. Once logged in, click on PayTo heading

    2. Search for the PayID Agreement via the Payer or Transaction reference you specified in the API request then view the Agreement by clicking the icon on the right hand side as highlighted in yellow below:

    3. image-20240708-040428.png

       

    4. From here, click ‘Action Agreement

    5. Here you can use the ‘Sandbox Self-serve’ function to simulate responses to trigger agreement updates or change the status of the agreement and the sending of their associated webhooks.

    6. image-20240708-040639.png

       

      1. If you select Payer Action:Agreement accepted, go back to the payment page then click continue. Once you have clicked continue, follow the next steps below to trigger a successful or failed payment.

      2. If you select Payer Action:Agreement declined, go back to the payment page and you will see that the HPP returns you the the initial payment form to re-attempt the payment via Card or PayID.


Next step - Trigger successful or failed payment

  1. Once you trigger the PayTo Agreement Acceptance above, you will need to progress the payment to a successful or failed payment to finalise the payment flow in Sandbox.

    1. As you should still be logged into the Sandbox Portal from the above steps, click back to the PayTo heading once more.

    2. Search for the Agreement you just actioned and Click View

    3. image-20240708-040428.png

       

    4. When you enter the agreement page, Click View in the ‘Payment History’ section

    5. image-20240716-030040.png
    6. You will then be directed to the Payment Details page. Scroll down and use the Sandbox Self-Serve and to trigger a successful or failed payment event.

    7. image-20240716-030137.png

You can use the PayTo Self-Serve function along with the standard ‘Self-Service Centre’ to run the settlement process once payments have been processed and successful/cleared.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.