{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Access API Authentication | Worldpay Developer","description":"Worldpay for Developers - docs, code examples, resources and tools. Everything you need to build your omnichannel payment solution.","siteUrl":"https://docs.worldpay.com","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/**/*"]},{"title":"Payment Queries API","description":"Querying your payments data, based on a variety of parameters.","includeFiles":["products/payment-queries/@v1/**/*"]},{"title":"Card BIN Data API","description":"Provides detailed information about a card.","includeFiles":["products/card-bin/@v1/**/*"]},{"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/**/*"]},{"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/**/*"]},{"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/**/*"]},{"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/**/*"]},{"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/**/*"]},{"title":"Card Verifications API","description":"Verify your customer's card to maximize your authentication rates.","includeFiles":["products/card-verifications/@v6/**/*"]},{"title":"Account Payouts API","description":"Send funds to your customer's bank accounts and search for payouts using parameters.","includeFiles":["products/account-payouts/@20250101/**/*"]},{"title":"APMs","description":"Pay using eWallets, bank transfers, direct debits, local card schemes, Postpay and eInvoice/ Buy Now Pay Later.","includeFiles":["products/apms/@20240701/**/*"]},{"title":"Balance API","description":"Request your account details for a single account or all accounts under an entity.","includeFiles":["products/balance/@20250101/**/*"]},{"title":"Card Payouts API","description":"Send funds to your customer's cards.","includeFiles":["products/card-payouts/@v4/**/*"]},{"title":"Events (Webhooks)","description":"Receive status updates from Access Worldpay by setting up a webhook.","includeFiles":["products/events/@v1/**/*"]},{"title":"FX API","description":"Manage Foreign Exchange (FX) on your payments.","includeFiles":["products/fx/@v1/**/*"]},{"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/**/*"]},{"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/**/*"]},{"title":"Parties API","description":"Create parties, manage your payout instruments and beneficial owners and carry out identity verification checks.","includeFiles":["products/parties/@20250101/**/*"]},{"title":"SCA Exemptions API","description":"Maximize a frictionless checkout experience by using issuer data insights to apply exemptions.","includeFiles":["products/sca-exemptions/@v1/**/*"]},{"title":"Split Payments API","description":"Divide funds from a single payment amongst yourself and your parties/sellers.","includeFiles":["products/split-payments/@20250625/**/*"]},{"title":"Statements API","description":"Retrieve your account statement and see individual entries for all credits and debits.","includeFiles":["products/statements/@20250101/**/*"]},{"title":"Transfers API","description":"Transfer funds from source account to target account.","includeFiles":["products/transfers/@20250101/**/*"]},{"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/**/*"]}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"api-authentication","__idx":0},"children":["API Authentication"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"oauth2","__idx":1},"children":["OAuth2"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Clients using our APIs are authenticated using the OAuth 2.0 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_credentials"]}," grant type."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["We will issue you with a unique ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_id"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_secret"]},", which you use to authenticate directly with our authorization server to obtain short-lived access tokens. You then include the access token in subsequent API requests as a Bearer token in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," header."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"obtaining-an-access-token","__idx":2},"children":["Obtaining an access token"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /oauth2/tokens\nAuthorization: Basic {base64(client_id:client_secret)}\nContent-Type: application/x-www-form-urlencoded\n\ngrant_type=client_credentials\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If authentication is successful, the authorization server will return an access token."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-response","__idx":3},"children":["Example response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"200 OK\n\n{\n  \"access_token\": \"DhFDAXfadrMAdbwxh9JNsMi5i7GF\",\n  \"token_type\": \"Bearer\",\n  \"expires_in\": 900\n}\n","lang":"http"},"children":[]},{"$$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":"Field"},"children":["Field"]},{"$$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":["access_token"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The token to be used to authenticate API requests."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token_type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The authentication scheme. This will always be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Bearer"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expires_in"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The token's lifetime in seconds."]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response may contain other fields which we have excluded for simplicity. Other response fields are not always returned and you must not use, validate or expect them in any way."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"using-an-access-token","__idx":4},"children":["Using an access token"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Include the token in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," header of all subsequent API requests."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"Authorization: Bearer DhFDAXfadrMAdbwxh9JNsMi5i7GF\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"token-reuse-and-renewal","__idx":5},"children":["Token reuse and renewal"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Access tokens must be cached and reused for multiple API requests until they approach expiry."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To avoid authentication failures caused by token expiration, network latency, or retries, we recommend requesting a new access token after approximately 70-80% of the current token's lifetime has elapsed."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example, for a token with a lifetime of 900 seconds (15 minutes), request a replacement token after approximately 10-12 minutes."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your applications should continue to use the current token until the replacement token has been successfully acquired, and then switch to the new token before the previous token expires."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Summary"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Always request a new token at 70-80% of the current token's lifetime to allow for network jitters and retries, and switch to the new access token shortly before the expiry of the previous one."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Do ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not"]}," request a new access token for every payment request. This will significantly impact your latency and may result in rate limiting."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"access-token-format","__idx":6},"children":["Access token format"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["must"]}," treat the token as an opaque string."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["must"]}," support token lengths up to 8 KB."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["must"]}," use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expires_in"]}," value to determine the lifetime of the token."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["must not"]}," assume any specific token format or structure."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["must not"]}," try to inspect, parse, decode, or validate token contents."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["must not"]}," assume token contents will remain unchanged over time."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The lifespan (TTL) of a token ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["must not"]}," be considered a fixed value and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["must not"]}," be hardcoded."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The internal token format, encoding, structure, and claims may change at any time without notice. Such changes ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["are not"]}," considered to be ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/reference/api-principles#breaking-and-non-breaking-changes"},"children":["breaking changes"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"basic-authentication","__idx":7},"children":["Basic authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Basic authentication remains available for clients on request."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you have been issued with basic authentication credentials and would like to switch to OAuth2, please speak to your Implementation Manager."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"clientside-sdks","__idx":8},"children":["Clientside SDKs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For clientside SDKs, we create a public ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkoutId"]}," that we map to your account's API credentials. Use this to initialize the SDK."]}]},"headings":[{"value":"API Authentication","id":"api-authentication","depth":1},{"value":"OAuth2","id":"oauth2","depth":2},{"value":"Obtaining an access token","id":"obtaining-an-access-token","depth":2},{"value":"Example response","id":"example-response","depth":3},{"value":"Using an access token","id":"using-an-access-token","depth":2},{"value":"Token reuse and renewal","id":"token-reuse-and-renewal","depth":2},{"value":"Access token format","id":"access-token-format","depth":2},{"value":"Basic authentication","id":"basic-authentication","depth":2},{"value":"Clientside SDKs","id":"clientside-sdks","depth":2}],"frontmatter":{"seo":{"title":"Access API Authentication | Worldpay Developer"},"sidebar":{"path":"../../../sidebars.yaml"}},"lastModified":"2026-11-26T16:01:31.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/reference/api-authentication","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}