Send test APM orders

For test orders, send the same XML as you would in the production environment.

The test URL to send XML messages to is:

Simulators and magic values

You can use a simulator or magic value to select a desired payment outcome:

  • In the simulator you can test the redirection of the shopper's browser and choose the payment outcome in a drop down

    Note: Not all APM providers support all browsers. The simulator may support a browser that is not supported by an APM.

  • You can send magic values in your XML request to bypass the simulator

Use the simulator

  1. Submit an XML order. Worldpay sends a reply containing a URL to redirect your browser.
    • Direct model: The simulator page is displayed.
    • Hosted model: The payment method selection page is displayed (unless you're bypassing it). Select the desired payment method to display the simulator page.
  2. Select the desired outcome from the Payment Outcome list and click Continue. Your browser is redirected to a result page.

Best practice: Do not use your browser's Back button to return to the simulator for the purpose of submitting another payment. Always submit unique orders using XML. Returning to the simulator page to submit a new payment may cause errors and result in reporting problems.

Use a magic value

A magic value represents a payment outcome, and skips the simulator. The shopper's browser is typically redirected to a payment result page.

Magic values are supported for:

  • AliPay
  • WebMoney
  • Paysafecard
  • Union Pay

Where to send a magic value

Specify a magic value in the <lastName> of <shippingAddress> or <billingAddress>. Below is an example order for the Hosted integration:

<?xml version="1.0"?>
<!DOCTYPE paymentService PUBLIC "-//Worldpay//DTD Worldpay PaymentService v1//EN"
<paymentService merchantCode="DEMO" version="1.4">
    <order orderCode="YOUR_ORDER_CODE">
      <amount currencyCode="EUR" exponent="2" value="7500"/>
        <include code="ALL"/>
          <lastName>PENDINGERROR</lastName> <!--Magic value for payment outcome-->
      <statementNarrative>STATEMENT NARRATIVE TEXT</statementNarrative>

Supported payment outcomes

You can specify one of these payment outcomes either in the simulator, or as a magic value:

Magic value in <lastName>Option in simulatorResult URLPayment status

Note: Where supported by the APM, if you select Cancelled in the simulator, this instead produces a SHOPPER_CANCELLED status.

REFUSED (only works for Union Pay)Not authorisedNot authorisedREFUSED