IMPORTANT
WorldPayXML require that all payments sent to them always have a unique id, if you try to make a payment with the same orderCode it will get rejected.Test Card Details
Card Number:
4444333322221111Expiry Date:
0130CVV:
123Worldpay XML has more test cards which can be found here.
Required Parameters
transactionType
Currently only 'SALE' is supported which will take a payment from the requested card, more options can be added on request.installationId
This is provided by Worldpay.merchantCode
This is provided by Worldpay.merchantUser
This is provided by Worldpay.merchantPassword
This is provided by Worldpay.amount
Always has to be a whole number, for example £2 is 200. This is true if your exponent is set to '2' for GBP.exponent
Determines how many decimal places there are when processing a currency.currencyCode
Must be provided as 3 letters for example: 'GBP'.cardHolderName
Name as it appears on the card.address1
First line of address for the card owner.city
City for the card owner.postalCode
Postcode for the card owner.countyCode
The country code of the customer, for example: 'GB'.orderCode
Unique identifier for this payment. We always recommend using a GUID / UUID for payment references, you can see an example here.description
Description for this payment.Optional Parameters
createToken
Do you want to tokenise the card for use later?tokenScope
This is required if you set 'createToken' to 'TRUE'. You can either set it to 'shopper' or 'merchant'.authenticatedShopperID
This is required if you set 'tokenScope' to 'shopper'. This is the shoppers unique Identifier.shopperEmailAddress
The email address of the customer.tokenEventReference
This is optional if you set 'createToken' to 'TRUE'. This is your reference for the token.tokenReason
This is optional if you set 'createToken' to 'TRUE'. This is the reason for creating the token.Worldpay may support other parameters not currently integrated into the PCI platform, more information can be found here, if you would like any integrated please contact us.
Example Request
curl --location 'https://api.revopci.co.uk/' \
--header 'X-Session;' \
--header 'X-Auth;' \
--header 'Content-Type: application/json' \
--data '{
"provider": "worldpayxml",
"mode": "test",
"payment": "payment",
"parameters":
{
"transactionType": "SALE",
"installationId": "",
"merchantCode": "",
"merchantUser": "",
"merchantPassword": "",
"amount": "200",
"exponent": "2",
"currencyCode": "GBP",
"cardHolderName": "Test Test",
"address1": "123 Test Street",
"city": "Test",
"postalCode": "SANTA1",
"countryCode": "GB",
"orderCode": "00000000-0000-0000-0000-000000000000",
"description": "This is a test payment",
"createToken": "FALSE",
"tokenScope": "shopper",
"authenticatedShopperID": "00000000-0000-0000-0000-000000000000",
"shopperEmailAdress": "test@test.com",
"tokenEventReference": "00000000-0000-0000-0000-000000000000",
"tokenReason": "Taking payment for car",
}
}'