#Guilherme Barros - save card

1 messages · Page 1 of 1 (latest)

worthy wolf
#

Hello. One moment

#

Let me ask a colleague. Will get back to you

vague vapor
#

Howdy 👋

#

let me take a look at that issue.

#

That person is describing use of a payment intent, but you're asking about saving without a payment. Can you clarify exactly the flow you are trying to achieve?

#

Note the switch to using setupIntentClientSecret:

const { error } = await initPaymentSheet({
      customerId: customer,
      customerEphemeralKeySecret: ephemeralKey,
      setupIntentClientSecret: setupIntent,
    });
#

If the last comment on the github issue is from you, then that also indicates you are taking a payment.

#

In this scenario, there is no change needed in the client application, you indicate this when creating the payment intent:

const paymentIntent = await stripe.paymentIntents.create({
    amount: 1099,
    currency: 'eur',
    customer: customer.id,
    **setup_future_usage: true,** 
    payment_method_types: ['card'],
  });
wintry aurora
#

I'm already working with setup_future_usage: true, , but I'm trying to achieve what you said first about saving the credit card without a payment

#

let me try that approach and then I get back, it seems that I've tried something similar but not that approach itself

vague vapor
#

Gotcha, sounds good!

#

Yea, setup_future_usage: true is to save the card for future during a payment

#

If you want to save a card without a payment, you should be using a setup intent instead