# Verified Tokens cardOnFile resource

Create a verified cardOnFile token by sending a request to cardOnFile resource. A cardOnFile verified token allows you to take payments that are made by the customer using a stored verified token, such as in one-click or in-app purchases.

Endpoint: POST /verifiedTokens/cardOnFile
Version: v2
Security: BasicAuth

## Security:

  - `BasicAuth` (unknown)
    http basic

## Request fields (application/vnd.worldpay.verified-tokens-v2.hal+json):

  - `paymentInstrument` (any, required)
    An object that contains the card details or token location.

  - `paymentInstrument.type` (string, required)
    Example: card/plain

  - `paymentInstrument.cardNumber` (string, required)

  - `paymentInstrument.cardExpiryDate` (object, required)

  - `paymentInstrument.cardExpiryDate.month` (integer, required)

  - `paymentInstrument.cardExpiryDate.year` (integer, required)

  - `paymentInstrument.cvc` (string)

  - `paymentInstrument.cardHolderName` (string, required)

  - `paymentInstrument.billingAddress` (object)

  - `paymentInstrument.billingAddress.address1` (string, required)

  - `paymentInstrument.billingAddress.address2` (string)

  - `paymentInstrument.billingAddress.address3` (string)

  - `paymentInstrument.billingAddress.postalCode` (string, required)

  - `paymentInstrument.billingAddress.city` (string, required)

  - `paymentInstrument.billingAddress.state` (string)

  - `paymentInstrument.billingAddress.countryCode` (string, required)

  - `paymentInstrument.sessionHref` (string, required)
    Only session href of type verified token/card created in the same environment are accepted

  - `merchant` (object, required)

  - `merchant.entity` (string, required)

  - `verificationCurrency` (string, required)

  - `description` (string)

  - `tokenExpiryDateTime` (string)

  - `namespace` (string)

## Request examples:

  - `Creating a new token for cardOnFile transactions when supplying all the payment instrument details.` (unknown)
    Creating a new token for cardOnFile transactions when supplying all the payment instrument details.

  - `Matching an existing token for cardOnFile transactions when supplying all the payment instrument details.` (unknown)
    Matching an existing token for cardOnFile transactions when supplying all the payment instrument details.

  - `Conflicting with an existing token for cardOnFile transactions when supplying all the payment instrument details.` (unknown)
    Conflicting with an existing token for cardOnFile transactions when supplying all the payment instrument details.

  - `Payload cannot be verified for cardOnFile transactions when supplying all the payment instrument details. An unverified token has been created.` (unknown)
    Payload cannot be verified for cardOnFile transactions when supplying all the payment instrument details. An unverified token has been created.

  - `Payload cannot be verified for cardOnFile transactions when supplying all the payment instrument details. An unverified token has been matched.` (unknown)
    Payload cannot be verified for cardOnFile transactions when supplying all the payment instrument details. An unverified token has been matched.

  - `Payload cannot be verified for cardOnFile transactions when supplying all the payment instrument details. An unverified token with conflicts has been returned.` (unknown)
    Payload cannot be verified for cardOnFile transactions when supplying all the payment instrument details. An unverified token with conflicts has been returned.

  - `Creating a new token for cardOnFile transactions using a verified token or card session created by the access checkout SDK.` (unknown)
    Creating a new token for cardOnFile transactions using a verified token or card session created by the access checkout SDK.

  - `Matching a token for cardOnFile transactions using a verified token or card session created by the access checkout SDK.` (unknown)
    Matching a token for cardOnFile transactions using a verified token or card session created by the access checkout SDK.

  - `Conflicts with an existing token for cardOnFile transactions using a verified token or card session created by the access checkout SDK.` (unknown)
    Conflicts with an existing token for cardOnFile transactions using a verified token or card session created by the access checkout SDK.

  - `Payload cannot be verified for cardOnFile transactions using a verified token or card session created by the access checkout SDK. An unverified token has been created.` (unknown)
    Payload cannot be verified for cardOnFile transactions using a verified token or card session created by the access checkout SDK. An unverified token has been created.

  - `Payload cannot be verified for cardOnFile transactions using a verified token or card session created by the access checkout SDK. An unverified token has been matched.` (unknown)
    Payload cannot be verified for cardOnFile transactions using a verified token or card session created by the access checkout SDK. An unverified token has been matched.

  - `Payload cannot be verified for cardOnFile transactions using a verified token or card session created by the access checkout SDK. An unverified token with conflicts has been returned.` (unknown)
    Payload cannot be verified for cardOnFile transactions using a verified token or card session created by the access checkout SDK. An unverified token with conflicts has been returned.

