{"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":"code","attributes":{},"children":["onGetShopper"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(() async -> TransactionShopper?)?"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"import PXPCheckoutSDK\n\nlet checkoutConfig = CheckoutConfig(\n    environment: .test,\n    session: sessionData,\n    transactionData: TransactionData(\n        amount: Decimal(100.00),\n        currency: \"USD\",\n        entryType: .ecom,\n        intent: TransactionIntentData(card: .authorisation),\n        merchantTransactionId: UUID().uuidString,\n        merchantTransactionDate: { Date() }\n    ),\n    merchantShopperId: \"shopper-123\",\n    ownerId: \"your-owner-id\",\n    onGetShopper: {\n        TransactionShopper(\n            firstName: \"John\",\n            lastName: \"Doe\"\n        )\n    }\n)\n\nlet pxpCheckout = try PxpCheckout.initialize(config: checkoutConfig)\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When fetching shopper details asynchronously:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"onGetShopper: {\n    let shopper = await self.fetchShopperDetails()\n    return TransactionShopper(\n        firstName: shopper.firstName,\n        lastName: shopper.lastName\n    )\n}\n","lang":"swift"},"children":[]},{"$$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"]},". Align ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionShopper.id"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantShopperId"]}," for card-on-file flows."]},{"$$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/ios/card/events#sdk-data-callbacks"},"children":["onGetShopper callback"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"transactionshopper-type-reference","__idx":4},"children":["TransactionShopper 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":"swift","header":{"controls":{"copy":{}}},"source":"import UIKit\nimport PXPCheckoutSDK\n\nclass CheckoutViewController: UIViewController {\n    \n    private var pxpCheckout: PxpCheckout?\n    private var newCardComponent: NewCardComponent?\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        Task {\n            await initializeCheckout()\n        }\n    }\n    \n    private func initializeCheckout() async {\n        do {\n            // Step 1: Create session with name verification enabled (backend)\n            let sessionData = try await createSessionWithNameVerification()\n            \n            // Step 2: Initialize SDK with onGetShopper callback\n            let checkoutConfig = CheckoutConfig(\n                environment: .test,\n                session: sessionData,\n                transactionData: TransactionData(\n                    amount: Decimal(100.00),\n                    currency: \"USD\",\n                    entryType: .ecom,\n                    intent: TransactionIntentData(card: .authorisation),\n                    merchantTransactionId: UUID().uuidString,\n                    merchantTransactionDate: { Date() }\n                ),\n                merchantShopperId: \"shopper-123\",\n                ownerId: \"owner-123\",\n                onGetShopper: {\n                    // Return shopper details from your system\n                    let shopper = await self.fetchShopperDetails()\n                    return TransactionShopper(\n                        firstName: shopper.firstName,\n                        lastName: shopper.lastName\n                    )\n                }\n            )\n            \n            pxpCheckout = try PxpCheckout.initialize(config: checkoutConfig)\n            \n            // Create and configure the new card component\n            let newCardConfig = NewCardComponentConfig()\n            var submit = CardSubmitComponentConfig()\n\n            submit.onPreAuthorisation = { _ async in\n                TransactionInitiationData()\n            }\n\n            submit.onPostAuthorisation = { [weak self] (result: MerchantSubmitResult) in\n                guard let self = self else { return }\n\n                Task {\n                    await self.retrieveVerificationResult(\n                        merchantTransactionId: result.merchantTransactionId,\n                        systemTransactionId: result.systemTransactionId\n                    )\n                }\n            }\n\n            newCardConfig.submit = submit\n            \n            let component = try pxpCheckout?.create(.newCard, componentConfig: newCardConfig)\n            newCardComponent = component as? NewCardComponent\n            \n            // Mount the component in your view hierarchy\n            if let contentView = newCardComponent?.buildContent() {\n                // Add contentView to your UI\n            }\n            \n        } catch {\n            print(\"Failed to initialize checkout: \\(error)\")\n        }\n    }\n    \n    private func createSessionWithNameVerification() async throws -> SessionData {\n        // Backend API call to create session with identity verification\n        let sessionRequest: [String: Any] = [\n            \"merchant\": \"merchant-01\",\n            \"site\": \"site-01\",\n            \"merchantTransactionId\": UUID().uuidString,\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        \n        // Make your API call and return session data\n        // This is placeholder - implement your actual API call\n        return SessionData(\n            sessionId: \"session-123\",\n            hmacKey: \"hmac-key\",\n            encryptionKey: \"encryption-key\"\n        )\n    }\n    \n    private func fetchShopperDetails() async -> (firstName: String, lastName: String) {\n        // Fetch shopper details from your backend\n        // This is placeholder - implement your actual data fetch\n        return (firstName: \"John\", lastName: \"Doe\")\n    }\n    \n    private func retrieveVerificationResult(\n        merchantTransactionId: String,\n        systemTransactionId: String\n    ) async {\n        do {\n            // Backend API call to get transaction details\n            let url = URL(string: \"https://your-api.com/api/v1/transactions/merchant-01/site-01?merchantTransactionId=\\(merchantTransactionId)&systemTransactionId=\\(systemTransactionId)\")!\n            \n            let (data, _) = try await URLSession.shared.data(from: url)\n            let transactions = try JSONDecoder().decode([Transaction].self, from: data)\n            \n            if let latestTransaction = transactions.last,\n               let verificationResult = latestTransaction.fundingData?.providerResponse?.nameVerificationResult {\n                \n                print(\"Name verification result: \\(verificationResult)\")\n                \n                // Handle the verification result\n                switch verificationResult {\n                case \"FirstNameMatchedLastNameMatched\":\n                    print(\"Name verification successful\")\n                case \"NoInformationAvailable\":\n                    print(\"Name verification information not available\")\n                default:\n                    print(\"Name verification failed or partially matched\")\n                }\n            }\n        } catch {\n            print(\"Failed to retrieve verification result: \\(error)\")\n        }\n    }\n}\n\n// Helper models for parsing transaction response\nstruct Transaction: Codable {\n    let systemTransactionId: String\n    let merchantTransactionId: String\n    let fundingData: FundingData?\n}\n\nstruct FundingData: Codable {\n    let providerResponse: ProviderResponse?\n}\n\nstruct ProviderResponse: Codable {\n    let nameVerificationResult: String?\n}\n","lang":"swift"},"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":"TransactionShopper type reference","id":"transactionshopper-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/ios/card/name-verification","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}