stripe error with klarna
-
we recently updated to woocommerce-gateway-stripe 8.7.0 and switched the api. we then activated klarna and this is the reson for this error report. in the log i have following entry:
( [message] => The provided PaymentMethod cannot be attached. To reuse a PaymentMethod, you must attach it to a Customer first. [request_log_url] => xxx [type] => invalid_request_error )
the problem occurs, when we set the (non logged-in) customer to somewhere outside germany (where the shop is located), so sweden for example triggers the error. we deactivated all plugins and switched to a default theme, but the issue persists. all plugins are up-to-date.
could this be the issue?
The page I need help with: [log in to see the link]
-
Hello jnz31,
Thank you for contacting WooCommerce support.
Just to confirm, are you seeing this error in the logs only when a customer is attempting payment from outside Germany, while orders from within Germany work fine?
To help troubleshoot this further, I’d like to gather more details about your setup.
Could you please provide a copy of your System Status Report?
You can find it by navigating to WooCommerce > Status. Select Get system report and then click Copy for support.This information will help me identify the root cause and guide you toward a solution.
Best regards.
more or less correct, it occurs, when we use a different currency than euros..
status report:
WordPress Environment<br><br>WordPress address (URL): https://www.tsatsas.com<br>Site address (URL): https://www.tsatsas.com<br>WC Version: 9.3.3<br>Legacy REST API Package Version: ? 1.0.4<br>Action Scheduler Version: ? 3.8.1<br>Log Directory Writable: ?<br>WP Version: 6.6.2<br>WP Multisite: –<br>WP Memory Limit: 256 MB<br>WP Debug Mode: –<br>WP Cron: ?<br>Language: en_US<br>External object cache: – Server Environment<br><br>Server Info: Apache<br>PHP Version: 8.1.30<br>PHP Post Max Size: 64 MB<br>PHP Time Limit: 50000<br>PHP Max Input Vars: 5000<br>cURL Version: 7.74.0<br>OpenSSL/1.1.1w<br><br>SUHOSIN Installed: –<br>MySQL Version: 5.7.42-log<br>Max Upload Size: 64 MB<br>Default Timezone is UTC: ?<br>fsockopen/cURL: ?<br>SoapClient: ?<br>DOMDocument: ?<br>GZip: ?<br>Multibyte String: ?<br>Remote Post: ?<br>Remote Get: ? Database<br><br>WC Database Version: 9.3.3<br>WC Database Prefix: wpts17_<br>Total Database Size: 166.24MB<br>Database Data Size: 136.30MB<br>Database Index Size: 29.94MB<br>wpts17_woocommerce_sessions: Data: 34.06MB + Index: 4.02MB + Engine InnoDB<br>wpts17_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpts17_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpts17_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wpts17_woocommerce_order_items: Data: 0.11MB + Index: 0.06MB + Engine InnoDB<br>wpts17_woocommerce_order_itemmeta: Data: 1.52MB + Index: 0.73MB + Engine InnoDB<br>wpts17_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wpts17_woocommerce_tax_rate_locations: Data: 0.08MB + Index: 0.11MB + Engine InnoDB<br>wpts17_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wpts17_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpts17_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpts17_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpts17_actionscheduler_actions: Data: 0.28MB + Index: 0.28MB + Engine InnoDB<br>wpts17_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpts17_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpts17_actionscheduler_logs: Data: 0.19MB + Index: 0.17MB + Engine InnoDB<br>wpts17_admin_columns: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpts17_aiowps_audit_log: Data: 10.02MB + Index: 0.28MB + Engine InnoDB<br>wpts17_aiowps_debug_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_aiowps_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_aiowps_global_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_aiowps_logged_in_users: Data: 0.02MB + Index: 0.08MB + Engine InnoDB<br>wpts17_aiowps_login_lockdown: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wpts17_aiowps_message_store: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_aiowps_permanent_block: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpts17_atum_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpts17_atum_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpts17_atum_product_data: Data: 0.14MB + Index: 0.08MB + Engine InnoDB<br>wpts17_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpts17_comments: Data: 0.48MB + Index: 0.45MB + Engine InnoDB<br>wpts17_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpts17_options: Data: 7.09MB + Index: 0.31MB + Engine InnoDB<br>wpts17_pmxi_files: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_pmxi_geocoding: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpts17_pmxi_hash: Data: 0.05MB + Index: 0.00MB + Engine InnoDB<br>wpts17_pmxi_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_pmxi_images: Data: 0.14MB + Index: 0.00MB + Engine InnoDB<br>wpts17_pmxi_imports: Data: 0.05MB + Index: 0.00MB + Engine InnoDB<br>wpts17_pmxi_posts: Data: 0.05MB + Index: 0.00MB + Engine InnoDB<br>wpts17_pmxi_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_postmeta: Data: 36.56MB + Index: 14.06MB + Engine InnoDB<br>wpts17_posts: Data: 25.52MB + Index: 2.38MB + Engine InnoDB<br>wpts17_post_smtp_logmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_post_smtp_logs: Data: 6.52MB + Index: 0.00MB + Engine InnoDB<br>wpts17_redirection_404: Data: 3.02MB + Index: 3.05MB + Engine InnoDB<br>wpts17_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpts17_redirection_items: Data: 0.05MB + Index: 0.09MB + Engine InnoDB<br>wpts17_redirection_logs: Data: 0.20MB + Index: 0.05MB + Engine InnoDB<br>wpts17_sc_delivery_methods: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wpts17_sc_delivery_zones: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpts17_stock_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_termmeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB<br>wpts17_terms: Data: 0.06MB + Index: 0.03MB + Engine InnoDB<br>wpts17_term_relationships: Data: 1.52MB + Index: 0.39MB + Engine InnoDB<br>wpts17_term_taxonomy: Data: 0.06MB + Index: 0.03MB + Engine InnoDB<br>wpts17_usermeta: Data: 1.47MB + Index: 0.72MB + Engine InnoDB<br>wpts17_users: Data: 0.06MB + Index: 0.05MB + Engine InnoDB<br>wpts17_wcpdf_invoice_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_wc_admin_notes: Data: 0.11MB + Index: 0.00MB + Engine InnoDB<br>wpts17_wc_admin_note_actions: Data: 0.08MB + Index: 0.02MB + Engine InnoDB<br>wpts17_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_wc_customer_lookup: Data: 0.09MB + Index: 0.06MB + Engine InnoDB<br>wpts17_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpts17_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB<br>wpts17_wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpts17_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wpts17_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpts17_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpts17_wc_order_product_lookup: Data: 0.09MB + Index: 0.06MB + Engine InnoDB<br>wpts17_wc_order_stats: Data: 0.09MB + Index: 0.08MB + Engine InnoDB<br>wpts17_wc_order_tax_lookup: Data: 0.05MB + Index: 0.03MB + Engine InnoDB<br>wpts17_wc_product_attributes_lookup: Data: 0.23MB + Index: 0.19MB + Engine InnoDB<br>wpts17_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpts17_wc_product_meta_lookup: Data: 0.20MB + Index: 0.41MB + Engine InnoDB<br>wpts17_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpts17_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpts17_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpts17_woocommerce_shipping_table_rates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpts17_yoast_indexable: Data: 4.42MB + Index: 0.39MB + Engine InnoDB<br>wpts17_yoast_indexable_hierarchy: Data: 0.08MB + Index: 0.08MB + Engine InnoDB<br>wpts17_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpts17_yoast_primary_term: Data: 0.06MB + Index: 0.03MB + Engine InnoDB<br>wpts17_yoast_seo_links: Data: 0.17MB + Index: 0.09MB + Engine InnoDB<br>wpts17_yoast_seo_meta: Data: 0.31MB + Index: 0.00MB + Engine InnoDB Post Type Counts<br><br>acf-field: 53<br>acf-field-group: 11<br>anthology: 40<br>attachment: 7323<br>nav_menu_item: 21<br>oembed_cache: 8<br>page: 23<br>post: 24<br>postman_sent_mail: 250<br>product: 710<br>product_variation: 913<br>revision: 3181<br>shop_coupon: 35<br>shop_order: 920<br>shop_order_refund: 83<br>wp_global_styles: 1<br>wp_navigation: 1 Security<br><br>Secure connection (HTTPS): ?<br>Hide errors from visitors: ? Active Plugins (33)<br><br>Advanced Access Manager: by AAM – 6.9.41<br>Advanced Custom Fields PRO: by WP Engine – 6.3.8<br>All In One WP Security: by TeamUpdraft<br>DavidAnderson – 5.3.3<br><br>ATUM Inventory Management for WooCommerce: by Stock Management Labs? – 1.9.40<br>Admin Columns: by AdminColumns.com – 4.7.7<br>Cookie Notice & Compliance for GDPR / CCPA: by Hu-manity.co – 2.4.18<br>Disable Emojis (GDPR friendly): by Ryan Hellyer – 1.7.6<br>Members: by MemberPress – 3.2.10<br>Pepperjam Pixel: by Pepperjam – 1.1.1<br>Post SMTP: by Post SMTP – 2.9.9<br>WordPress Post Type Archive Links: by Stephen Harris – 1.3.1<br>Radio Buttons for Taxonomies: by helgatheviking – 2.4.7<br>Redirection: by John Godley – 5.5.0<br>Sendcloud | Smart Shipping Service: by Sendcloud B.V. – 2.4.5<br>Show Current Template: by JOTAKI Taisuke – 0.5.2<br>Simple Custom Post Order: by Colorlib – 2.5.8<br>TSATSAS Blocks: by mrahmadawais<br>maedahbatool<br>Jens Buss – 1.0.0<br><br>Tsatsas Site Plugin: by Jens Buss – 1.0<br>UpdraftPlus - Backup/Restore: by TeamUpdraft<br>DavidAnderson – 1.24.6<br><br>WooCommerce.com Update Manager: by Automattic – 1.0.3<br>WooCommerce Stripe Gateway: by WooCommerce – 8.7.0<br>Google Analytics for WooCommerce: by WooCommerce – 2.1.7<br>WooCommerce Legacy REST API: by WooCommerce – 1.0.4<br>WooCommerce PayPal Payments: by WooCommerce – 2.9.2<br>PDF Invoices & Packing Slips for WooCommerce: by WP Overnight – 3.8.8<br>WooCommerce Price Based on Country: by Oscar Gare – 3.4.10<br>WooCommerce Table Rate Shipping: by WooCommerce – 3.3.1<br>WooCommerce: by Automattic – 9.3.3<br>Yoast SEO: by Team Yoast – 23.6<br>WP All Import Pro: by Soflyy – 4.9.0<br>Perfect Images (Optimize, Rebuild, Replace, Thumbnails, Retina): by Jordy Meow – 6.6.4<br>WP All Import - ACF Add-On: by Soflyy – 3.3.8<br>WP All Import - WooCommerce Import Add-On Pro: by Soflyy – 4.0.0 Inactive Plugins (0) Must Use Plugins (1)<br><br>simba-tfa-encryption-key.php: by – Settings<br><br>Legacy API Enabled: ?<br>Force SSL: –<br>Currency: EUR (EUR)<br>Currency Position: right_space<br>Thousand Separator: .<br>Decimal Separator: ,<br>Number of Decimals: 2<br>Taxonomies: Product Types: external (external)<br>grouped (grouped)<br>simple (simple)<br>variable (variable)<br><br>Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)<br>exclude-from-search (exclude-from-search)<br>featured (featured)<br>outofstock (outofstock)<br>rated-1 (rated-1)<br>rated-2 (rated-2)<br>rated-3 (rated-3)<br>rated-4 (rated-4)<br>rated-5 (rated-5)<br><br>Connected to WooCommerce.com: ?<br>Enforce Approved Product Download Directories: –<br>HPOS feature enabled: –<br>Order datastore: WC_Order_Data_Store_CPT<br>HPOS data sync enabled: – Logging<br><br>Enabled: ?<br>Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2<br>Retention period: 30 days<br>Level threshold: –<br>Log directory size: 22 MB WC Pages<br><br>Shop base: #4 - /store/<br>Cart: #5 - /cart/ - Contains the [woocommerce_cart] shortcode<br>Checkout: #6 - /checkout/ - Contains the [woocommerce_checkout] shortcode<br>My account: #7 - /account/<br>Terms and conditions: #96 - /terms-and-conditions/ Theme<br><br>Name: blank<br>Version: 1.0.0<br>Author URL: https://underscores.me/<br>Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme<br>WooCommerce Support: ? Templates<br><br>Overrides: blank/woocommerce/cart/cart-totals.php<br>blank/woocommerce/cart/cart.php<br>blank/woocommerce/checkout/form-coupon.php<br>blank/woocommerce/content-single-product.php<br>blank/woocommerce/emails/customer-completed-order.php<br>blank/woocommerce/emails/customer-invoice.php<br>blank/woocommerce/emails/customer-new-account.php<br>blank/woocommerce/emails/customer-note.php<br>blank/woocommerce/emails/customer-on-hold-order.php<br>blank/woocommerce/emails/customer-processing-order.php<br>blank/woocommerce/emails/customer-refunded-order.php<br>blank/woocommerce/emails/customer-reset-password.php<br>blank/woocommerce/emails/email-footer.php<br>blank/woocommerce/emails/email-order-details.php<br>blank/woocommerce/emails/email-order-items.php<br>blank/woocommerce/emails/email-styles.php<br>blank/woocommerce/global/form-login.php<br>blank/woocommerce/myaccount/form-edit-account.php<br>blank/woocommerce/myaccount/form-login.php<br>blank/woocommerce/myaccount/form-lost-password.php<br>blank/woocommerce/myaccount/form-reset-password.php<br>blank/woocommerce/single-product/add-to-cart/simple.php<br>blank/woocommerce/single-product/add-to-cart/variable.php<br>blank/woocommerce/single-product/add-to-cart/variation.php<br>blank/woocommerce/single-product/product-image.php Geolocation debug info<br><br>Default customer location: geolocation<br>MaxMind GeoIP database: ?<br>MaxMind GeoIP license: ?<br>MM_COUNTRY_CODE: ?<br>GEOIP_COUNTRY_CODE: ?<br>HTTP_CF_IPCOUNTRY: ?<br>HTTP_X_COUNTRY_CODE: ?<br>HTTP_X_REAL_IP: ?<br>HTTP_X_FORWARDED_FOR: ?<br>REMOTE_ADDR: 88.217.26.60<br>Real external IP: 2001:a61:3093:7d02:f441:8dec:a327:3ca2<br>WCPBC_USE_REMOTE_ADDR: –<br>Geolocation Test: Runing… PBC Settings<br><br>Version: 3.4.10<br>Base location: DE:DE-HE<br>Base currency: EUR<br>Price Based On: shipping<br>Shipping: ?<br>Test mode: –<br>Test country: –<br>Load products price in background: –<br>Prices entered with tax: ?<br>Calculate tax based on: shipping<br>Display prices in the shop: incl Zone Pricing United States<br><br>zone_id: united-states<br>enabled: yes<br>name: United States<br>countries: US | VI<br>currency: USD<br>exchange_rate: 1<br>auto_exchange_rate: no<br>disable_tax_adjustment: yes<br>order: 9999 WooCommerce PayPal Payments<br><br>Onboarded: ?<br>Shop country code: DE<br>WooCommerce currency supported: ?<br>Advanced Card Processing available in country: ?<br>Pay Later messaging available in country: ?<br>Webhook status: ?<br>PayPal Vault enabled: –<br>ACDC Vault enabled: –<br>Logging enabled: –<br>Reference Transactions: –<br>Used PayPal Checkout plugin: –<br>Subscriptions Mode: Disabled<br>PayPal Shipping Callback: –<br>Apple Pay: –<br>Google Pay: –<br>Fastlane: – Admin<br><br>Enabled Features: activity-panels<br>analytics<br>product-block-editor<br>coupons<br>core-profiler<br>customize-store<br>customer-effort-score-tracks<br>import-products-task<br>experimental-fashion-sample-products<br>shipping-smart-defaults<br>shipping-setting-tour<br>homescreen<br>marketing<br>mobile-app-banner<br>navigation<br>onboarding<br>onboarding-tasks<br>pattern-toolkit-full-composability<br>product-custom-fields<br>remote-inbox-notifications<br>remote-free-extensions<br>payment-gateway-suggestions<br>printful<br>shipping-label-banner<br>subscriptions<br>store-alerts<br>transient-notices<br>woo-mobile-welcome<br>wc-pay-promotion<br>wc-pay-welcome-page<br>launch-your-store<br><br>Disabled Features: experimental-blocks<br>minified-js<br>product-pre-publish-modal<br>settings<br>async-product-editor-category-field<br>product-editor-template-system<br>blueprint<br>reactify-classic-payments-settings<br><br>Daily Cron: ? Next scheduled: 2024-10-15 18:10:28 +02:00<br>Options: ?<br>Notes: 212<br>Onboarding: completed Action Scheduler<br><br>Complete: 732<br>Oldest: 2024-09-14 15:43:14 +0200<br>Newest: 2024-10-15 02:03:30 +0200<br><br>Failed: 4<br>Oldest: 2022-03-18 16:03:58 +0100<br>Newest: 2023-08-31 16:23:45 +0200<br><br>Pending: 5<br>Oldest: 2024-10-15 17:43:43 +0200<br>Newest: 2024-11-06 16:43:36 +0100 Status report information<br><br>Generated at: 2024-10-15 09:14:19 +02:00<br>
HI @jnz31 ,
Thanks for sending the system status report, it gives us a clear picture. Given your setup and the provided information, here’s what stands out:
- WooCommerce and Stripe Plugin Versions: Both appear to be up-to-date, so compatibility issues due to version mismatch can likely be ruled out.
- Multicurrency Setup: The WooCommerce Price Based on Country plugin is active, which suggests your store is set up to handle multiple currencies. This could be a key area since the issue occurs with non-Euro currencies.
- Geolocation: Your store uses geolocation to determine customer location. Potential misconfiguration or issues with currency-switching logic tied to geolocation might be contributing factors to the payment method attachment error.
- Stripe’s Customer Object Requirement: The error message indicates that the Stripe gateway requires a Customer object for payment methods to work. This process might be failing when the currency is anything other than Euros, possibly due to a misconfiguration in multi-currency or Stripe settings.
- WooCommerce Setup: The settings are configured for Euros and tax-inclusive prices. If there’s a misconfiguration in how taxes or prices are handled for other currencies, this could affect Stripe’s payment processing.
To proceed with troubleshooting kindly note the following:
- Revisit the settings for the WooCommerce Price Based on Country plugin to ensure that it’s properly configured for handling multiple currencies, including how it interacts with Stripe. Any misconfiguration here could help with the problem you’re experiencing.
- Double-check both the WooCommerce and Stripe settings to make sure that multi-currency payments are correctly set up and that there aren’t any restrictions or misconfigurations causing the Stripe API to reject the payment method.
- Since the rest of your environment seems typical and the issue persists across themes and with all other plugins deactivated, the focus should remain on the Stripe gateway and multi-currency settings.
If the issue continues, consider reaching out to Stripe support with specific log entries from the affected transactions for more targeted assistance.
- You must be logged in to reply to this topic.