Click here to search the entire website

Quick start (Hosted)

Once you have a test account, follow these steps to make your first basic test payments:

Setup

Prerequisites

Your Implementation Manager (or support contact) should have given you:

  • A Merchant Code (or codes)

  • An installation id (or ids)

  • A Merchant Administration Interface Username and Password

Note:  We test the Hosted Payment Pages on a number of devices on an ongoing basis by default, as a result of new features being added. A list of the devices we test and support can be found in our support article.

Get your credentials

  1. Log in to the test Merchant Administration Interface (MAI):

    https://secure-test.worldpay.com/sso/public/auth/login.html?serviceIdentifier=merchantadmin

  2. Click Account, then select Profile from the smart menu tab at the top.

  3. Note your New Username for the connection.

  4. Click the pencil icon () next to XML Password.

  5. Enter your new password and click Save XML Password.

Restrict IP addresses

You can restrict connections to your test account by specifying a number of IP addresses or ranges that your account can be accessed from. To do this:

  1. Click Integration.

  2. Go to the Merchant Environment tab, and click New Test IP to add a new IP address (or range).

Best practice:  Send messages to fully qualified domains

Don’t send messages to specific IP addresses, as these can change, leading to a break in communications – sometimes we need to move to different IP addresses in our range to communicate with you.

Integrate

Connect to Worldpay

To process payments through Worldpay you must:

  • Use a secure connection. We recommend that you use Transport Layer Security v1.2 (TLS v1.2), however as a minimum you should use TLS v1.1

  • Use basic authentication (the New Username and XML Password as created above)

  • Use content type “text/xml"

The legacy protocols SSL v3 and TLS v1.0 are scheduled to be decommissioned. For more information visit http://offers.worldpayglobal.com/SSL-2.html.

Create payment request

You interact with Worldpay using XML messages. All messages should conform to the Worldpay Document Type Definition (DTD) and must be less than 4KB. To avoid issues always use industry-standard tools to validate and parse XML.

Set up your platform

Set up your platform for submitting XML messages to Worldpay’s payment service.

Note:  The Worldpay payment service only accepts incoming XML messages if the originating IP address is registered for the merchant code in the message. For more information about registering and managing multiple IP address ranges, see the Merchant Environment section of the Merchant Admin Interface Guide.

Payment

The test URL to send XML messages to is: https://secure-test.worldpay.com/jsp/merchant/xml/paymentService.jsp

Example XML order

Here's a basic example of the data submitted for a card test payment. Before you send it you need to change the merchantCode to your own, and be aware that each payment requires a unique orderCode:

Select

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE paymentService PUBLIC "-//Worldpay//DTD Worldpay PaymentService v1//EN"

  "http://dtd.worldpay.com/paymentService_v1.dtd">

<paymentService version="1.4" merchantCode="YOUR_MERCHANT_CODE"> <!--Enter your own merchant code-->

  <submit>

    <order orderCode="YOUR_ORDER_CODE" installationId="1234567"> <!--Enter a unique order code each time-->

      <description>YOUR_DESCRIPTION</description> <!--Enter a description useful to you-->

      <amount currencyCode="GBP" exponent="2" value="5000"/>

      <paymentMethodMask>

        <include code="ALL"/>

      </paymentMethodMask>

      <shopper>

        <shopperEmailAddress>ashopper@myprovider.com</shopperEmailAddress>

      </shopper>

      <billingAddress>

        <address>

          <address1>47A</address1>

          <postalCode>CB94BQ</postalCode>

          <city>Cambridge</city>

          <countryCode>GB</countryCode>

        </address>

      </billingAddress>

    </order>

  </submit>

</paymentService>

Example Hosted order

The response to this order

In response, we send a redirect URL to the payment page:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE paymentService PUBLIC "-//WorldPay/DTD WorldPay PaymentService v1//EN"

  "http://dtd.worldpay.com/paymentService_v1.dtd">

<paymentService version="1.4" merchantCode="ExampleCode1"> <!--The merchantCode you supplied in the order-->

  <reply>

    <orderStatus orderCode="ExampleOrder1"> <!--The orderCode you supplied in the order-->

      <reference id="REFERENCE">https://payments-test.worldpay.com/app/hpp/integration/wpg/corporate?OrderKey=NGPPTESTMERCH1%5Ejsxml3835829684&amp;Ticket=00146321872957902pqKhCTUf0vajKCw-X5HqZA</reference>

    </orderStatus>

  </reply>

</paymentService>

Example response

With the redirect URL you can go to the payment page and send the values shown in Test scenarios. Note that this is a very basic setup, and does not cover additional features explained in Payment requests (such as appending the result URL to include additional parameters).

 

About testing