Menu

Repeat Wallet Payments

Use our card on file resource to authorize a payment with a digital wallet.

Note: You mustintegrate with Google Pay or Apple Paybefore you can submit repeat wallet payments to our Payments API.

What are card on file payments?

Card on File payments are an example ofCustomer Initiated Transactions. Your customer is either using the payment details they have agreed for you to store on a previous purchase. Or your customer is agreeing to store new payment details for use in subsequent transactions.

Use our card on file resource to:

  • store new card details for use in subsequent purchases
  • Make CIT’s where you already have stored card details for your customer

Card on file authorization request

POST your initial card on file authorizations to our payments:cardOnFileAuthorize action link resource received in yourquery the payments root resourcerequest.

Card on file authorization example request:

POST https://try.access.worldpay.com/payments/authorizations/cardOnFile

cardOnFile authorization request body

Copied!
{
    "transactionReference": "unique-transactionReference",
    "merchant": {
        "entity": "default"
    },
    "instruction": {
        "narrative": {
            "line1": "trading name"
        },
        "value": {
            "currency": "GBP",
            "amount": 250
        },
        "paymentInstrument": {
            "type": "card/wallet+applepay",
            "walletToken": "{\"version\": \"EC_v1\",\"data\": \"kdHd..GQ==\",\"signature\": \"MIAGCSqGSIb3DQEH...AAA\",\"header\": {\"transactionId\": \"d3b28af..f8\",\"ephemeralPublicKey\": \"MFkwE..Q==\",\"publicKeyHash\": \"dxCK..6o=\"}}"
        }
    }
}
{
  "transactionReference": "unique-transactionReference",
  "merchant": {
    "entity": "default"
  },
  "instruction": {
    "narrative": {
      "line1": "trading name"
    },
    "value": {
      "currency": "GBP",
      "amount": 250
    },
    "paymentInstrument": {
      "type": "card/wallet+googlepay",
      "walletToken": "{\"version\": \"EC_v1\",\"data\": \"kdHd..GQ==\",\"signature\": \"MIAGCSqGSIb3DQEH...AAA\",\"header\": {\"transactionId\": \"d3b28af..f8\",\"ephemeralPublicKey\": \"MFkwE..Q==\",\"publicKeyHash\": \"dxCK..6o=\"}}"
    }
  }
}

Descriptions of your authorization request parameters

ParameterRequiredDescription
transactionReferenceA unique reference generated by you that is used to identify a payment throughout its lifecycle. Seetransaction reference format, for more details and the best practices.
merchantAn object that contains information about the merchant.
merchant.entityDirect your payment to assist with billing, reporting and reconciliation. This is mandatory for authentication and queries.
Contact yourImplementation Managerfor more details.
instructionAn object that contains all the information related to the payment.
instruction.narrativeThe text that appears on your customer's statement. Used to identify the merchant.
Seenarrative formatfor more details and best practices.
narrative.line1The 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.).
Seenarrative line1 formatfor more details.
instruction.valueAn object that contains information about the value of the payment.
value.currencyThe three digit ISO currency code.
See list ofsupported currencies.
value.amountThe 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 ourcurrency table.
instruction.paymentInstrumentAn object that contains the payment type and details. You must integrate withApple Payfirst to use the card/wallet+applepay paymentInstrument.

Card on file response

Successful response

You receive:

  • an HTTP code 201
  • an "outcome": "authorized"
  • risk factors (only returned if issuer identifies conflict)
  • a scheme reference
  • a paymentInstrument detailing brand information about the card that was used
  • links tocancel,settle,partially settleortrackpayment events
  • an authorization link for the next card on file payment in your repeat payment agreement
  • an authorization link for the next recurring payment in your repeat payment agreement
  • a token link, you must use for all subsequent payments in your repeat payment agreement

Refused response

You receive:

  • an HTTP code 201
  • an "outcome": "refused"
  • arefusal code
  • a description which gives additional context on the refusal
  • risk factors (only returned if issuer identifies conflict)
  • a paymentInstrument

Example response