## Response 200:

  - `200` (unknown)
    The payload has been verified and a matching Token already exists. This does not include token meta data, which still may be different

## Response 200 fields (application/vnd.worldpay.verified-tokens-v2.hal+json):

  - `outcome` (string, required)
    Example: verified

  - `_links` (object, required)

  - `_links.verifications:verification` (object, required)

  - `_links.verifications:verification.href` (string)
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/verifications/accounts/MTphTFVWNXJYcDUvaXdJT214aWNBWHN3PT06QUVTL0NCQy9QS0NTNVBhZGRpbmc6VXMzQStzaFdwWjZvV2g5STVXK0ZDb3ZiRmVoemdueWpnSDhHZFlmaFZpWitQTHNuWlZMQi84bzV0Z1FOa…

  - `_links.tokens:token` (object, required)

  - `_links.tokens:token.href` (string)
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/tokens/${MAYBE_ENCRYPT:MTUzNTAzNjAzNzAyMjIzMjk0Ng==}

  - `_links.curies` (array, required)

  - `_links.curies.href` (string)
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/rels/verifications/accounts/{rel}.json

  - `_links.curies.name` (string)
    Example: verifications

  - `_links.curies.templated` (boolean)
    Example: true

## Response 201:

  - `201` (unknown)
    The payload has been verified and a Token has been created.

## Response 201 fields (application/vnd.worldpay.verified-tokens-v2.hal+json):

  - `outcome` (string)
    Example: verified

  - `_links` (object, required)

  - `_links.verifications:verification` (object, required)

  - `_links.verifications:verification.href` (string)
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/verifications/accounts/MTphTFVWNXJYcDUvaXdJT214aWNBWHN3PT06QUVTL0NCQy9QS0NTNVBhZGRpbmc6VXMzQStzaFdwWjZvV2g5STVXK0ZDb3ZiRmVoemdueWpnSDhHZFlmaFZpWitQTHNuWlZMQi84bzV0Z1FOa…

  - `_links.tokens:token` (object, required)

  - `_links.tokens:token.href` (string)
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/tokens/${MAYBE_ENCRYPT:MTUzNTAzNjAzNzAyMjIzMjk0Ng==}

  - `_links.curies` (array, required)

  - `_links.curies.href` (string)
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/rels/verifications/accounts/{rel}.json

  - `_links.curies.name` (string)
    Example: verifications

  - `_links.curies.templated` (boolean)
    Example: true

## Response 206:

  - `206` (unknown)
    The supplied payload could not be verified. An unverified token has been created/matched.

