Last Updated: 26 March 2024 | Change Log
Take repeat card payments
This documentation is for version 7 of the Card Payments API. If you're using version 6, you can find information on how to upgrade in our migration guide.
Take repeat card payments using our Card Payments API.
Merchant Initiated Transactions
You can take payments without the active participation of the customer according to an agreement previously made with the cardholder. These are known as Merchant Initiated Transactions (MITs).
POST
to our merchantInitiatedTransactions
endpoint to authorize a payment.
The requests below contain all the mandatory fields needed for a successful authorization request.
POST
https://try.access.worldpay.com/cardPayments/merchantInitiatedTransactions
Click the tabs below to see all the mandatory fields for all supported paymentInstrument
parameters.
Merchant Initiated Transaction request body:
{
"transactionReference": "Memory265-13/08/1876",
"merchant": {
"entity": "default"
},
"instruction": {
"requestAutoSettlement": {
"enabled": false
},
"narrative": {
"line1": "Mind Palace"
},
"value": {
"currency": "GBP",
"amount": 250
},
"paymentInstrument": {
"type": "card/plain",
"cardNumber": "4444333322221111",
"expiryDate": {
"month": 5,
"year": 2035
}
},
"customerAgreement": {
"type": "subscription",
"schemeReference": "000000000000020005060720116005061"
}
}
}
Before taking a Merchant Initiated Payment, you must obtain prior agreement with the cardholder to store a card.
Parameter descriptions
Parameter | Required | Description |
---|---|---|
transactionReference | ✅ | A unique reference generated by you that is used to identify a payment throughout its lifecycle. See transaction reference format, for more details and the best practices. |
merchant | ✅ | An object that contains information about the merchant. |
merchant.entity | ✅ | Direct your payment to assist with billing, reporting and reconciliation. This is mandatory for authentication and queries. Contact your Implementation Manager for more details. |
merchant.mcc | ❌ | You can apply a merchant category code (mcc ) to an individual request. You can only provide an mcc if we have enabled the dynamic mcc feature during boarding. If enabled but not provided, merchant.mcc defaults to a configured value. For more information contact your Relationship Manager. |
merchant.paymentFacilitator | ❌ | An object containing Payment Facilitator information. This information is required for every authorization only if you are a Payment Facilitator:
|
instruction | ✅ | An object that contains all information related to the payment. |
instruction.narrative | ✅ | The text that appears on your customer's statement. Used to identify the merchant. See narrative format for more details and best practices. |
narrative.line1 | ✅ | The first line of the narrative which appears on your customer's statement (24 characters max. If character is not supported it is replaced with a space.). See narrative line1 format for more details. |
narrative.line2 | ❌ | Additional details about the payment e.g. order number, telephone number. |
instruction.requestAutoSettlement.enabled | ✅ | A boolean value to indicate whether the transaction should be sent for settlement now (true ), or later using an action link (false ) |
instruction.customerAgreement | ✅ | An object containing details about processing agreements made with your customer, i.e.:
|
customerAgreement.type | ✅ | Possible values:
|
customerAgreement.storedCardUsage | ❌ | Indicate whether the transaction is using a stored card. MITs with the following customerAgreement.type values always use a stored card:
customerAgreement.type values do not necessarily use a stored card:
customerAgreement.storedCardUsage . Possible values:
|
customerAgreement.schemeReference | ❌ | A unique reference provided by card schemes for each payment. Used to link merchant-initiated transactions to the original customer-initiated transaction where a repeat payment agreement was made between you and your customer.
|
instruction.value | ✅ | An object that contains information about the value of the payment. |
value.currency | ✅ | The three digit currency code. See list of supported currencies. |
value.amount | ✅ | The payment amount. This is a whole number with an exponent e.g. if exponent is two, 250 is 2.50. You can find the relevant exponent in our currency table. |
instruction.paymentInstrument | ✅ | An object that contains the payment type and details. |
paymentInstrument.type | ✅ | An identifier for the paymentInstrument being used. Possible values:
|
paymentInstrument.cardHolderName | ❌ | The name on your customer's card. This is not a mandatory field however it is recommended that you supply this to improve authorization rates. If not sent, the default value is "Not Supplied". |
paymentInstrument.expiryDate | ✅ | The expiry date of the supplied payment instrument. This will usually be the expiry date printed on the card, however for card/networkToken , card/networkToken+googlepay and card/networkToken+applepay , the token expiry should be supplied.Mandatory where the paymentInstrument has a type of: card/plain , card/networkToken , card/networkToken+googlepay or card/networkToken+applepay . |
paymentInstrument.cardNumber | ✅ | Your customer's card number. Mandatory for card/plain requests. |
paymentInstrument.tokenNumber | ✅ | The token number for card/networkToken ,card/networkToken+googlepay and card/networkToken+applepay payment instruments. |
paymentInstrument.billingAddress | ❌ | An object containing the billing address information. If included you must send at least:
card/plain ,card/wallet+applepay or card/wallet+googlepay payment instrument. Our API checks the submitted AVS to see if it matches the address registered with the issuing bank. If the address supplied does not match the registered address it means that the payment carries additional risk. |
riskProfile | ❌ | Used to apply the SCA exemption in the payment request and update the FraudSight data model to benefit future payments. |
Latin America (LatAm)
Take payments in Latin America with additional regional functionalities and parameters, such as combo cards or customer's tax/document reference.
Parameters
Parameter | Required | Description |
---|---|---|
customer.documentReference | ❌ | The customer's document reference number is required for domestic processing in some Latin America countries in order to reduce fraud and improve approval rates. Some example documents:
|
instruction.routing.fundingType | ✅ | Specify the source of funds for cards that combine multiple funding types (sometimes referred to as "combo cards"). Possible values:
|
order.salesTax | ✅ | The amount of sales tax (VAT/IVA) for the transaction. |
Code example
"instruction": {
"routing": {
"fundingType": "debit"
}
},
"customer": {
"documentReference": "123-ABC"
},
"order": {
"salesTax": 300
}
Funds Transfers
A funds transfer is a money movement for a reason other than for the purchase of goods or services. These are also referred to as Account Funding Transactions (AFTs).
Examples:
- Loading a wallet with funds using a card (including stored value digital wallets and crypto or trading wallets)
- Adding funds to a pre-paid card using another card
- Sending money to another person (for example as a gift)
Parameters
You must include the instruction.fundsTransfer
object to correctly flag a transaction as a funds transfer.
Parameter | Required? | Description |
---|---|---|
instruction.fundsTransfer | ❌ | An object containing details about the transfer, the sender and the recipient of funds. |
fundsTransfer.type | ✅ | Possible values:
|
fundsTransfer.purpose | ❌ | Possible values:
|
fundsTransfer.sender | ❌ | An object containing details about the sender of funds. Includes:
|
fundsTransfer.recipient | ❌ | An object containing details about the recipient of funds. Includes:
|
recipient.account | ❌ | An object for the account details of the recipient |
account.type | ❌ | Possible values:
|
account.identifierType | ❌ | Required when account.type is bankAccount . Possible values:
|
account.reference | ❌ | A reference specific to the account type selected. Possible fields:
|
Code example
"instruction": {
"fundsTransfer": {
"type": "transfer",
"purpose": "crypto",
"recipient": {
"account": {
"type": "wallet",
"walletReference": "ABCDE12345"
},
"firstName": "John",
"middleName": "Roger",
"lastName": "Smith",
"address": {
"address1": "221B Baker Street",
"address2": "Marylebone",
"postalCode": "NW1 6XE",
"city": "London",
"state": "LDN",
"countryCode": "GB"
},
"dateOfBirth": {
"day": 12,
"month": 4,
"year": 2001
},
"phoneNumber": "+447987 654321"
},
"sender": {
"firstName": "John",
"middleName": "Roger",
"lastName": "Smith",
"address": {
"address1": "221B Baker Street",
"address2": "Marylebone",
"postalCode": "NW1 6XE",
"city": "London",
"state": "LDN",
"countryCode": "GB"
}
}
}
}
Financial Services (including MCC 6012)
If you provide financial services, debt repayments, or consumer bill payments, you should supply additional details in the authorization request for compliance reasons.
Parameters
Parameter | Required | Description |
---|---|---|
instruction.debtRepayment | ❌ | DRI is a flag which identifies a payment as being for the purpose of repaying a debt. Possible value:
|
instruction.consumerBillPayment | ❌ | An attribute that identifies a bill payment paid by providers on behalf of consumers. If you are registered with Visa as a Consumer of the Bill Payment Service (CBPS), you must set this to true for any payments associated with the CBPS. |
recipient | ❌ | An object containing information about the recipient of financial services. Required for MCC 6012 transactions in the Visa Europe region. The recipient may or may not be the cardholder. |
recipient.accountReference | ❌ | The account number of the recipient. Either a bank account number or a partial card number. |
recipient.lastName | ❌ | The last name of the recipient. |
recipient.dateOfBirth | ❌ | The date of birth of the recipient. |
recipient.address.postalCode | ❌ | The postal code of the recipient. Relevant only in the UK. |
Code example
"instruction": {
"debtRepayment": false,
"consumerBillPayment": true
},
"recipient": {
"accountReference": "12499844",
"lastName": "Moriarty",
"address": {
"postalCode": "SW1 1AA"
},
"dateOfBirth": {
"day": 29,
"month": 4,
"year": 1990
}
}
Level 2 / Level 3 data
Achieve several cost and efficiency benefits when supplying Level 2 & Level 3 data as part of the authorization or settlement requests.
Benefits
Benefit | Description |
---|---|
Reduced interchange fees | If you are a US based merchant, you can qualify for lower interchange fees on transactions by providing additional order-specific data, such as tax reference, product code or sales tax amount. Card networks often offer lower rates for transactions with enhanced data, reducing processing costs. |
Enhanced fraud detection | Detailed transaction data allows card networks to better authenticate purchases, reducing fraud and chargeback rates. |
Improved dispute management | With comprehensive transaction details, card networks can better handle and resolve disputes. This reduces the time and effort you spend managing chargebacks and can lead to faster resolutions. |
Increased customer trust and satisfaction | Providing enhanced data improves transaction transparency, giving customers more confidence in their purchases. It also leads to more accurate transaction records on your customer's statements, minimizing confusion or disputes. |
Compliance with industry standards | Card networks increasingly require detailed transaction data to maintain compliance with industry standards and processing requirements. |
Parameters
Parameter | Required | Description |
---|---|---|
merchant.taxReference | ❌ | Your tax reference. |
shipping.recipient | ❌ | An object containing recipient's postal and country codes. |
shipping.sender | ❌ | An object containing sender's postal code. |
customer.reference | ❌ | Customer reference for the order. |
order.invoiceReference | ❌ | Invoice reference for the order. |
order.salesTax | ❌ | Total amount of sales tax for the order. |
order.discountAmount | ❌ | Total amount of discounts for the order. |
order.shippingAmount | ❌ | Total amount of shipping costs for the order. |
order.dutyAmount | ❌ | Total amount of duty costs for the order. |
order.orderDate | ❌ | Date of the order. |
order.taxExempt | ❌ | A flag to indicate whether the purchase is exempt from tax. Must be set to true if order.salesTax is 0. |
order.items | ❌ | An array with objects containing details of items purchased. Each object represents one group of items and you can submit up to 99 item groups. |
items.productCode | ❌ | Merchant defined product code. |
items.commodityCode | ❌ | Commodity code as defined by the National Institute of Governmental Purchasing. |
items.name | ❌ | Name of the item(s). |
items.quantity | ❌ | Number of items purchased. |
items.unitOfMeasure | ❌ | The unit of measure of the purchased item. Explains how to interpret items.quantity field, e.g. quantity = 15, unitOfMeasure = kg |
items.unitCost | ❌ | The price of one unit of the item purchased. |
items.totalAmountNoTax | ❌ | Total cost of the item(s) excluding tax. |
items.totalTaxAmount | ❌ | Total tax amount for the item(s). |
items.totalAmount | ❌ | Total cost of the item(s) including tax. |
items.totalDiscountAmount | ❌ | Total discount amount for the item(s). |
Code example
{
"merchant": {
"taxReference": "VAT1999292",
},
"shipping": {
"recipient": {
"address": {
"postalCode": "NW1 6XE",
"countryCode": "GB"
}
},
"sender": {
"address": {
"postalCode": "NW1 6XE"
}
}
},
"customer": {
"reference": "CUST00000001"
},
"order": {
"invoiceReference": "INV000123451",
"salesTax": 3500,
"discountAmount": 400,
"shippingAmount": 150,
"dutyAmount": 325,
"orderDate": {
"day": 1,
"month": 3,
"year": 2024
},
"taxExempt": false,
"items": [
{
"productCode": "fff-1223",
"commodityCode": "ABC123",
"name": "Red Hat",
"quantity": 4,
"unitCost": 3500,
"unitOfMeasure": "kg",
"totalAmountNoTax": 2000,
"totalTaxAmount": 2000,
"totalAmount": 2000,
"totalDiscountAmount": 2000
}
]
}
}
Airline Itinerary Data
Achieve several cost and efficiency benefits when supplying detailed airline itinerary data. You can submit these additional details in the authorization or settlement requests, depending on when your booking system generates the ticket number.
Benefits
Benefit | Description |
---|---|
Reduced interchange fees | If you are an airline merchant you can qualify lower interchange fees on transactions by providing airline-specific data, such as flight details, ticket numbers, and passenger information. Card networks often offer lower rates for transactions with enhanced data, reducing processing costs. |
Enhanced fraud detection | Detailed transaction data allows card networks to better authenticate purchases, reducing fraud and chargeback rates. This is especially important for high-ticket airline transactions, where fraud prevention is critical. |
Improved dispute management | With comprehensive transaction details, card networks can better handle and resolve disputes. This reduces the time and effort you spend managing chargebacks and can lead to faster resolutions. |
Increased customer trust and satisfaction | Providing enhanced data improves transaction transparency, giving customers more confidence in their purchases. It also leads to more accurate transaction records on your customer's statements, minimizing confusion or disputes. |
Compliance with industry standards | Card networks increasingly require detailed data in specific industries, like airlines, to maintain compliance with industry standards and processing requirements. |
Parameters
Parameter | Required | Description |
---|---|---|
industryData | ❌ | An object containing industry specific data. |
industryData.type | ✅ | Set to airline to provide itinerary specific information. |
industryData.agentCode | ✅ | The IATA travel agency code. |
industryData.agentName | ❌ | The name of the travel agent. |
industryData.airlineCode | ✅ | The two character IATA airline code. |
industryData.airlineName | ✅ | The name of the airline (displayed as it would be on the bill). |
industryData.invoiceReference | ❌ | Billing Settlement Plan invoice reference. |
industryData.passenger | ✅ | An object containing passenger details. |
passenger.code | ✅ | The passenger code. |
passenger.firstName | ✅ | Passenger's first name. |
passenger.lastName | ✅ | Passenger's last name. |
industryData.ticket | ✅ | An object containing ticket details. |
ticket.number | ✅ | The ticket number. |
ticket.restricted | ✅ | Typically, restricted airfares require approval and e-ticket processing within 24 hours of making the reservation, are not transferable if cancelled, and can have specific requirements on when or whether a cancelled ticket can be rebooked. You must define if the ticket is restricted, but this does not affect the payment flows. |
ticket.issueDate | ❌ | An object containing the ticket's issue date. |
ticket.issuerAddress | ✅ | An object containing the ticket issuer's address. |
ticket.flightDetails | ❌ | An array with objects containing flight details. Each object represents one leg of a flight and you can submit up to four flight legs within this array. |
flightDetails.carrierCode | ✅ | Same as industryData.airlineCode , the code represents the airline for the specific flight leg. |
flightDetails.flightCode | ✅ | The flight code. |
flightDetails.stopOver | ❌ | Set to true if this flight leg is a stopover, connecting different destinations. |
flightDetails.departureAirport | ✅ | The three letter IATA Airport Code for the departure airport. |
flightDetails.arrivalAirport | ✅ | The three letter IATA Airport Code for the destination airport. |
flightDetails.departureDate | ✅ | An object containing the date of the departure. |
flightDetails.fareClassCode | ✅ | The code used by airlines to identity a fare type. |
flightDetails.fareBasisCode | ❌ | An optional extension to the fareClassCode for custom codes. |
flightDetails.taxAmount | ✅ | The tax amount for this specific flight leg. |
Code example
{
"industryData": {
"type": "airline",
"agentCode": "0",
"agentName": "Agent Name",
"airlineCode": "MY",
"airlineName": "MyAirline",
"invoiceReference": "INV133328465768",
"passenger":{
"code": "12345678",
"firstName": "John",
"lastName": "Passenger"
},
"ticket":{
"number": "123",
"restricted": true,
"issueDate": {
"day": 1,
"month": 1,
"year": 2000
},
"issuerAddress": {
"address1": "Airport venue 1",
"city": "London",
"countryCode": "GB",
"postalCode": "AB1 CD5"
},
"flightDetails": [
{
"carrierCode": "M1",
"flightCode": "501",
"stopOver": false,
"departureAirport": "LON",
"arrivalAirport": "AMS",
"departureDate": {
"day": 1,
"month": 1,
"year": 2000
},
"fareClassCode": "F",
"fareBasisCode": "TMYA",
"taxAmount": 3500
},
{
"carrierCode": "M1",
"flightCode": "501",
"stopOver": false,
"departureAirport": "AMS",
"arrivalAirport": "LON",
"departureDate": {
"day": 1,
"month": 1,
"year": 2000
},
"fareClassCode": "F",
"fareBasisCode": "TMYA",
"taxAmount": 3500
}
],
}
}
}
Account Updater (DIY)
Request a real-time account update (Visa cards only) when using a card stored previous as part of the existing subscription or installment agreement.
Parameters
Parameter | Step | Description |
---|---|---|
instruction.requestAccountUpdater | Request | Set to true to update cardholder's credentials. If the stored card details that you provided for the transaction are no longer valid and new credentials are available, the authorization will be processed with the new card and its details will be returned in the updatedPaymentInstrument object in our response. |
updatedPaymentInstrument.cardBin | Response | The new card's BIN, e.g. 444433 . |
updatedPaymentInstrument.lastFour | Response | The new card's last four digits, e.g. 1111 |
updatedPaymentInstrument.cardBrand | Response | The new card's brand, e.g. visa |
updatedPaymentInstrument.fundingType | Response | The new card's funding type, e.g.
|
updatedPaymentInstrument.expiryDate | Response | The new card's expiry date. |
Code example
{
"transactionReference": "Memory265-13/08/1876",
"channel": "ecom",
"merchant": {
"entity": "default"
},
"instruction": {
"requestAutoSettlement": {
"enabled": false
},
"narrative": {
"line1": "Mind Palace"
},
"value": {
"currency": "GBP",
"amount": 250
},
"paymentInstrument": {
"type": "card/plain",
"cardNumber": "4444333322221111",
"expiryDate": {
"month": 5,
"year": 2035
}
},
"customerAgreement":{
"type": "subscription",
"schemeReference": "000000000000020005060720116005061"
},
"requestAccountUpdater": true
}
}
Co-branded cards
Co-branded (or co-badged) payment cards are cards that integrate two or more payment brands and allow the transaction to be processed through either of its payment networks.
Parameters
Parameter | Description |
---|---|
instruction.routing.preferredCardBrand | Set your customer's preferred card brand to honor their card brand choice for co-badged cards. |
Response
Access Worldpay returns a WP-CorrelationId
in the headers of service responses. We highly recommend you log this. The WP-CorrelationId
is used by us to examine individual service requests.
Successful payment
You receive:
- an HTTP code
201
- an
"outcome": "authorized"
or"Sent for Settlement"
- risk factors (only returned if issuer identifies conflict)
- an exemption result and reason (only if you supplied a risk profile to request an SCA exemption)
- an issuer authorization code
- links to cancel, settle, partially settle or query your payment
- a
paymentInstrument
paymentInstrument
The "paymentInstrument"
object is returned if we are able to provide information related to the underlying card used in the authorization request.
paymentInstrument
object is returned, there is no guarantee that each field listed below will be returned with every transaction.Parameter | Description |
---|---|
paymentInstrument.type | The type of paymentInstrument. Eg:
|
paymentInstrument.brand | The card brand. Sometimes referred to as the network or scheme. Eg:
|
paymentInstrument.cardBin | The card bin. Eg:444433 Note this may contain the * character. |
paymentInstrument.lastFour | The last four digits of the card. Eg: 1111 Note this may contain the * character, where the card number is less than 16 digits. |
paymentInstrument.expiryDate.month | The card expiry month. Eg: 11 |
paymentInstrument.expiryDate.year | The card expiry year. Eg: 2025 |
paymentInstrument.fundingType | How the card is funded. Eg:
|
paymentInstrument.category | Whether the card is classed as a consumer card or a card for commercial use. Eg:
|
paymentInstrument.countryCode | The alpha-2 ISO-3166 country code that the card was issued in. May return "N/A" where the country is unknown. Eg: GB |
paymentInstrument.issuerName | The name of the card issuer. Eg: Some Issuer PLC. |
paymentInstrument.paymentAccountReference | The payment account reference (PAR) is a non-financial reference that uniquely identifies the underlying cardholder account. This allows you to correlate payments made with differing instruments (e.g. "card/plain" and "card/wallet+applepay" ), where the same account funds the transaction. A PAR cannot be used to intiate a payment. Eg: ABC123DEF456GHI789JKL123MNO45 |
Refused payment
You receive:
- an HTTP code
201
- an
"outcome": "refused"
- a
refusalCode
containing either our standard refusal codes or the rawCode (if enabled) - a
refusalDescription
which gives additional context on the refusal - an advice code (only if returned by the card scheme and acquirer)
- risk factors (only returned if issuer identifies conflict)
- a
paymentInstrument
Example response
{
"outcome": "authorized",
"riskFactors": [
{
"type": "cvc",
"risk": "notSupplied"
},
{
"type": "avs",
"risk": "notChecked",
"detail": "address"
},
{
"type": "avs",
"risk": "notChecked",
"detail": "postcode"
}
],
"issuer": {
"authorizationCode": "12345A"
},
"scheme": {
"reference": "060720116005060"
},
"paymentInstrument": {
"type": "card/plain+masked",
"cardBin": "444433",
"lastFour": "1111",
"category": "consumer",
"expiryDate": {
"month": 5,
"year": 2035
},
"cardBrand": "visa",
"fundingType": "credit",
"issuerName": "Some Issuer PLC",
"paymentAccountReference": "Q1HJZ28RKA1EBL470G9XYG90R5D3E"
},
"_links": {
"cardPayments:cancel": {
"href": "https://try.access.worldpay.com/payments/authorizations/cancellations/eyJrIjoiazNhYjYzMiI="
},
"cardPayments:partialCancel": {
"href": "https://try.access.worldpay.com/payments/authorizations/cancellations/partials/eyJrIjoiazNhYjYzMiJ9"
},
"cardPayments:settle": {
"href": "https://try.access.worldpay.com/payments/settlements/full/eyJrIjoiazNhYjYzMiI="
},
"cardPayments:partialSettle": {
"href": "https://try.access.worldpay.com/payments/settlements/partials/eyJrIjoiazNhYjYzMiI="
},
"cardPayments:events": {
"href": "https://try.access.worldpay.com/payments/events/eyJrIjoiazNhYjYzMiI="
},
"curies": [
{
"name": "cardPayments",
"href": "https://try.access.worldpay.com/rels/cardPayments/{rel}",
"templated": true
}
]
}
}
You can use the payments:settle
action link to settle the payment straight away. Alternatively you can cache the response and use the link to settle the payment later.
In case of an error, you can get further information in our error reference.
riskFactors
To reduce the probability of processing a fraudulent payment, supply your customer's billing address and cvc in your authorization request.
We check this with your customer's issuing bank and include any conflicts in our response.
The riskFactors
array is returned only if there is a risk associated with the authorization request. The riskFactors
array returns an object for avs
, cvc
or riskProfile
only if this information was included in the authorization request and if any risk was identified.
The table below describes the response parameters:
Parameter | Description |
---|---|
riskFactors.type | Returns avs , cvc or riskProfile |
riskFactors.detail | For avs only.Returns postcode or address |
riskFactors.risk | Returns notChecked , notMatched , notSupplied or verificationFailed |
Next steps
Settle a payment
Refund a payment
Cancel a payment
Reverse a payment