Copied!
{
    "outcome": "authorized",
    "riskFactors": [{
            "risk": "not_checked",
            "detail": "postcode",
            "type": "avs"
        },
        {
            "risk": "not_checked",
            "detail": "address",
            "type": "avs"
        }
    ],
    "scheme": {
        "reference": "schemeReference"
    },
    "paymentInstrument": {
        "type": "card/network+masked",
        "card": {
            "number": {
                "bin": "444433",
                "last4Digits": "1111",
                "dpan": "4444333322221111"
            },
            "countryCode": "GB",
            "expiryDate": {
                "month": 6,
                "year": 2021
            },
            "brand": "visa",
            "fundingType": "debit",
            "issuer": {
                "name": "VALID_ISSUER"
            },
            "paymentAccountReference": "somePAR"
        }
    },
    "_links": {
        "payments:cancel": {
            "href": "https://try.access.worldpay.com/payments/authorizations/cancellations/eyJrIjoiazUyOTVhMSIsImxpbmtWZXJzaW9uIjoiMy4wLjAifQ==.7uyuNo1ShOgM5rTwStg86LXzb0a2wdLW1lwX:DIQ2Ecrp4gw65VLnHmjsAVqzpa2NcwixaBb2p8R2x5NPXdRpybJ2ndKlbkNOc9gj+ruN20iaTdYqv2FNgB3ZAw3g+yyUMUlQDFD8DU++ZswXpUQe8YTBHmTP8zHQUXrSORn9IaI6kzJnMu2HWwEJOqKnWLvRCMy:fr4ptatJJrmRVON8WTjisJL:sd3TJ9uDcO:gD+q+Q01y++Mzop0k8y3bDcnNBpsG:8xf4uKGGYO3EcAWA=="
        },
        "payments:settle": {
            "href": "https://try.access.worldpay.com/payments/settlements/full/eyJrIjoiazUyOTVhMSIsImxpbmtWZXJzaW9uIjoiMy4wLjAifQ==.7uyuNo1ShOgM5rTwStg86LXzb0a2wdLW1lwX:DIQ2Ecrp4gw65VLnHmjsAVqzpa2NcwixaBb2p8R2x5NPXdRpybJ2ndKlbkNOc9gj+ruN20iaTdYqv2FNgB3ZAw3g+yyUMUlQDFD8DU++ZswXpUQe8YTBHmTP8zHQUXrSORn9IaI6kzJnMu2HWwEJOqKnWLvRCMy:fr4ptatJJrmRVON8WTjisJL:sd3TJ9uDcO:gD+q+Q01y++Mzop0k8y3bDcnNBpsG:8xf4uKGGYO3EcAWA=="
        },
        "payments:partialSettle": {
            "href": "https://try.access.worldpay.com/payments/settlements/partials/eyJrIjoiazUyOTVhMSIsImxpbmtWZXJzaW9uIjoiMy4wLjAifQ==.7uyuNo1ShOgM5rTwStg86LXzb0a2wdLW1lwX:DIQ2Ecrp4gw65VLnHmjsAVqzpa2NcwixaBb2p8R2x5NPXdRpybJ2ndKlbkNOc9gj+ruN20iaTdYqv2FNgB3ZAw3g+yyUMUlQDFD8DU++ZswXpUQe8YTBHmTP8zHQUXrSORn9IaI6kzJnMu2HWwEJOqKnWLvRCMy:fr4ptatJJrmRVON8WTjisJL:sd3TJ9uDcO:gD+q+Q01y++Mzop0k8y3bDcnNBpsG:8xf4uKGGYO3EcAWA=="
        },
        "payments:events": {
            "href": "https://try.access.worldpay.com/payments/events/eyJrIjoiazUyOTVhMSIsImxpbmtWZXJzaW9uIjoiMy4wLjAifQ==.7uyuNo1ShOgM5rTwStg86LXzb0a2wdLW1lwX:DIQ2Ecrp4gw65VLnHmjsAVqzpa2NcwixaBb2p8R2x5NPXdRpybJ2ndKlbkNOc9gj+ruN20iaTdYqv2FNgB3ZAw3g+yyUMUlQDFD8DU++ZswXpUQe8YTBHmTP8zHQUXrSORn9IaI6kzJnMu2HWwEJOqKnWLvRCMy:fr4ptatJJrmRVON8WTjisJL:sd3TJ9uDcO:gD+q+Q01y++Mzop0k8y3bDcnNBpsG:8xf4uKGGYO3EcAWA=="
        },
        "payments:cardOnFileAuthorize": {
            "href": "https://try.access.worldpay.com/payments/authorizations/cardOnFile/eyJrIjoiazUyOTVhMSIsImxpbmtWZXJzaW9uIjoiMS4wLjAifQ==.R6PzeBs1kC+VT5dtn2WKHquYi:0CPtdsTmoC0CiPjw6CkE+Ujvons6ZVs+R2JwUJmXAx1+34Kz67cP9hSVZNkQ=="
        },
        "payments:recurringAuthorize": {
            "href": "https://try.access.worldpay.com/payments/authorizations/recurring/eyJrIjoiazUyOTVhMSIsImxpbmtWZXJzaW9uIjoiMS4wLjAifQ==.R6PzeBs1kC+VT5dtn2WKHquYi:0CPtdsTmoC0CiPjw6CkE+Ujvons6ZVs+R2JwUJmXAx1+34Kz67cP9hSVZNkQ=="
        },
        "tokens:token": {
            "href": "https://access.worldpay.com/tokens/linkData"
        },
        "curies": [{
            "name": "payments",
            "href": "https://try.access.worldpay.com/rels/payments/{rel}",
            "templated": true
        }]
    }
}
{
    "outcome": "refused",
    "description": "do not honour",
    "code": "5",
    "riskFactors": [{
            "risk": "not_checked",
            "detail": "postcode",
            "type": "avs"
        },
        {
            "risk": "not_checked",
            "detail": "address",
            "type": "avs"
        }
    ],
    "paymentInstrument": {
        "type": "card/network+masked",
        "card": {
            "number": {
                "bin": "444433",
                "last4Digits": "1111"
            },
            "countryCode": "GB",
            "brand": "visa",
            "fundingType": "debit",
            "issuer": {
                "name": "VALID_ISSUER"
            },
            "paymentAccountReference": "somePAR"
        }
    }
}

You can use the payments:settle action link tosettle the paymentstraight away. Alternatively you can cache the response and use the link to settle the payment later.

Next Steps


Take a subsequentrecurring payment with the tokenyou have received in yourcard on file response.