irfanengineer
irfanengineer

Reputation: 1300

Payment method save twice in stripe for same customer

I'm using Stripe for subscriptions, and everything is set up and working.

My question is: when a customer subscribes using ACH payment details, Stripe sends a verification code to the ACH bank account. If the customer returns and subscribes again using the same ACH details, Stripe saves the payment details (payment method) twice in the customer account.

In this case, does the customer need to verify the payment method twice?

And if the payment details are already verified once, why are they saved again in the customer account?

I need the payment details to be saved only once in the customer account, with a single verification. I'm using stripe embedded checkout page.

My expectation is pretty clear, I need solution either it is stripe setting or anything need to update in code.

Upvotes: 0

Views: 54

Answers (2)

soma
soma

Reputation: 2219

If the customer already has a saved payment method, then why use Checkout Session to create a new Subscription?

Instead, directly create a new Subscription. This way the customer doesn't need to fill any form, and you can directly reuse the existing payment method of the Customer.

Upvotes: 0

David Verduzco
David Verduzco

Reputation: 332

So stripe does that funny, heres why:

  1. It doesnt make them reverify again
  2. The payment method duplicated cause stripe uses a "fingerprint" to each bank account added and / or card.

SOLUTION

  1. when you have the person enter payment details or similar run a check for get payment method and see if they are the same or if they already have one, you can grab the fingerprint from said payment method and run a check, specifically with us_bank_account.fingerprint
  2. If a matching fingerprint is found, use the existing payment method ID for the new subscription or payment intent
  3. When creating a Checkout session, set it up to save the payment method for future use by the customer.

Here are some resources for you:

https://support.stripe.com/questions/how-can-i-detect-duplicate-cards-or-bank-accounts

https://docs.stripe.com/payments/ach-direct-debit/set-up-payment?payment-ui=stripe-hosted&platform=web

Upvotes: 0

Related Questions