{"templateId":"markdown","versions":[{"version":"v1","label":"v1","link":"/products/tokens/v1/create-a-token","default":false,"active":false,"folderId":"13618f6a"},{"version":"v2","label":"v2","link":"/products/tokens/v2/create-a-token","default":false,"active":false,"folderId":"13618f6a"},{"version":"v3","label":"v3","link":"/products/tokens/create-a-token","default":true,"active":true,"folderId":"13618f6a"}],"sharedDataIds":{"sidebar":"sidebar-products/tokens/sidebars.yaml","current-catalog-info":"current-catalog-info-/products/tokens/openapi"},"props":{"metadata":{"markdoc":{"tagList":["partial","admonition","tabs","tab","code-snippet"]},"custom_product":"Tokens","type":"markdown"},"seo":{"title":"Create a token","description":"Worldpay for Developers - docs, code examples, resources and tools. Everything you need to build your omnichannel payment solution.","siteUrl":"https://docs.worldpay.com/access","image":"/access/assets/worldpay-logo-light.21b7daf79984773a9fcd7d4fbcb07ae5289dfffd6023c4c3dca720c7058e53dc.33f780a6.svg","keywords":"documentation, api, openapi, sdks, developer, payments, json, payouts, 3ds","jsonLd":{"@context":"https://schema.org","@type":"Organization","url":"https://docs.worldpay.com/access","name":"Worldpay"},"meta":[{"name":"google-site-verification","content":"zjziIKaP3ImsqsfhYnEBnq1R85UabiSwl7HTXuwtZuo"},{"name":"doc_product","content":"Access"},{"name":"doc_category","content":"Documentation"}],"llmstxt":{"hide":false,"sections":[{"title":"Payments API","description":"Payment orchestration API combining fraud assessment, 3ds authentication, SCA exemptions, Worldpay Token creation and a card or wallet based payment.","includeFiles":["products/payments/@20240601/**/*"],"excludeFiles":[]},{"title":"Payment Queries API","description":"Querying your payments data, based on a variety of parameters.","includeFiles":["products/payment-queries/@v1/**/*"],"excludeFiles":[]},{"title":"Card BIN Data API","description":"Provides detailed information about a card.","includeFiles":["products/card-bin/@v1/**/*"],"excludeFiles":[]},{"title":"3DS Authentication API","description":"Request 3DS authentication to protect against fraud, be SCA compliant and to shift liability using this standalone API.","includeFiles":["products/3ds/@v3/**/*"],"excludeFiles":[]},{"title":"FraudSight API","description":"Request a risk assessment and receive a response with an outcome (e.g. lowRisk) using this standalone API.","includeFiles":["products/fraudsight/@v1/**/*"],"excludeFiles":[]},{"title":"Checkout SDK","description":"Integrate using our clientside SDKs for both web and native devices. Benefit from SAQ-A/PCI-SSF compliance.","includeFiles":["products/checkout/web/@v2/**/*","products/checkout/ios/@v4/**/*","products/checkout/android/@v4/**/*","products/checkout/react-native/@v3/**/*","products/checkout/flutter/@v1/**/*"],"excludeFiles":[]},{"title":"Tokens API","description":"Minimizes the exposure of sensitive card details and increases the security of your customer's card details.","includeFiles":["products/tokens/@v3/**/*"],"excludeFiles":[]},{"title":"Card Payments API","description":"Request a card payment using this standalone API, requires separate requests for 3DS, Fraud assessment etc.","includeFiles":["products/card-payments/@v7/**/*"],"excludeFiles":[]},{"title":"Card Verifications API","description":"Verify your customer's card to maximize your authentication rates.","includeFiles":["products/card-verifications/@v6/**/*"],"excludeFiles":[]},{"title":"Account Payouts API","description":"Send funds to your customer's bank accounts and search for payouts using parameters.","includeFiles":["products/account-payouts/@20250101/**/*"],"excludeFiles":[]},{"title":"APMs","description":"Pay using eWallets, bank transfers, direct debits, local card schemes, Postpay and eInvoice/ Buy Now Pay Later.","includeFiles":["products/apms/@20240701/**/*"],"excludeFiles":[]},{"title":"Balance API","description":"Request your account details for a single account or all accounts under an entity.","includeFiles":["products/balance/@20250101/**/*"],"excludeFiles":[]},{"title":"Card Payouts API","description":"Send funds to your customer's cards.","includeFiles":["products/card-payouts/@v4/**/*"],"excludeFiles":[]},{"title":"Events (Webhooks)","description":"Receive status updates from Access Worldpay by setting up a webhook.","includeFiles":["products/events/@v1/**/*"],"excludeFiles":[]},{"title":"FX API","description":"Manage Foreign Exchange (FX) on your payments.","includeFiles":["products/fx/@v1/**/*"],"excludeFiles":[]},{"title":"Hosted Payment Pages (HPP) API","description":"Our low-code option to take payments securely at the lowest PCI compliance level - SAQ A.","includeFiles":["products/hosted-payment-pages/@v1/**/*"],"excludeFiles":[]},{"title":"Money Transfers API","description":"Money Transfer OCTs (Original Credit Transaction) allow funds to be pushed to an eligible card in 30 minutes or less.","includeFiles":["products/money-transfers/@v1/**/*"],"excludeFiles":[]},{"title":"Parties API","description":"Create parties, manage your payout instruments and beneficial owners and carry out identity verification checks.","includeFiles":["products/parties/@20250101/**/*"],"excludeFiles":[]},{"title":"SCA Exemptions API","description":"Maximize a frictionless checkout experience by using issuer data insights to apply exemptions.","includeFiles":["products/sca-exemptions/@v1/**/*"],"excludeFiles":[]},{"title":"Split Payments API","description":"Divide funds from a single payment amongst yourself and your parties/sellers.","includeFiles":["products/split-payments/@20250625/**/*"],"excludeFiles":[]},{"title":"Statements API","description":"Retrieve your account statement and see individual entries for all credits and debits.","includeFiles":["products/statements/@20250101/**/*"],"excludeFiles":[]},{"title":"Transfers API","description":"Transfer funds from source account to target account.","includeFiles":["products/transfers/@20250101/**/*"],"excludeFiles":[]},{"title":"Verified Tokens API","description":"Verified Tokens ensures that your customer's payment details are valid and CIT compliant when creating a token.","includeFiles":["products/verified-tokens/@v3/**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Last updated"]},": 12 May 2025 | ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/tokens/changelog/"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Change log"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"create-a-token","__idx":0},"children":["Create a token"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a card token to secure your customer's card and billing information, which could help lower your PCI-DSS compliance costs."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you have tokens from a previous provider you can ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developerengine.fisglobal.com/apis/wpg/tokenisation/bulktokenmigration"},"children":["import the existing tokens"]}," to Access Worldpay."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-a-card-token-request","__idx":1},"children":["Create a card token request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To create a token, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}," your request to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tokens:tokens"]}," action link."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you create a token, you can optionally include the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["namespace"]}," parameter in your request. Click the ",{"$$mdtype":"Tag","name":"b","attributes":{},"children":["Create a token with a namespace"]}," tab below to see an example request."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-a-token-example-request","__idx":2},"children":["Create a token example request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]},"  ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://try.access.worldpay.com/tokens"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Token creation request body:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Create a token","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"./code/create-token-request.json","language":"json","header":{"controls":{"copy":{}}},"lang":"json","source":"{\n    \"description\": \"Test Token Description\",\n    \"paymentInstrument\": {\n        \"type\": \"card/front\",\n        \"cardHolderName\": \"Sherlock Holmes\",\n        \"cardNumber\": \"4444333322221111\",\n        \"cardExpiryDate\": {\n            \"month\": 5,\n            \"year\": 2035\n        },\n        \"billingAddress\": {\n            \"address1\": \"221B Baker Street\",\n            \"address2\": \"Marylebone\",\n            \"address3\": \"Westminster\",\n            \"postalCode\": \"NW1 6XE\",\n            \"city\": \"London\",\n            \"state\": \"Greater London\",\n            \"countryCode\": \"GB\"\n        }\n    },\n    \"merchant\": {\n        \"entity\": \"default\"\n    }\n}\n"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Create a token with a namespace","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"./code/create-namespace-token-request.json","language":"json","header":{"controls":{"copy":{}}},"lang":"json","source":"{\n    \"description\": \"Test Token Description\",\n    \"namespace\": \"SHOPPER_ID_1234567890\",\n    \"paymentInstrument\": {\n        \"type\": \"card/front\",\n        \"cardHolderName\": \"Sherlock Holmes\",\n        \"cardNumber\": \"4444333322221111\",\n        \"cardExpiryDate\": {\n            \"month\": 5,\n            \"year\": 2035\n        },\n        \"billingAddress\": {\n            \"address1\": \"221B Baker Street\",\n            \"address2\": \"Marylebone\",\n            \"address3\": \"Westminster\",\n            \"postalCode\": \"NW1 6XE\",\n            \"city\": \"London\",\n            \"state\": \"Greater London\",\n            \"countryCode\": \"GB\"\n        }\n    },\n    \"merchant\": {\n        \"entity\": \"default\"\n    }\n}"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Description of your create a token request parameters:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A description of your token. If not supplied, a default ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]}," is created for you."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tokenExpiryDateTime"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The date/time after which the token is unavailable, expressed in ISO 8601 format. If not supplied, the default expiry date/time is 90 days in Try and 4 years in the Live environment.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," We extend the expiry by 4 years after the token is used to process a transaction in Live once a token has reached its half-life. For Try, expiry date extensions are not applicable."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentInstrument"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An object that contains the payment ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," and details. All sub-fields are mandatory with the conditional exception of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["billingAddress"]}," (see below)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["billingAddress"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An object containing the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["billingAddress"]}," information. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["If included, the below fields are mandatory:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["address1"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["city"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["countryCode"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["postalCode"]}]}]}," This is used during payment processing. If the address supplied does not match the address registered with the issuing bank, the payment carries additional risk. ",{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Condition"},"children":["The above ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["billingAddress"]}," fields are mandatory for US merchants using the token in card payouts. You must also include: ",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["state"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["namespace"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A namespace is used to group up to 16 cards, e.g. for one customer. A card can exist in more than one namespace."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schemeTransactionReference"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A value provided by Visa or Mastercard which tracks recurring transactions."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An object that contains information about your merchant account."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant.entity"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Identifies merchant account for billing, reporting and reconciliation. Contact your Worldpay Implementation Manager for more details."]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You are not normally expected to provide a value for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schemeTransactionReference"]},". If you are using the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/verified-tokens"},"children":["Verified Tokens API"]}," to create tokens, it is automatically included where applicable."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"responses","__idx":3},"children":["Responses"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Best practice"},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Access Worldpay returns a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WP-CorrelationId"]}," in the headers of service responses. We ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["highly recommend"]}," you log this. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WP-CorrelationId"]}," is used by us to examine individual service requests."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If you must set a field length, we advise you allow up to 1024 bytes for each URI."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once you've sent your create a token request, one of the following responses is returned:"]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":["201 - Created"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If this is the first time you've tokenized the card, a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["201 Created"]}," response is returned."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your response contains a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tokenPaymentInstrument"]}," object which contains the link data to the token resource. The response also includes request links, e.g. ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/tokens/query-and-update-tokens"},"children":["updating and deleting the token"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"./code/token-response.json","language":"json","header":{"controls":{"copy":{}}},"lang":"json","source":"{\n    \"tokenPaymentInstrument\": {\n        \"type\": \"card/tokenized\",\n        \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0NzI0NE1rdUtjMUFJdjYxVnlibWZuUT0ifQ\"\n    },\n    \"tokenId\": \"9902480679618049603\",\n    \"description\": \"Test Token Description\",\n    \"tokenExpiryDateTime\": \"2030-06-24T09:19:35Z\",\n    \"paymentInstrument\": {\n        \"type\": \"card/masked\",\n        \"cardNumber\": \"4444********1111\",\n        \"cardHolderName\": \"Sherlock Holmes\",\n        \"cardExpiryDate\": {\n            \"month\": 5,\n            \"year\": 2035\n        },\n        \"billingAddress\": {\n            \"address1\": \"221B Baker Street\",\n            \"address2\": \"Marylebone\",\n            \"address3\": \"Westminster\",\n            \"postalCode\": \"NW1 6XE\",\n            \"city\": \"London\",\n            \"state\": \"Greater London\",\n            \"countryCode\": \"GB\"\n        },\n        \"bin\": \"444433\",\n        \"brand\": \"VISA\",\n        \"fundingType\": \"credit\"\n    },\n    \"_links\": {\n        \"tokens:token\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0NzI0NE1rdUtjMUFJdjYxVnlibWZuUT0ifQ\"\n        },\n        \"tokens:description\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0MWJVbkh1WTFGZExUNXJxc04va1ZoTFVzYW1OU1lxSFE2NHI1c2JkY1pWaSJ9\"\n        },\n        \"tokens:cardHolderName\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0d3ltd21ieGo3TlZLYzRYSkExOUhSdUpLN2N3VVc5WUk3czRUTW1RQ2JLdjFnVXlzakdPSXdWWkRhZkZyUmlMd3c9PSJ9\"\n        },\n        \"tokens:cardExpiryDate\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0d3ltd21ieGo3TlZLYzRYSkExOUhSdUpLN2N3VVc5WUk3czRUTW1RQ2JLdkVpVW5GNnBsZThNTXNQWTRGbzFzTXc9PSJ9\"\n        },\n        \"tokens:billingAddress\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0d3ltd21ieGo3TlZLYzRYSkExOUhSdFpSdXFxbWZlNVl1TkpHZEVvZXN3MTlCU0lmdCtxSTUyVDJSdXlmSTIwM3c9PSJ9\"\n        },\n        \"tokens:schemeTransactionReference\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoiSENXWFZQZjNIZ1V3dnpDMElJZS9Zdmc4M0pYM3dDWEJTVnQrWVlacXdDUXFFKzhzaC8xNSs2d3NkTTdFWUFNVU9tdXBmUlZGeVNDY2dPMkhKV2NIcGc9PSJ9\"\n        },\n        \"curies\": [{\n            \"href\": \"https://try.access.worldpay.com/rels/tokens/{rel}.json\",\n            \"name\": \"tokens\",\n            \"templated\": true\n        }]\n    }\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Remember"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The link to a token is returned in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tokenPaymentInstrument.href"]}," parameter. When you receive this response, you must save the link."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tokenId"]}," is for clients interested in linking their eCom and POS solutions. Contact your Worldpay Implementation Manager for more details."]}]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":["200 - OK"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200 OK"]}," response means that you've already tokenized the card and that all data supplied in your create a token request matches the data stored with Access Worldpay."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sometimes, a token can be matched even if the data isn't quite the same. For example, if Access Worldpay has a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["billingAddress"]}," on file, the existing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["billingAddress"]}," is retained if no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["billingAddress"]}," was supplied in your request. Additionally, you receive the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200 OK"]}," response code."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The existing token resource reference is returned in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tokenPaymentInstrument"]}," object."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"./code/token-response.json","language":"json","header":{"controls":{"copy":{}}},"lang":"json","source":"{\n    \"tokenPaymentInstrument\": {\n        \"type\": \"card/tokenized\",\n        \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0NzI0NE1rdUtjMUFJdjYxVnlibWZuUT0ifQ\"\n    },\n    \"tokenId\": \"9902480679618049603\",\n    \"description\": \"Test Token Description\",\n    \"tokenExpiryDateTime\": \"2030-06-24T09:19:35Z\",\n    \"paymentInstrument\": {\n        \"type\": \"card/masked\",\n        \"cardNumber\": \"4444********1111\",\n        \"cardHolderName\": \"Sherlock Holmes\",\n        \"cardExpiryDate\": {\n            \"month\": 5,\n            \"year\": 2035\n        },\n        \"billingAddress\": {\n            \"address1\": \"221B Baker Street\",\n            \"address2\": \"Marylebone\",\n            \"address3\": \"Westminster\",\n            \"postalCode\": \"NW1 6XE\",\n            \"city\": \"London\",\n            \"state\": \"Greater London\",\n            \"countryCode\": \"GB\"\n        },\n        \"bin\": \"444433\",\n        \"brand\": \"VISA\",\n        \"fundingType\": \"credit\"\n    },\n    \"_links\": {\n        \"tokens:token\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0NzI0NE1rdUtjMUFJdjYxVnlibWZuUT0ifQ\"\n        },\n        \"tokens:description\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0MWJVbkh1WTFGZExUNXJxc04va1ZoTFVzYW1OU1lxSFE2NHI1c2JkY1pWaSJ9\"\n        },\n        \"tokens:cardHolderName\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0d3ltd21ieGo3TlZLYzRYSkExOUhSdUpLN2N3VVc5WUk3czRUTW1RQ2JLdjFnVXlzakdPSXdWWkRhZkZyUmlMd3c9PSJ9\"\n        },\n        \"tokens:cardExpiryDate\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0d3ltd21ieGo3TlZLYzRYSkExOUhSdUpLN2N3VVc5WUk3czRUTW1RQ2JLdkVpVW5GNnBsZThNTXNQWTRGbzFzTXc9PSJ9\"\n        },\n        \"tokens:billingAddress\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0d3ltd21ieGo3TlZLYzRYSkExOUhSdFpSdXFxbWZlNVl1TkpHZEVvZXN3MTlCU0lmdCtxSTUyVDJSdXlmSTIwM3c9PSJ9\"\n        },\n        \"tokens:schemeTransactionReference\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoiSENXWFZQZjNIZ1V3dnpDMElJZS9Zdmc4M0pYM3dDWEJTVnQrWVlacXdDUXFFKzhzaC8xNSs2d3NkTTdFWUFNVU9tdXBmUlZGeVNDY2dPMkhKV2NIcGc9PSJ9\"\n        },\n        \"curies\": [{\n            \"href\": \"https://try.access.worldpay.com/rels/tokens/{rel}.json\",\n            \"name\": \"tokens\",\n            \"templated\": true\n        }]\n    }\n}\n"},"children":[]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":["409 - Conflict"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["409 Conflict"]}," response means that you've already tokenized the card, but some of the data supplied in your create a token request is different from the data in the existing token."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This conflict could be caused by a differentiation in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardHolderName"]},", card expiry ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["month"]},", card expiry ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["year"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["billingAddress"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schemeTransactionReference"]}," (see note below) fields."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In this case, the data that we have on file is retained. The data which caused the conflict is returned in a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["conflicts"]}," object. If you would like to resolve the conflict, you can ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/tokens/query-and-update-tokens#update-a-token-with-conflicts"},"children":["update the existing token"]}," using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tokens:conflicts"]}," request link returned in the response."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The behavior for a conflicting ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schemeTransactionReference"]}," is slightly different from the other fields. If the existing token does not contain a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schemeTransactionReference"]}," then it is automatically updated to include the one in your ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/tokens/create-a-token#create-a-card-token-request"},"children":["create a token request"]},", if a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schemeTransactionReference"]}," is present. If the token is otherwise the same, you get a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200 OK"]}," response. If the token has other conflicted fields you will still get a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["409 Conflict"]}," response but the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schemeTransactionReference"]}," is not listed as a conflict."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If you are attempting to create a new token with the same card details as an existing token, you would receive a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["409 Conflict"]}," response in the live environment but a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200 OK"]}," response in the test environment. This is because a different ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schemeTransactionReference"]}," is received as part of each ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/tokens/create-a-token#create-a-card-token-request"},"children":["create a token request"]},"."]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optional fields: If the existing token has a value for the field and your ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/tokens/create-a-token#create-a-card-token-request"},"children":["create a token request"]}," does not, then this is not counted as a conflict, and no change is made."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The existing token resource reference is returned in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tokenPaymentInstrument"]}," object."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"./code/create-token-conflict-response.json","language":"json","header":{"controls":{"copy":{}}},"lang":"json","source":"{\n    \"tokenPaymentInstrument\": {\n        \"type\": \"card/tokenized\",\n        \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0NzI0NE1rdUtjMUFJdjYxVnlibWZuUT0ifQ\"\n    },\n    \"tokenId\": \"9902480679618049603\",\n    \"description\": \"Test Token Description\",\n    \"tokenExpiryDateTime\": \"2030-06-24T09:19:35Z\",\n    \"paymentInstrument\": {\n        \"type\": \"card/masked\",\n        \"cardNumber\": \"4444********1111\",\n        \"cardHolderName\": \"Sherlock Holmes\",\n        \"cardExpiryDate\": {\n            \"month\": 5,\n            \"year\": 2035\n        },\n        \"billingAddress\": {\n            \"address1\": \"221B Baker Street\",\n            \"address2\": \"Marylebone\",\n            \"address3\": \"Westminster\",\n            \"postalCode\": \"NW1 6XE\",\n            \"city\": \"London\",\n            \"state\": \"Greater London\",\n            \"countryCode\": \"GB\"\n        },\n        \"bin\": \"444433\",\n        \"brand\": \"VISA\",\n        \"fundingType\": \"credit\"\n    },\n    \"conflicts\": {\n        \"paymentInstrument\": {\n            \"cardHolderName\": \"Sherlock Holmes\"\n        },\n        \"conflictsExpiryDateTime\": \"2030-06-24T09:49:35Z\"\n    },\n    \"_links\": {\n        \"tokens:token\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0NzI0NE1rdUtjMUFJdjYxVnlibWZuUT0ifQ\"\n        },\n        \"tokens:description\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0MWJVbkh1WTFGZExUNXJxc04va1ZoTFVzYW1OU1lxSFE2NHI1c2JkY1pWaSJ9\"\n        },\n        \"tokens:cardHolderName\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0d3ltd21ieGo3TlZLYzRYSkExOUhSdUpLN2N3VVc5WUk3czRUTW1RQ2JLdjFnVXlzakdPSXdWWkRhZkZyUmlMd3c9PSJ9\"\n        },\n        \"tokens:cardExpiryDate\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0d3ltd21ieGo3TlZLYzRYSkExOUhSdUpLN2N3VVc5WUk3czRUTW1RQ2JLdkVpVW5GNnBsZThNTXNQWTRGbzFzTXc9PSJ9\"\n        },\n        \"tokens:billingAddress\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0d3ltd21ieGo3TlZLYzRYSkExOUhSdFpSdXFxbWZlNVl1TkpHZEVvZXN3MTlCU0lmdCtxSTUyVDJSdXlmSTIwM3c9PSJ9\"\n        },\n        \"tokens:schemeTransactionReference\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoiSENXWFZQZjNIZ1V3dnpDMElJZS9Zdmc4M0pYM3dDWEJTVnQrWVlacXdDUXFFKzhzaC8xNSs2d3NkTTdFWUFNVU9tdXBmUlZGeVNDY2dPMkhKV2NIcGc9PSJ9\"\n        },\n        \"tokens:conflicts\": {\n            \"href\": \"https://try.access.worldpay.com/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0ODUrN2hvZ0cyK1JvQ3JKdUtFZnU5UTFsdTdwODVHTUcwYy92VW02MDlJd2pHQllvcW0zanhWQ3p3Zk9OUW9CYUZtQ1hNbFhwM3lhSXlkYVlNYWJnQUdQUHFpRVAxVXVpZHM2Y2tvTjEvOGNJdFQ0WkVlVEJIVWF6T1dlWTlQMkpnPT0ifQ\"\n        },\n        \"curies\": [{\n            \"href\": \"https://try.access.worldpay.com/rels/tokens/{rel}.json\",\n            \"name\": \"tokens\",\n            \"templated\": true\n        }]\n    }\n}\n"},"children":[]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In case of an error, you can get further information in our ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/reference/worldpay-error-responses"},"children":["error reference"]},"."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next steps"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/tokens/query-and-update-tokens#update-token-details"},"children":["Update token details"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/tokens/query-and-update-tokens#delete-tokens"},"children":["Delete the token"]}]}]},"headings":[{"value":"Create a token","id":"create-a-token","depth":1},{"value":"Create a card token request","id":"create-a-card-token-request","depth":2},{"value":"Create a token example request","id":"create-a-token-example-request","depth":3},{"value":"Responses","id":"responses","depth":3}],"frontmatter":{"seo":{"title":"Create a token"}},"lastModified":"2026-07-17T08:34:05.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/tokens/create-a-token","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}