{"templateId":"markdown","versions":[{"version":"v1","label":"v1","link":"/products/checkout/android/v1/create-sessionstate-android-advanced","default":false,"active":true,"folderId":"0dba1fab"},{"version":"v2","label":"v2","link":"/products/checkout/android/v2/create-sessionstate-android-advanced","default":false,"active":false,"folderId":"0dba1fab"},{"version":"v3","label":"v3","link":"/products/checkout/android/v3/create-sessionstate-android-advanced","default":false,"active":false,"folderId":"0dba1fab"},{"version":"v4","label":"v4","link":"/products/checkout/android/v4/create-sessionstate-android-advanced","default":false,"active":false,"folderId":"0dba1fab"},{"version":"v5","label":"v5 (Latest)","link":"/products/checkout/android/v5/create-sessionstate-android-advanced","default":true,"active":false,"folderId":"0dba1fab"}],"sharedDataIds":{"sidebar":"sidebar-products/checkout/android/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["partial","tabs","tab","admonition"]},"custom_product":"Checkout","type":"markdown"},"seo":{"title":"Create sessionState - Advanced","description":"Worldpay for Developers - docs, code examples, resources and tools. Everything you need to build your omnichannel payment solution.","siteUrl":"https://docs.worldpay-bsh.securedataplatform.co.uk","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-bsh.securedataplatform.co.uk/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":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Last updated"]},": 30 October 2025 | ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/checkout/android/changelog/"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Change log"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"create-sessionstate---advanced","__idx":0},"children":["Create ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionState"]}," - Advanced"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionState"]}," by sending your customer's card details."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sessionstate","__idx":1},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionState"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionState"]}," is a unique identifier for your customer's card details, which is generated by the SDK."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"full-integration-example","__idx":2},"children":["Full Integration example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See our GitHub repository for the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/Worldpay/access-checkout-android/blob/v1.2.0/checkout/sample/src/main/java/com/worldpay/access/checkout/MainActivity.kt"},"children":["full integration"]}," example."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"implementing-callbacks","__idx":3},"children":["Implementing callbacks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Our SDK uses callbacks to notify you when your customer's card details are valid or invalid. A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionState"]}," can only be generated if your customer's card details are valid."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cardlistener","__idx":4},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CardListener"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CardListener"]}," is a callback that notifies you of the result of the validation of your customer's card details."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's an example of how you would implement the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CardListener"]}," to check the validity of your customer's card details."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Kotlin","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":" class YourCardListener: CardListener {\n\n    override fun onUpdate(cardView: CardView, valid: Boolean) {\n        cardView.isValid(valid)\n        // some logic can be added here, for example to determine whether to enable/disable your payment submit button\n        // you may wish to use the `card.isValid()` method for determining whether the full card form is in a valid state\n    }\n\n    override fun onUpdateLengthFilter(cardView: CardView, inputFilter: InputFilter) {\n        cardView.applyLengthFilter(inputFilter)\n    }\n\n    override fun onUpdateCardBrand(cardBrand: CardBrand?) {\n        // CardBrand contains a reference to a list of images which you can\n        // use to fetch the remotely hosted image for the identified card brand.\n        // do something with the card brand that is identified and returned\n        // you may wish to use the `applyCardLogo()` method in the `PANLayout` class if you are using our fields out of the box.\n    }\n }\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"public class YourCardListener implements CardListener {\n\n    @Override\n    public void onUpdate(@NotNull CardView cardView, boolean valid) {\n        cardView.isValid(valid)\n        // some logic can be added here, for example to determine whether to enable/disable your payment submit button\n        // you may wish to use the `card.isValid()` method for determining whether the full card form is in a valid state\n    }\n\n    @Override\n    public void onUpdateLengthFilter(@NotNull CardView cardView, @NotNull InputFilter inputFilter) {\n        cardView.applyLengthFilter(inputFilter)\n    }\n\n    @Override\n    public void onUpdateCardBrand(@Nullable CardBrand cardBrand) {\n        // CardBrand contains a reference to a list of images which you can\n        // use to fetch the remotely hosted image for the identified card brand.\n        // do something with the card brand that is identified and returned\n        // you may wish to use the `applyCardLogo()` method in the `PANLayout` class if you are using our fields out of the box.\n    }\n}\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":["Function and parameter Descriptions"]},{"$$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":"Method"},"children":["Method"]},{"$$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":["onUpdate"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This method returns the validity of a particular view that your customer is entering their details in.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardView"]}," represents the current view that your customer is in. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["valid"]}," indicates whether the field is in a valid or invalid state."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUpdateLengthFilter"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This method returns an updated maximum length restriction, which can be applied to the card view that your customer is entering their details in. This is based off the given card type that is identified."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUpdateCardBrand"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This method returns the card brand based on the details that your customer is entering. This method can be used to determine the logo of the card, which can be applied as a UI effect. If the card brand cannot be identified then a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," response is returned.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"The card brand will contain a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://access.worldpay-bsh.securedataplatform.co.uk/access-checkout/cardConfiguration.json"},"children":["list of images"]}," which you may then use to display an icon for the identified card brand. Access Worldpay hosts both PNG and SVG versions of the supported card brands. You can use the icons right away and apply them to your views."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After implementing the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CardListener"]}," callback, you must initialize the validation for your views."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Kotlin","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"val card = AccessCheckoutCard(\n    panView,            // The PAN view\n    cardCVVText,        // The CVV view\n    cardExpiryText      // The Expiry view\n)\n\ncard.cardListener = this    // reference to `CardListener` implementation\ncard.cardValidator = AccessCheckoutCardValidator()  // reference to an AccessCheckoutCardValidator implementation\n\npanView.cardViewListener = card\ncardCVVText.cardViewListener = card\ncardExpiryText.cardViewListener = card\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"card = new AccessCheckoutCard(panView, cardCVVText, cardExpiryText);\n\ncard.setCardListener(yourCardListener);\ncard.setCardValidator(new AccessCheckoutCardValidator());\n\npanView.setCardViewListener(card);\ncardCVVText.setCardViewListener(card);\ncardExpiryText.setCardViewListener(card);\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"card-validation-callback","__idx":5},"children":["Card validation callback"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The validation logic, especially on the PAN and the CVV fields, in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AccessCheckoutCard"]}," is based off a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CardConfiguration"]}," JSON file, which holds the validation rules and card brand logos. The icons are available in both ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SVG"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PNG"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Access Worldpay hosts a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://access.worldpay-bsh.securedataplatform.co.uk/access-checkout/cardConfiguration.json"},"children":["JSON"]}," based version of the card configuration file, which is available to consume via a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CardConfigurationFactory"]},". All that is required to set that up is:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Kotlin","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"CardConfigurationFactory.getRemoteCardConfiguration(card, getBaseUrl())\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"CardConfigurationFactory.getRemoteCardConfiguration(card, getBaseUrl());\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You may use the supplied card configuration rules or supply your own rules based on your requirements."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Kotlin","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"val cardConfiguration = CardConfiguration(brands = ..., defaults = ...)\ncard.cardValidator = AccessCheckoutCardValidator(cardConfiguration)\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"CardConfiguration cardConfiguration = new CardConfiguration(..., ...);\ncard.setCardValidator(new AccessCheckoutCardValidator(cardConfiguration));\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The validation does not check if your customer's card details are correct. The validator only checks the formatting of the entered details."]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":["Validation Rules"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The table below shows the rules that our SDK uses to validate your customer's card details."]},{"$$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":"Brand"},"children":["Brand"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"panStart"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["panStart"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"panEnd"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["panEnd"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"panLength"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["panLength"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"cvvLength"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cvvLength"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["40"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["49"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["16"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["413600"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["413600"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["444509"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["444509"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["444550"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["444550"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["450603"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["450603"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["450617"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["450617"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["450628"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["450628"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["450636"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["450636"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["450640"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["450640"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["450662"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["450662"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["463100"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["463100"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["476142"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["476142"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["476143"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["476143"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["492901"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["492901"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["492920"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["492920"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["492923"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["492923"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["492928"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["492928"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["492937"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["492937"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["492939"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["492939"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["visa"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["492960"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["492960"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["13"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mastercard"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["22"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["27"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["16"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mastercard"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["50"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["59"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["16"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["mastercard"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["67"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["67"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["16"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["amex"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["34"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["34"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["15"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["amex"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["37"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["37"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["15"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["4"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sessionresponselistener","__idx":6},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionResponseListener"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You must also create a class that implements our ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionResponseListener"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionResponseListener"]}," receives notifications during the lifecycle of the request. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionResponseListener"]}," is generates and returns the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionState"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here is an example of how you would create a class that implements our ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionResponseListener"]},"."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Kotlin","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"class YourSessionResponseListener: SessionResponseListener {\n    override fun onRequestStarted() {\n       ...\n    }\n\n    override fun onRequestFinished(sessionState: String?, error: AccessCheckoutException?) {\n        ....\n    }\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"public class YourSessionResponseListener implements SessionResponseListener {\n    @Override\n    public void onRequestStarted() {\n        ...\n    }\n\n    @Override\n    public void onRequestFinished(@Nullable String sessionState, @Nullable AccessCheckoutException error) {\n        ...\n    }\n}\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"details","attributes":{},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":["AccessCheckoutException"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If there is an error, the error is returned by the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionResponseListener"]}," through the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onRequestFinished(sessionState: String?, error: AccessCheckoutException?)"]}," callback, this time with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionState"]}," as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," and error as a non-null error. See the table below for all the possible returned errors."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following table of errors can be found in the enum class ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["com.worldpay.access.checkout.api.AccessCheckoutException.Error"]}]},{"$$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":"HTTP Code"},"children":["HTTP Code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Error name"},"children":["Error name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Message"},"children":["Message"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bodyIsNotJson"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The body within the request is not valid JSON."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bodyIsEmpty"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The body within the request is empty."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bodyDoesNotMatchSchema"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The JSON body provided does not match the expected schema."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["404"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resourceNotFound"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Requested resource was not found."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["404"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["endpointNotFound"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Requested endpoint was not found."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["405"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["methodNotAllowed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Requested method is not allowed."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["406"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unsupportedAcceptHeader"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Accept header is not supported."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["415"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unsupportedContentType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Content-type header is not supported."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["500"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["internalErrorOccurred"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Internal server error."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["500"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unknownError"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unknown error."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you're presented with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bodyDoesNotMatchSchema"]}," error, a list of the broken validation rules is provided to help with debugging the problem."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AccessCheckoutClientError"]}," is the subclass used for the above issues."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"kotlin","__idx":7},"children":["Kotlin"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"data class AccessCheckoutClientError(\n    val error: Error,\n    override val message: String?,\n    val validationRules: List<ValidationRule>? = null\n) : AccessCheckoutException()\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["validationRules"]}," list contains a list of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ValidationRule"]},"s, which includes the error, a description message and the JSON path to the location where the error was caused."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"initialize-the-sdk","__idx":8},"children":["Initialize the SDK"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once you've created the classes and extended the callbacks, you must initialize the SDK using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AccessCheckoutClient"]}," method."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To initialize the SDK, you must provide your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BaseURL"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantID"]}," and other parameters. See the table below for more information."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's an example of how you would initialize the SDK with the parameters and configurations you must include."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Kotlin","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"override fun onStart(){\n    super.onStart()\n    val accessCheckoutClient=AccessCheckoutClient.init(\n    getBaseUrl(),           // Base API URL \n    getMerchantID(),        // Your merchant ID\n    sessionResponseListener,// SessionResponseListener\n    applicationContext,     // Context\n    lifecycleOwner          // LifecycleOwner\n    )\n    ...\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"@Override\nprotected void onStart(){\n    super.onStart();\n    ...\n    AccessCheckoutClient accessCheckoutClient=AccessCheckoutClient.init(\n        getBaseUrl(),           // Base API URL\n        getMerchantID(),        // Your merchant ID\n        sessionResponseListener,// SessionResponseListener\n        applicationContext,     // Context\n        lifecycleOwner          // LifecycleOwner\n    );\n}\n","lang":"java"},"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":"Methods"},"children":["Methods"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Descriptions"},"children":["Descriptions"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BaseURL"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For testing use : ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://try.access.worldpay-bsh.securedataplatform.co.uk/"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For live use : ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://access.worldpay-bsh.securedataplatform.co.uk/"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MerchantID"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your unique merchant ID."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionResponseListener"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The callback listener that returns your customer's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionState"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["applicationContext"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developer.android.com/reference/android/content/Context"},"children":["Android Context"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lifecycle"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developer.android.com/reference/android/arch/lifecycle/LifecycleOwner"},"children":["Android LifecycleOwner"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"submitting-your-customers-card-details","__idx":9},"children":["Submitting your customer's card details"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once your customer has finished entering their card details and clicks the submit button, you must invoke the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accessCheckoutClient.generateSessionState(...)"]}," method."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's an example of what you should do when your customer clicks the submit button."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Kotlin","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"...\nsubmit.setOnClickListener {\n    val pan = panView.getInsertedText()\n    val month = cardExpiryText.getMonth()\n    val year = cardExpiryText.getYear()\n    val cvv = cardCVVText.getInsertedText()\n    accessCheckoutClient.generateSessionState(pan, month, year, cvv)\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"...\nsubmit.setOnClickListener(new View.OnClickListener() {\n    @Override\n    public void onClick(View v) {\n      String pan = panView.getInsertedText();\n      int month = cardExpiryText.getMonth();\n      int year = cardExpiryText.getYear();\n      String cvv = cardCVVText.getInsertedText();\n      accessCheckoutClient.generateSessionState(pan, month, year, cvv);\n    }\n});\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"generate-sessionstate","__idx":10},"children":["Generate ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionState"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"generating-the-sessionstate","__idx":11},"children":["Generating the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionState"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionState"]}," is returned in the response of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onRequestFinished()"]}," method, invoked in",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#sessionresponselistener"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YourSessionResponseListener"]}]}," class."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Kotlin","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"...\noverride fun onRequestFinished(sessionState: String?, error: AccessCheckoutException?) {\n    ...\n}\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"...\n@Override\npublic void onRequestFinished(@Nullable String sessionState, @Nullable AccessCheckoutException error) {\n  ...\n}\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-a-verified-token","__idx":12},"children":["Create a Verified token"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once you've received a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionState"]}," you must create a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/verified-tokens/v2/create-verified-token#create-a-verified-token-request"},"children":["verified token"]}," to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/card-payments/v6/authorize-a-payment#authorize-a-payment"},"children":["take a payment"]},"."]},{"$$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/verified-tokens/v2/create-verified-token"},"children":["Verified token"]}]}]},"headings":[{"value":"Create sessionState - Advanced","id":"create-sessionstate---advanced","depth":1},{"value":"sessionState","id":"sessionstate","depth":3},{"value":"Full Integration example","id":"full-integration-example","depth":4},{"value":"Implementing callbacks","id":"implementing-callbacks","depth":2},{"value":"CardListener","id":"cardlistener","depth":3},{"value":"Card validation callback","id":"card-validation-callback","depth":4},{"value":"SessionResponseListener","id":"sessionresponselistener","depth":3},{"value":"Kotlin","id":"kotlin","depth":4},{"value":"Initialize the SDK","id":"initialize-the-sdk","depth":2},{"value":"Submitting your customer's card details","id":"submitting-your-customers-card-details","depth":2},{"value":"Generate sessionState","id":"generate-sessionstate","depth":2},{"value":"Generating the sessionState","id":"generating-the-sessionstate","depth":3},{"value":"Create a Verified token","id":"create-a-verified-token","depth":3}],"frontmatter":{"seo":{"title":"Create sessionState - Advanced"}},"lastModified":"2025-11-26T14:54:42.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/checkout/android/v1/create-sessionstate-android-advanced","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}