## Response 206 fields (application/vnd.worldpay.verified-tokens-v2.hal+json):

  - `outcome` (string)
    Example: not verified

  - `code` (string)
    Example: 76

  - `description` (string)
    Example: CARD BLOCKED

  - `_links` (object, required)

  - `_links.verifications:verification` (object, required)

  - `_links.verifications:verification.href` (string)
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/verifications/accounts/MTphTFVWNXJYcDUvaXdJT214aWNBWHN3PT06QUVTL0NCQy9QS0NTNVBhZGRpbmc6VXMzQStzaFdwWjZvV2g5STVXK0ZDb3ZiRmVoemdueWpnSDhHZFlmaFZpWitQTHNuWlZMQi84bzV0Z1FOa…

  - `_links.tokens:token` (object, required)

  - `_links.tokens:token.href` (string)
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/tokens/${MAYBE_ENCRYPT:MTUzNTAzNjAzNzAyMjIzMjk0Ng==}

  - `_links.tokens:conflicts` (object, required)

  - `_links.tokens:conflicts.href` (string)
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/tokens/${MAYBE_ENCRYPT:MTUzNTAzNjAzNzAyMjIzMjk0Ng==/conflicts/eyJ0b2tlbkNvbmZsaWN0cyI6eyJwYXltZW50SW5zdHJ1bWVudCI6eyJjYXJkSG9sZGVyTmFtZSI6IkZyZWQgQmxvZ2dzIn19LCJlcG9jaE…

  - `_links.curies` (array, required)

  - `_links.curies.href` (string)
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/rels/verifications/accounts/{rel}.json

  - `_links.curies.name` (string)
    Example: verifications

  - `_links.curies.templated` (boolean)
    Example: true

## Response 409:

  - `409` (unknown)
    The payload has been verified but a Token exists that conflicts with some of the details in the request.

## Response 409 fields (application/vnd.worldpay.verified-tokens-v2.hal+json):

  - `outcome` (string, required)
    Example: verified

  - `_links` (object, required)

  - `_links.verifications:verification` (object, required)

  - `_links.verifications:verification.href` (string)
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/verifications/accounts/MTphTFVWNXJYcDUvaXdJT214aWNBWHN3PT06QUVTL0NCQy9QS0NTNVBhZGRpbmc6VXMzQStzaFdwWjZvV2g5STVXK0ZDb3ZiRmVoemdueWpnSDhHZFlmaFZpWitQTHNuWlZMQi84bzV0Z1FOa…

  - `_links.tokens:token` (object, required)

  - `_links.tokens:token.href` (string)
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/tokens/${MAYBE_ENCRYPT:MTUzNTAzNjAzNzAyMjIzMjk0Ng==}

  - `_links.tokens:conflicts` (object, required)

  - `_links.tokens:conflicts.href` (string)
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/tokens/${MAYBE_ENCRYPT:MTUzNTAzNjAzNzAyMjIzMjk0Ng==/conflicts/eyJ0b2tlbkNvbmZsaWN0cyI6eyJwYXltZW50SW5zdHJ1bWVudCI6eyJjYXJkSG9sZGVyTmFtZSI6IkZyZWQgQmxvZ2dzIn19LCJlcG9jaE…

  - `_links.curies` (array, required)

  - `_links.curies.href` (string)
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/rels/verifications/accounts/{rel}.json

  - `_links.curies.name` (string)
    Example: verifications

  - `_links.curies.templated` (boolean)
    Example: true

## Response 200 examples:

  - `Matching an existing token for cardOnFile transactions when supplying all the payment instrument details.` (unknown)
    Matching an existing token for cardOnFile transactions when supplying all the payment instrument details.

  - `Matching a token for cardOnFile transactions using a verified token or card session created by the access checkout SDK.` (unknown)
    Matching a token for cardOnFile transactions using a verified token or card session created by the access checkout SDK.

## Response 201 examples:

  - `Creating a new token for cardOnFile transactions when supplying all the payment instrument details.` (unknown)
    Creating a new token for cardOnFile transactions when supplying all the payment instrument details.

  - `Creating a new token for cardOnFile transactions using a verified token or card session created by the access checkout SDK.` (unknown)
    Creating a new token for cardOnFile transactions using a verified token or card session created by the access checkout SDK.

## Response 206 examples:

  - `Payload cannot be verified for cardOnFile transactions when supplying all the payment instrument details. An unverified token has been created.` (unknown)
    Payload cannot be verified for cardOnFile transactions when supplying all the payment instrument details. An unverified token has been created.

  - `Payload cannot be verified for cardOnFile transactions when supplying all the payment instrument details. An unverified token has been matched.` (unknown)
    Payload cannot be verified for cardOnFile transactions when supplying all the payment instrument details. An unverified token has been matched.

  - `Payload cannot be verified for cardOnFile transactions when supplying all the payment instrument details. An unverified token with conflicts has been returned.` (unknown)
    Payload cannot be verified for cardOnFile transactions when supplying all the payment instrument details. An unverified token with conflicts has been returned.

  - `Payload cannot be verified for cardOnFile transactions using a verified token or card session created by the access checkout SDK. An unverified token has been created.` (unknown)
    Payload cannot be verified for cardOnFile transactions using a verified token or card session created by the access checkout SDK. An unverified token has been created.

  - `Payload cannot be verified for cardOnFile transactions using a verified token or card session created by the access checkout SDK. An unverified token has been matched.` (unknown)
    Payload cannot be verified for cardOnFile transactions using a verified token or card session created by the access checkout SDK. An unverified token has been matched.

  - `Payload cannot be verified for cardOnFile transactions using a verified token or card session created by the access checkout SDK. An unverified token with conflicts has been returned.` (unknown)
    Payload cannot be verified for cardOnFile transactions using a verified token or card session created by the access checkout SDK. An unverified token with conflicts has been returned.

## Response 409 examples:

  - `Conflicting with an existing token for cardOnFile transactions when supplying all the payment instrument details.` (unknown)
    Conflicting with an existing token for cardOnFile transactions when supplying all the payment instrument details.

  - `Conflicts with an existing token for cardOnFile transactions using a verified token or card session created by the access checkout SDK.` (unknown)
    Conflicts with an existing token for cardOnFile transactions using a verified token or card session created by the access checkout SDK.

