{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading","br","details","admonition"]},"type":"markdown"},"seo":{"title":"Error handling","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":"error-handling","__idx":0},"children":["Error handling"]},{"$$mdtype":"Tag","name":"SubHeading","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Understand error types, handle payment failures, and implement proper error recovery."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Drop-in provides comprehensive error handling through the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," callback. All payment failures, validation errors, and SDK exceptions are caught and delivered through this unified interface, making error handling consistent across all payment methods."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"error-callback","__idx":2},"children":["Error callback"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All errors are delivered through the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," callback:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"import CheckoutDropIn from '@pxpio/web-components-sdk/src/checkoutDropIn/CheckoutDropIn';\nimport BaseSdkException from '@pxpio/web-components-sdk/src/types/sdkExceptions/BaseSdkException';\n\nconst checkoutDropIn = CheckoutDropIn.initialize({\n  // ... other config\n  onError: (error: BaseSdkException) => {\n    console.error('Payment failed:', error.message);\n    console.error('Error code:', error.code);\n    \n    // Handle the error\n    showErrorMessage(error.message);\n  }\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error-object-structure","__idx":3},"children":["Error object structure"]},{"$$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":{"align":"left","data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Human-readable error message describing what went wrong."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ErrorCode"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["SDK error code in format ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK####"]}," (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'SDK1114'"]}," for authentication failed, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'SDK0500'"]}," for network error). Use this for programmatic error handling."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Exception class name (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'CheckoutDropInCardPaymentFailedSdkException'"]},")."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"error-categories","__idx":4},"children":["Error categories"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Errors are organised into four main categories based on their source and nature."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configuration-errors","__idx":5},"children":["Configuration errors"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Errors that occur during SDK initialisation or component rendering due to invalid configuration."]},{"$$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":{"align":"left","data-label":"Exception"},"children":["Exception"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Error code"},"children":["Error code"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Solution"},"children":["Solution"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckoutDropInConfigNotFoundSdkException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1100"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Drop-in configuration not found or invalid."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Verify initialisation parameters."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckoutDropInFailedToRenderCardSdkException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1101"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Failed to render card component."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Check session configuration for card support."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckoutDropInFailedToRenderPaypalSdkException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1102"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Failed to render PayPal button."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Verify PayPal is enabled in session."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckoutDropInFailedToRenderGooglePaySdkException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1103"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Failed to render Google Pay button."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Check Google Pay configuration."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckoutDropInFailedToRenderApplePaySdkException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1104"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Failed to render Apple Pay button."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Verify Apple Pay domain registration."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckoutDropInInvalidPaypalEntryTypeSdkException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1120"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["PayPal only supports Ecom entry type."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Change ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["entryType"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'Ecom'"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example handling:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"onError: (error: BaseSdkException) => {\n  if (error.name.includes('FailedToRender')) {\n    console.error('Payment method rendering failed:', error.message);\n    \n    // Log to monitoring\n    logger.error('Rendering error', {\n      exception: error.name,\n      errorCode: error.code,\n      message: error.message\n    });\n    \n    // Show generic error to user\n    showErrorMessage(\n      'We\\'re having trouble loading payment options. Please refresh the page or contact support.'\n    );\n  }\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"payment-errors","__idx":6},"children":["Payment errors"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Errors that occur during payment processing for specific payment methods."]},{"$$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":{"align":"left","data-label":"Exception"},"children":["Exception"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Error code"},"children":["Error code"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"User action"},"children":["User action"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckoutDropInCardPaymentFailedSdkException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1116"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Card payment failed (see detection patterns below)."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["See card-specific patterns below."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckoutDropInPaypalPaymentFailedSdkException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1117"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["PayPal transaction failed."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Try again or use different method."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckoutDropInGooglePayPaymentFailedSdkException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1118"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Google Pay transaction failed."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Try again or use different method."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckoutDropInApplePayPaymentFailedSdkException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1119"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Apple Pay transaction failed."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Try again or use different method."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"card-specific-error-detection-patterns","__idx":7},"children":["Card-specific error detection patterns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Since card errors come from providers with varying message formats, use message-based detection:"]},{"$$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":{"align":"left","data-label":"Scenario"},"children":["Scenario"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Detection approach"},"children":["Detection approach"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"User action"},"children":["User action"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Card declined"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.message"]}," contains \"declined\""]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Try a different card or contact bank."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Insufficient funds"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.message"]}," contains \"insufficient funds\""]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Use a different payment method."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Expired card"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.message"]}," contains \"expired\""]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Use a different card."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Invalid CVV"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.message"]}," contains \"CVV\" or \"security code\""]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Check security code and retry."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Invalid card number"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.message"]}," contains \"card number\" or \"invalid number\""]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Check card number and retry."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Invalid expiry"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.message"]}," contains \"expiry\" or \"expiration\""]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Check expiry date and retry."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example handling:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"onError: (error: BaseSdkException) => {\n  // Card-specific errors (message-based detection)\n  if (error.code === 'SDK1116') {\n    // Card payment failed - check message for specifics\n    if (error.message.toLowerCase().includes('declined')) {\n      showErrorMessage(\n        'Your card was declined. Please try a different card or contact your bank for more information.'\n      );\n      offerAlternativePaymentMethods();\n    } else if (error.message.toLowerCase().includes('insufficient funds')) {\n      showErrorMessage(\n        'Insufficient funds. Please use a different payment method.'\n      );\n      offerAlternativePaymentMethods();\n    } else if (error.message.toLowerCase().includes('expired')) {\n      showErrorMessage(\n        'This card has expired. Please use a different card.'\n      );\n    } else if (error.message.toLowerCase().includes('cvv') || \n               error.message.toLowerCase().includes('security code')) {\n      showErrorMessage(\n        'Invalid security code. Please check the CVV on the back of your card and try again.'\n      );\n      // Keep same payment method selected for retry\n    } else {\n      showErrorMessage(\n        'Card payment failed. Please check your details and try again.'\n      );\n    }\n  }\n  \n  // Wallet payment errors\n  else if (error.code === 'SDK1117') {\n    showErrorMessage(\n      'PayPal payment failed. Please try again or use a different payment method.'\n    );\n    offerAlternativePaymentMethods();\n  } else if (error.code === 'SDK1118') {\n    showErrorMessage(\n      'Google Pay payment failed. Please try again or use a different payment method.'\n    );\n    offerAlternativePaymentMethods();\n  } else if (error.code === 'SDK1119') {\n    showErrorMessage(\n      'Apple Pay payment failed. Please try again or use a different payment method.'\n    );\n    offerAlternativePaymentMethods();\n  }\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"authentication-errors","__idx":8},"children":["Authentication errors"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Errors related to 3D Secure (3DS) authentication for card payments."]},{"$$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":{"align":"left","data-label":"Exception"},"children":["Exception"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Error code"},"children":["Error code"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"User action"},"children":["User action"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckoutDropInAuthenticationFailedSdkException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1114"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["3DS authentication failed."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Try again or use different card."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note"]},": Authentication timeout and cancellation are also reported through ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.message"]},". Check the message content for these scenarios:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Timeout: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.message"]}," contains \"timeout\""]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Cancelled: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.message"]}," contains \"cancel\""]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example handling:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"onError: (error: BaseSdkException) => {\n  if (error.code === 'SDK1114' || error.message.toLowerCase().includes('authentication')) {\n    if (error.message.toLowerCase().includes('timeout')) {\n      showErrorMessage(\n        '3D Secure authentication timed out. Please check your internet connection and try again.'\n      );\n      \n      // Offer retry\n      showRetryButton();\n    } else if (error.message.toLowerCase().includes('cancel')) {\n      showErrorMessage(\n        'Authentication was cancelled. Please try again to complete your payment.'\n      );\n      \n      // Don't show error as prominently - user intentionally cancelled\n      showInfoMessage('You can retry your payment when ready.');\n    } else {\n      showErrorMessage(\n        '3D Secure authentication failed. Please try again or use a different card.'\n      );\n      \n      // Track authentication failures\n      analytics.track('3ds_authentication_failed', {\n        timestamp: Date.now()\n      });\n    }\n  }\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"authorisation-errors","__idx":9},"children":["Authorisation errors"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Errors that occur during payment authorisation."]},{"$$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":{"align":"left","data-label":"Exception"},"children":["Exception"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Error code"},"children":["Error code"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Solution"},"children":["Solution"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckoutDropInAuthorisationFailedSdkException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1115"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Payment authorisation failed."]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Check transaction details and retry."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"system-errors","__idx":10},"children":["System errors"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Errors related to network connectivity, session state, and system availability."]},{"$$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":{"align":"left","data-label":"Error code"},"children":["Error code"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Detection approach"},"children":["Detection approach"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"User action"},"children":["User action"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK0500"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Network error code"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Check connection and retry."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Message-based"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.message"]}," contains \"session\" or \"expired\""]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Refresh page and retry."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Message-based"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.message"]}," contains \"timeout\""]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Check connection and retry."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Message-based"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.message"]}," contains \"unavailable\" or \"service\""]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Try again later."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK01XX"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK02XX"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Configuration error codes (01XX = SDK, 02XX = Component)"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Contact support."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example handling:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"onError: (error: BaseSdkException) => {\n  // Network and session errors\n  if (error.code === 'SDK0500') {\n    showErrorMessage(\n      'Network connection issue. Please check your internet connection and try again.'\n    );\n    showRetryButton();\n  } else if (error.message.toLowerCase().includes('session') || \n             error.message.toLowerCase().includes('expired')) {\n    showErrorMessage(\n      'Your payment session has expired. Please refresh the page and try again.'\n    );\n    showRefreshButton();\n  } else if (error.message.toLowerCase().includes('timeout')) {\n    showErrorMessage(\n      'Request timed out. Please check your connection and try again.'\n    );\n    showRetryButton();\n  } else if (error.message.toLowerCase().includes('unavailable') || \n             error.message.toLowerCase().includes('service')) {\n    showErrorMessage(\n      'Payment service is temporarily unavailable. Please try again in a few minutes.'\n    );\n  } else if (error.code && (error.code.startsWith('SDK01') || \n                                  error.code.startsWith('SDK02'))) {\n    showErrorMessage(\n      'Payment configuration error. Please contact support for assistance.'\n    );\n    \n    // Log critical error\n    logger.critical('Configuration error', {\n      errorCode: error.code,\n      message: error.message\n    });\n  }\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"error-handling-patterns","__idx":11},"children":["Error handling patterns"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"basic-error-handling","__idx":12},"children":["Basic error handling"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The simplest error handling pattern shows user-friendly messages and logs errors for debugging."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"import BaseSdkException from '@pxpio/web-components-sdk/src/types/sdkExceptions/BaseSdkException';\n\nconst checkoutDropIn = CheckoutDropIn.initialize({\n  // ... other config\n  onError: (error: BaseSdkException) => {\n    // Log error for debugging\n    console.error('Payment error:', {\n      errorCode: error.code,\n      message: error.message,\n      name: error.name\n    });\n    \n    // Show user-friendly message\n    showErrorNotification(error.message || 'Payment failed. Please try again.');\n    \n    // Re-enable payment button\n    enablePaymentButton();\n  }\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"advanced-error-handling-with-recovery","__idx":13},"children":["Advanced error handling with recovery"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Implement retry logic, alternative payment methods, and error categorisation."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"let retryCount = 0;\nconst MAX_RETRIES = 3;\n\nconst checkoutDropIn = CheckoutDropIn.initialize({\n  // ... other config\n  onError: (error: BaseSdkException) => {\n    // Log to monitoring service\n    logErrorToMonitoring({\n      category: 'payment_error',\n      errorCode: error.code,\n      message: error.message,\n      exception: error.name,\n      userAgent: navigator.userAgent,\n      timestamp: Date.now()\n    });\n    \n    // Track analytics\n    analytics.track('payment_failed', {\n      errorCode: error.code,\n      errorMessage: error.message,\n      retryCount: retryCount\n    });\n    \n    // Check if error is retryable (network issues, timeouts)\n    const isNetworkError = error.code === 'SDK0500';\n    const isTimeout = error.message.toLowerCase().includes('timeout');\n    const isRetryable = isNetworkError || isTimeout || \n                       error.message.toLowerCase().includes('unavailable');\n    \n    // Implement retry logic\n    if (isRetryable && retryCount < MAX_RETRIES) {\n      retryCount++;\n      \n      showWarningMessage(\n        `Connection issue (attempt ${retryCount}/${MAX_RETRIES}). ` +\n        'Please try your payment again.',\n        {\n          action: 'Retry Payment',\n          onAction: () => {\n            // Retry the payment\n            document.getElementById('submit-btn').click();\n          }\n        }\n      );\n      return;\n    }\n    \n    // Reset retry count for non-retryable errors\n    retryCount = 0;\n    \n    // Show user-friendly error messages based on error code and message\n    let userMessage = 'Payment failed. Please try again or contact support.';\n    \n    // Check by SDK error code\n    if (error.code === 'SDK0500') {\n      userMessage = 'Network connection issue. Please check your internet connection and try again.';\n    } else if (error.code === 'SDK1114') {\n      userMessage = '3D Secure authentication failed. Please try again or use a different card.';\n    } else if (error.code === 'SDK1115') {\n      userMessage = 'Payment authorisation failed. Please check your details and try again.';\n    } else if (error.code === 'SDK1116') {\n      // Card payment failed - check message for specifics\n      if (error.message.toLowerCase().includes('declined')) {\n        userMessage = 'Your card was declined. Please try a different card or contact your bank.';\n      } else if (error.message.toLowerCase().includes('insufficient funds')) {\n        userMessage = 'Insufficient funds. Please use a different payment method.';\n      } else if (error.message.toLowerCase().includes('expired')) {\n        userMessage = 'This card has expired. Please use a different card.';\n      } else if (error.message.toLowerCase().includes('cvv') || \n                 error.message.toLowerCase().includes('security code')) {\n        userMessage = 'Invalid security code. Please check the CVV on your card and try again.';\n      } else if (error.message.toLowerCase().includes('card number')) {\n        userMessage = 'Invalid card number. Please check and try again.';\n      } else if (error.message.toLowerCase().includes('expiry') || \n                 error.message.toLowerCase().includes('expiration')) {\n        userMessage = 'Invalid expiry date. Please check and try again.';\n      } else {\n        userMessage = 'Card payment failed. Please check your details and try again.';\n      }\n    } else if (error.code === 'SDK1117') {\n      userMessage = 'PayPal payment failed. Please try again or use a different payment method.';\n    } else if (error.code === 'SDK1118') {\n      userMessage = 'Google Pay payment failed. Please try again or use a different payment method.';\n    } else if (error.code === 'SDK1119') {\n      userMessage = 'Apple Pay payment failed. Please try again or use a different payment method.';\n    }\n    // Check by message content for scenarios without specific codes\n    else if (error.message.toLowerCase().includes('timeout')) {\n      userMessage = 'Request timed out. Please check your internet connection and try again.';\n    } else if (error.message.toLowerCase().includes('session') || \n               error.message.toLowerCase().includes('expired')) {\n      userMessage = 'Your payment session has expired. Please refresh the page.';\n    } else if (error.message.toLowerCase().includes('unavailable')) {\n      userMessage = 'Payment service temporarily unavailable. Please try again in a few minutes.';\n    } else if (error.code && (error.code.startsWith('SDK01') || \n                                    error.code.startsWith('SDK02'))) {\n      userMessage = 'Payment configuration error. Please contact support.';\n    } else if (error.message) {\n      userMessage = error.message;\n    }\n    \n    showErrorMessage(userMessage);\n    \n    // Offer alternative payment methods for certain errors\n    const shouldOfferAlternatives = \n      error.code === 'SDK1116' || // Card payment failed\n      error.code === 'SDK1117' || // PayPal failed\n      error.code === 'SDK1118' || // Google Pay failed\n      error.code === 'SDK1119' || // Apple Pay failed\n      error.message.toLowerCase().includes('declined') ||\n      error.message.toLowerCase().includes('insufficient funds');\n    \n    if (shouldOfferAlternatives) {\n      showAlternativePaymentMethods();\n    }\n    \n    // Show retry button for network/timeout errors\n    const shouldShowRetry = \n      error.code === 'SDK0500' ||\n      error.message.toLowerCase().includes('timeout') ||\n      error.message.toLowerCase().includes('unavailable');\n    \n    if (shouldShowRetry) {\n      showRetryButton();\n    }\n    \n    // Show refresh button for session errors\n    if (error.message.toLowerCase().includes('session') || \n        error.message.toLowerCase().includes('expired')) {\n      showRefreshButton();\n    }\n    \n    // Re-enable payment form\n    enablePaymentForm();\n  }\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error-logging-to-monitoring-service","__idx":14},"children":["Error logging to monitoring service"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Integrate with monitoring services like Sentry, Datadog, or custom logging."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"import * as Sentry from '@sentry/browser';\n\nconst checkoutDropIn = CheckoutDropIn.initialize({\n  // ... other config\n  onError: (error: BaseSdkException) => {\n    // Log to Sentry\n    Sentry.captureException(error, {\n      tags: {\n        category: 'payment_error',\n        errorCode: error.code,\n        exceptionType: error.name\n      },\n      contexts: {\n        payment: {\n          errorCode: error.code,\n          message: error.message\n        }\n      }\n    });\n    \n    // Log to custom monitoring service\n    fetch('/api/log-error', {\n      method: 'POST',\n      headers: { 'Content-Type': 'application/json' },\n      body: JSON.stringify({\n        type: 'payment_error',\n        errorCode: error.code,\n        message: error.message,\n        exception: error.name,\n        url: window.location.href,\n        userAgent: navigator.userAgent,\n        timestamp: new Date().toISOString()\n      })\n    }).catch(err => {\n      // Silently fail - don't disrupt user experience\n      console.error('Failed to log error:', err);\n    });\n    \n    // Show error to user\n    showErrorMessage(error.message);\n  }\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"complete-error-handling-example","__idx":15},"children":["Complete error handling example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's a production-ready error handling implementation:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"import CheckoutDropIn from '@pxpio/web-components-sdk/src/checkoutDropIn/CheckoutDropIn';\nimport BaseSdkException from '@pxpio/web-components-sdk/src/types/sdkExceptions/BaseSdkException';\nimport * as Sentry from '@sentry/browser';\n\nlet retryCount = 0;\nconst MAX_RETRIES = 3;\n\nconst checkoutDropIn = CheckoutDropIn.initialize({\n  // ... other config\n  onError: (error: BaseSdkException) => {\n    // 1. Log error for debugging\n    console.error('Payment error:', {\n      errorCode: error.code,\n      message: error.message,\n      name: error.name\n    });\n    \n    // 2. Send to monitoring service\n    Sentry.captureException(error, {\n      tags: {\n        category: 'payment_error',\n        errorCode: error.code\n      },\n      contexts: {\n        payment: {\n          errorCode: error.code,\n          message: error.message,\n          retryCount: retryCount\n        }\n      }\n    });\n    \n    // 3. Track analytics\n    analytics.track('payment_failed', {\n      errorCode: error.code,\n      errorMessage: error.message,\n      retryCount: retryCount,\n      timestamp: Date.now()\n    });\n    \n    // 4. Clear any loading state\n    clearTimeout(window.loadingTimeout);\n    hideLoadingOverlay();\n    \n    // 5. Implement retry logic for transient errors\n    const isNetworkError = error.code === 'SDK0500';\n    const isTimeout = error.message.toLowerCase().includes('timeout');\n    const isUnavailable = error.message.toLowerCase().includes('unavailable');\n    \n    if ((isNetworkError || isTimeout || isUnavailable) && retryCount < MAX_RETRIES) {\n      retryCount++;\n      \n      showNotification({\n        type: 'warning',\n        message: `Connection issue (attempt ${retryCount}/${MAX_RETRIES}). Please try again.`,\n        actions: [\n          {\n            label: 'Retry payment',\n            onClick: () => retryPayment()\n          }\n        ]\n      });\n      return;\n    }\n    \n    // Reset retry count\n    retryCount = 0;\n    \n    // 6. Show user-friendly error messages\n    let userMessage = 'Payment failed. Please try again or contact support.';\n    \n    // Check by SDK error code\n    if (error.code === 'SDK0500') {\n      userMessage = 'Network error. Please check your connection and try again.';\n    } else if (error.code === 'SDK1114') {\n      userMessage = '3D Secure authentication failed. Please try again.';\n    } else if (error.code === 'SDK1115') {\n      userMessage = 'Payment authorisation failed. Please check your details and try again.';\n    } else if (error.code === 'SDK1116') {\n      // Card payment failed - check message\n      if (error.message.toLowerCase().includes('declined')) {\n        userMessage = 'Your card was declined. Please try a different card or contact your bank.';\n      } else if (error.message.toLowerCase().includes('insufficient funds')) {\n        userMessage = 'Insufficient funds. Please use a different payment method.';\n      } else if (error.message.toLowerCase().includes('expired')) {\n        userMessage = 'This card has expired. Please use a different card.';\n      } else if (error.message.toLowerCase().includes('cvv')) {\n        userMessage = 'Invalid security code. Please check and try again.';\n      } else {\n        userMessage = 'Card payment failed. Please check your details and try again.';\n      }\n    } else if (error.code === 'SDK1117') {\n      userMessage = 'PayPal payment failed. Please try again or use a different method.';\n    } else if (error.code === 'SDK1118') {\n      userMessage = 'Google Pay payment failed. Please try again or use a different method.';\n    } else if (error.code === 'SDK1119') {\n      userMessage = 'Apple Pay payment failed. Please try again or use a different method.';\n    } else if (error.message.toLowerCase().includes('session') || \n               error.message.toLowerCase().includes('expired')) {\n      userMessage = 'Session expired. Please refresh the page.';\n    } else if (error.code && (error.code.startsWith('SDK01') || \n                                    error.code.startsWith('SDK02'))) {\n      userMessage = 'Configuration error. Please contact support.';\n    } else if (error.message) {\n      userMessage = error.message;\n    }\n    \n    // 7. Show error to user\n    showNotification({\n      type: 'error',\n      title: 'Payment failed',\n      message: userMessage,\n      duration: 8000\n    });\n    \n    // 8. Offer recovery options\n    const shouldOfferAlternatives = \n      error.code === 'SDK1116' || \n      error.code === 'SDK1117' || \n      error.code === 'SDK1118' || \n      error.code === 'SDK1119' ||\n      error.message.toLowerCase().includes('declined') ||\n      error.message.toLowerCase().includes('insufficient funds');\n    \n    if (shouldOfferAlternatives) {\n      showAlternativePaymentMethods();\n    }\n    \n    const shouldShowRetry = \n      error.code === 'SDK0500' ||\n      error.message.toLowerCase().includes('timeout');\n    \n    if (shouldShowRetry) {\n      showRetryButton();\n    }\n    \n    if (error.message.toLowerCase().includes('session') || \n        error.message.toLowerCase().includes('expired')) {\n      showRefreshButton();\n    }\n    \n    // 9. Re-enable UI\n    enablePaymentForm();\n    enableSubmitButton();\n  }\n});\n\n// Helper functions\nfunction hideLoadingOverlay() {\n  document.getElementById('loading-overlay').style.display = 'none';\n}\n\nfunction enablePaymentForm() {\n  const formElements = document.querySelectorAll('#payment-form input, #payment-form button');\n  formElements.forEach(element => {\n    element.disabled = false;\n  });\n}\n\nfunction enableSubmitButton() {\n  const submitBtn = document.getElementById('submit-btn');\n  if (submitBtn) {\n    submitBtn.disabled = false;\n    submitBtn.textContent = 'Try Again';\n  }\n}\n\nfunction showAlternativePaymentMethods() {\n  // Show UI to let user choose different payment method\n  document.getElementById('alternative-methods').style.display = 'block';\n}\n\nfunction showRetryButton() {\n  // Show retry button\n  const retryBtn = document.createElement('button');\n  retryBtn.textContent = 'Retry Payment';\n  retryBtn.onclick = retryPayment;\n  document.getElementById('error-actions').appendChild(retryBtn);\n}\n\nfunction retryPayment() {\n  // Re-submit the payment\n  document.getElementById('submit-btn').click();\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For specific error codes and exceptions related to individual payment methods, see the payment method documentation: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/drop-in/web/cards"},"children":["Card"]},", ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/drop-in/web/paypal"},"children":["PayPal"]},", ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/drop-in/web/apple-pay"},"children":["Apple Pay"]},", ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/drop-in/web/google-pay"},"children":["Google Pay"]},"."]}]}]},"headings":[{"value":"Error handling","id":"error-handling","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Error callback","id":"error-callback","depth":2},{"value":"Error object structure","id":"error-object-structure","depth":3},{"value":"Error categories","id":"error-categories","depth":2},{"value":"Configuration errors","id":"configuration-errors","depth":3},{"value":"Payment errors","id":"payment-errors","depth":3},{"value":"Card-specific error detection patterns","id":"card-specific-error-detection-patterns","depth":4},{"value":"Authentication errors","id":"authentication-errors","depth":3},{"value":"Authorisation errors","id":"authorisation-errors","depth":3},{"value":"System errors","id":"system-errors","depth":3},{"value":"Error handling patterns","id":"error-handling-patterns","depth":2},{"value":"Basic error handling","id":"basic-error-handling","depth":3},{"value":"Advanced error handling with recovery","id":"advanced-error-handling-with-recovery","depth":3},{"value":"Error logging to monitoring service","id":"error-logging-to-monitoring-service","depth":3},{"value":"Complete error handling example","id":"complete-error-handling-example","depth":2}],"frontmatter":{"seo":{"title":"Error handling"}},"lastModified":"2026-05-06T10:44:47.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/checkout/drop-in/web/error-handling","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}