{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading","br","details","admonition","endpoint","required"]},"type":"markdown"},"seo":{"title":"Name verification","description":"Transform your commerce with PXP's unified platform—seamless payments, real-time insights, and global growth in one powerful integration.","lang":"en-UK","siteUrl":"https://developer.pxp.io","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"name-verification","__idx":0},"children":["Name verification"]},{"$$mdtype":"Tag","name":"SubHeading","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Verify cardholder names match registered address information."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Name verification checks whether the cardholder's name matches the name associated with the registered address on file. This feature helps reduce fraud by validating the identity of the person making the payment."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To enable name verification, you need to:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Configure your backend to request name verification during session creation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Implement the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShopper"]}," callback in your SDK configuration to provide shopper details (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["firstName"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastName"]},"). The SDK uses these values for name verification — not the cardholder name field automatically."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Retrieve the verification result from the transaction details API after payment."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1-enable-name-verification-in-your-session","__idx":2},"children":["Step 1: Enable name verification in your session"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When creating a checkout session on your backend, include the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identityVerification"]}," object in your API request:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"merchant\": \"merchant-01\",\n  \"site\": \"site-01\",\n  \"merchantTransactionId\": \"txn-001\",\n  \"amounts\": {\n    \"currencyCode\": \"USD\",\n    \"transactionValue\": 100.00\n  },\n  \"transactionMethod\": {\n    \"intent\": {\n      \"card\": \"Authorisation\"\n    }\n  },\n  \"identityVerification\": {\n    \"nameVerification\": true\n  }\n}\n","lang":"json"},"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":"Parameter"},"children":["Parameter"]},{"$$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":["identityVerification.nameVerification"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," to enable name verification for the transaction."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2-provide-shopper-details","__idx":3},"children":["Step 2: Provide shopper details"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Implement the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShopper"]}," callback in your SDK configuration to provide the cardholder's first and last name:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import com.pxp.PxpCheckout\nimport com.pxp.checkout.components.newCard.NewCardComponent\nimport com.pxp.checkout.components.newCard.NewCardComponentConfig\nimport com.pxp.checkout.models.*\nimport com.pxp.checkout.services.models.transaction.Shopper\nimport com.pxp.checkout.types.ComponentType\n\nval pxpSdkConfig = PxpSdkConfig(\n    environment = Environment.TEST,\n    session = sessionConfig,\n    clientId = \"your-client-id\",\n    ownerType = \"MerchantGroup\",\n    ownerId = \"your-owner-id\",\n    transactionData = TransactionData(\n        amount = 100.0,\n        currency = \"USD\",\n        merchant = \"merchant-01\",\n        entryType = EntryType.Ecom,\n        intent = TransactionIntentData(card = CardIntentType.Authorisation),\n        merchantTransactionId = UUID.randomUUID().toString(),\n        merchantTransactionDate = { Instant.now().toString() }\n    ),\n    onGetShopper = {\n        Shopper(\n            firstName = \"John\",\n            lastName = \"Doe\"\n        )\n    }\n)\n\nval pxpCheckout = PxpCheckout.builder()\n    .withConfig(pxpSdkConfig)\n    .withContext(context)\n    .build()\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use a real ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionConfig"]}," from your session API response (include ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["locale"]},", not only ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hmacKey"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["encryptionKey"]},")."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For name verification, the SDK sends ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["firstName"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastName"]}," from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShopper"]}," on the transaction request. If you collect a cardholder name in the UI, return those values from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShopper"]},". Optionally set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Shopper.id"]}," when storing cards or deleting tokens after failed payments."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["firstName"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastName"]}," fields are required for name verification to work. Learn more about the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/card/events#sdk-data-callbacks"},"children":["onGetShopper callback"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"shopper-type-reference","__idx":4},"children":["Shopper type reference"]},{"$$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":["firstName"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The cardholder's first name."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastName"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The cardholder's last name."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-3-retrieve-the-verification-result","__idx":5},"children":["Step 3: Retrieve the verification result"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After a transaction is completed, retrieve the name verification result by calling the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developer.pxp.io/apis/transaction/other/get-transaction-details"},"children":["Get transaction details API"]}," on your backend."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The name verification result isn't returned in the SDK transaction response. You must retrieve it from the API using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantTransactionId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["systemTransactionId"]}," received in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CardSubmitComponentConfig.onPostAuthorisation"]}," (via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NewCardComponentConfig.submit"]},")."]}]},{"$$mdtype":"Tag","name":"Endpoint","attributes":{"method":"GET"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["/v1/transactions/{merchant}/{site}"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"request-example","__idx":6},"children":["Request example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To get a transaction's details, you'll need to supply the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["site"]}," associated with the transaction, and either its ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantTransactionId"]}," or its ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["systemTransactionId"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the following request example to get a transaction's details using a merchant transaction ID."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"curl","header":{"controls":{"copy":{}}},"source":"curl --request GET \\\n     --url https://api-services.pxp.io/api/v1/transactions/MERCHANT-1/SITE-1?merchantTransactionId=ECOM-001 \\\n     --header 'accept: application/json'\n","lang":"curl"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"path-parameters","__idx":7},"children":["Path 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":"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":["merchant"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 10 characters)"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The unique merchant identifier associated with this transaction, as assigned by PXP."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["site"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 10 characters)"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The unique site identifier associated with this transaction, as assigned by PXP."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"query-parameters","__idx":8},"children":["Query 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":"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":["merchantTransactionId"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 50 characters)"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The unique identifier that you assigned to this transaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["systemTransactionId"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 40 characters)"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The unique identifier assigned to this transaction by PXP."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"response-example","__idx":9},"children":["Response example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your request is successful, you'll receive a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}," response containing an array of transaction records. The last element of the array contains the most recent transaction state. The name verification result is returned in the  ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fundingData.providerResponse.nameVerificationResult"]}," field."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"[\n  {\n    \"systemTransactionId\": \"1ed768bb-e88a-4636-91ae-67927ccbb02b\",\n    \"state\": \"Authorised\",\n    \"merchantTransactionId\": \"ECOM-001\",\n    \"fundingData\": {\n      \"providerResponse\": {\n        \"nameVerificationResult\": \"NoInformationAvailable\"\n      }\n    }\n  }\n]\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"verification-result-values","__idx":10},"children":["Verification result values"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following table describes the possible verification result values and their meaning."]},{"$$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":"Value"},"children":["Value"]},{"$$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":["NoInformationAvailable"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No verification information was available from the card issuer."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNameMatchedLastNameMatched"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Both first and last names matched the registered information."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNameMatchedLastNameNotMatched"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First name matched, but last name did not match."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNameMatchedLastNameNotChecked"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First name matched, but last name was not checked."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNameMatchedLastNamePartialMatch"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First name matched, last name partially matched."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNameNotMatchedLastNameMatched"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First name did not match, but last name matched."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNameNotMatchedLastNameNotMatched"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Neither first name nor last name matched."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNameNotMatchedLastNameNotChecked"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First name did not match, last name was not checked."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNameNotMatchedLastNamePartialMatch"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First name did not match, last name partially matched."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNameNotCheckedLastNameMatched"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First name was not checked, but last name matched."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNameNotCheckedLastNameNotMatched"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First name was not checked, last name did not match."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNameNotCheckedLastNameNotChecked"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Neither first name nor last name was checked."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNameNotCheckedLastNamePartialMatch"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First name was not checked, last name partially matched."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNamePartialMatchLastNameMatched"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First name partially matched, last name matched."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNamePartialMatchLastNameNotMatched"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First name partially matched, last name did not match."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNamePartialMatchLastNameNotChecked"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First name partially matched, last name was not checked."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FirstNamePartialMatchLastNamePartialMatch"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Both first and last names partially matched."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"complete-example","__idx":11},"children":["Complete example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's a complete example showing how to implement name verification:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import android.os.Bundle\nimport androidx.activity.ComponentActivity\nimport androidx.activity.compose.setContent\nimport androidx.compose.foundation.layout.*\nimport androidx.compose.material.*\nimport androidx.compose.runtime.*\nimport androidx.compose.ui.Modifier\nimport androidx.compose.ui.platform.LocalContext\nimport androidx.compose.ui.unit.dp\nimport com.pxp.PxpCheckout\nimport com.pxp.checkout.components.newCard.NewCardComponent\nimport com.pxp.checkout.components.newCard.NewCardComponentConfig\nimport com.pxp.checkout.models.*\nimport com.pxp.checkout.services.models.transaction.Shopper\nimport com.pxp.checkout.types.ComponentType\nimport kotlinx.coroutines.launch\nimport java.time.Instant\nimport java.util.UUID\n\nclass CheckoutActivity : ComponentActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        \n        setContent {\n            CheckoutScreen()\n        }\n    }\n}\n\n@Composable\nfun CheckoutScreen() {\n    val context = LocalContext.current\n    val scope = rememberCoroutineScope()\n    \n    var pxpCheckout by remember { mutableStateOf<PxpCheckout?>(null) }\n    var newCardComponent by remember { mutableStateOf<NewCardComponent?>(null) }\n    var sessionConfig by remember { mutableStateOf<SessionConfig?>(null) }\n    \n    // Step 1: Create session with name verification enabled (backend)\n    LaunchedEffect(Unit) {\n        try {\n            sessionConfig = createSessionWithNameVerification()\n            \n            // Step 2: Initialize SDK with onGetShopper callback\n            val pxpSdkConfig = PxpSdkConfig(\n                environment = Environment.TEST,\n                session = sessionConfig!!,\n                clientId = \"your-client-id\",\n                ownerType = \"MerchantGroup\",\n                ownerId = \"owner-123\",\n                transactionData = TransactionData(\n                    amount = 100.0,\n                    currency = \"USD\",\n                    merchant = \"merchant-01\",\n                    entryType = EntryType.Ecom,\n                    intent = TransactionIntentData(card = CardIntentType.Authorisation),\n                    merchantTransactionId = UUID.randomUUID().toString(),\n                    merchantTransactionDate = { Instant.now().toString() }\n                ),\n                onGetShopper = {\n                    // Return shopper details from your system\n                    val shopper = fetchShopperDetails()\n                    Shopper(\n                        firstName = shopper.firstName,\n                        lastName = shopper.lastName\n                    )\n                }\n            )\n            \n            pxpCheckout = PxpCheckout.builder()\n                .withConfig(pxpSdkConfig)\n                .withContext(context)\n                .build()\n            \n            // Create and configure the new card component\n            val newCardConfig = NewCardComponentConfig().apply {\n                submit = CardSubmitComponentConfig().apply {\n                    onPreAuthorisation = { _ ->\n                        TransactionInitiationData()\n                    }\n                    onPostAuthorisation = { submitResult ->\n                        when (submitResult) {\n                            is MerchantSubmitResult -> {\n                                scope.launch {\n                                    retrieveVerificationResult(\n                                        merchantTransactionId = submitResult.merchantTransactionId,\n                                        systemTransactionId = submitResult.systemTransactionId\n                                    )\n                                }\n                            }\n                            is FailedSubmitResult -> {\n                                // handle via onSubmitError in practice\n                            }\n                            else -> { /* other HTTP 200 outcomes */ }\n                        }\n                    }\n                }\n            }\n            \n            newCardComponent = pxpCheckout?.createComponent<NewCardComponent>(\n                ComponentType.NEW_CARD,\n                newCardConfig\n            )\n            \n        } catch (e: Exception) {\n            println(\"Failed to initialize checkout: ${e.message}\")\n        }\n    }\n    \n    // Render the component\n    Column(\n        modifier = Modifier\n            .fillMaxSize()\n            .padding(16.dp)\n    ) {\n        if (newCardComponent != null) {\n            newCardComponent?.Content(modifier = Modifier.fillMaxWidth())\n        } else {\n            CircularProgressIndicator()\n        }\n    }\n}\n\nsuspend fun createSessionWithNameVerification(): SessionConfig {\n    // Backend API call to create session with identity verification\n    val sessionRequest = mapOf(\n        \"merchant\" to \"merchant-01\",\n        \"site\" to \"site-01\",\n        \"merchantTransactionId\" to UUID.randomUUID().toString(),\n        \"amounts\" to mapOf(\n            \"currencyCode\" to \"USD\",\n            \"transactionValue\" to 100.0\n        ),\n        \"transactionMethod\" to mapOf(\n            \"intent\" to mapOf(\n                \"card\" to \"Authorisation\"\n            )\n        ),\n        \"identityVerification\" to mapOf(\n            \"nameVerification\" to true\n        )\n    )\n    \n    // Make your API call and return session data\n    // This is placeholder - implement your actual API call\n    return SessionConfig(\n        sessionId = \"session-123\",\n        hmacKey = \"hmac-key\",\n        encryptionKey = \"encryption-key\",\n        data = \"{}\",\n        locale = \"en-US\"\n    )\n}\n\nsuspend fun fetchShopperDetails(): ShopperDetails {\n    // Fetch shopper details from your backend\n    // This is placeholder - implement your actual data fetch\n    return ShopperDetails(\n        firstName = \"John\",\n        lastName = \"Doe\"\n    )\n}\n\nsuspend fun retrieveVerificationResult(\n    merchantTransactionId: String,\n    systemTransactionId: String\n) {\n    try {\n        // Backend API call to get transaction details\n        val url = \"https://your-api.com/api/v1/transactions/merchant-01/site-01?merchantTransactionId=$merchantTransactionId&systemTransactionId=$systemTransactionId\"\n        \n        // Make your API call - this is placeholder\n        // val response = httpClient.get(url)\n        // val transactions = response.body<List<Transaction>>()\n        \n        // Parse the response and extract verification result from the last transaction\n        // val latestTransaction = transactions.lastOrNull()\n        // val verificationResult = latestTransaction?.fundingData?.providerResponse?.nameVerificationResult\n        \n        val verificationResult = \"FirstNameMatchedLastNameMatched\" // Placeholder\n        \n        println(\"Name verification result: $verificationResult\")\n        \n        // Handle the verification result\n        when (verificationResult) {\n            \"FirstNameMatchedLastNameMatched\" -> {\n                println(\"Name verification successful\")\n            }\n            \"NoInformationAvailable\" -> {\n                println(\"Name verification information not available\")\n            }\n            else -> {\n                println(\"Name verification failed or partially matched\")\n            }\n        }\n    } catch (e: Exception) {\n        println(\"Failed to retrieve verification result: ${e.message}\")\n    }\n}\n\n// Helper data classes\ndata class ShopperDetails(\n    val firstName: String,\n    val lastName: String\n)\n\ndata class Transaction(\n    val systemTransactionId: String,\n    val merchantTransactionId: String,\n    val fundingData: FundingData?\n)\n\ndata class FundingData(\n    val providerResponse: ProviderResponse?\n)\n\ndata class ProviderResponse(\n    val nameVerificationResult: String?\n)\n","lang":"kotlin"},"children":[]}]},"headings":[{"value":"Name verification","id":"name-verification","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Step 1: Enable name verification in your session","id":"step-1-enable-name-verification-in-your-session","depth":2},{"value":"Step 2: Provide shopper details","id":"step-2-provide-shopper-details","depth":2},{"value":"Shopper type reference","id":"shopper-type-reference","depth":3},{"value":"Step 3: Retrieve the verification result","id":"step-3-retrieve-the-verification-result","depth":2},{"value":"Request example","id":"request-example","depth":3},{"value":"Path parameters","id":"path-parameters","depth":4},{"value":"Query parameters","id":"query-parameters","depth":4},{"value":"Response example","id":"response-example","depth":3},{"value":"Verification result values","id":"verification-result-values","depth":2},{"value":"Complete example","id":"complete-example","depth":2}],"frontmatter":{"seo":{"title":"Name verification"}},"lastModified":"2026-06-30T11:44:00.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/checkout/components/android/card/name-verification","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}