#bilalahmer

1 messages ยท Page 1 of 1 (latest)

final oasisBOT
woven pasture
#

Hi there!

#

What do you mean by "update credit card"? You have an existing payment method that you want to edit? What do you want to edit?

meager shoal
#

Yes, I want to change my cc .

#

The above flow is done by old api.
I just want to switch to setupIntent.
So my question is how can I change my cc card using setupIntent api ?
like in the snap i have maser card but now i want to use visa card so how can I do that with setupIntent ?

#

Do I have to integrate paymentElement first ?

woven pasture
#

SetupIntent is to create a new payment method, not to update an existing payment method.

meager shoal
#

Stripe::Customer.update(@id, { default_source: source }) like this code is being used to update .
So for setupIntent do I need to use someother api or the same one ?

woven pasture
#

I still don't understand your question. Do you want to:

  1. Create a brand new Payment Method for a customer?
  2. Or update some information about an existing Payment Method?
meager shoal
#

Update some information about an existing Payment method.

woven pasture
#

What information do you want to update exactly?

meager shoal
#

credit card number.

woven pasture
#

That's not possible, so actually you want to create a brand new Payment Method for a customer.

meager shoal
#

Oh, ok

woven pasture
meager shoal
#

Ok , Thankyou will have a look.

woven pasture
#

Happy to help ๐Ÿ™‚

meager shoal
#

Just one more question

#

So we cant update credit card number, for that we have to create new payment method through setupIntent right ?

woven pasture
#

Correct

meager shoal
#

So if i create new payment method through setupIntent, will the Stripe::Charge.create api will work ?

#

I will change it with the PaymentIntent in the next step but just for time being can I use Stripe::Charge.create with setupIntent ?

cedar zenith
#

never ever use Charge API

#

@lethal sedge told you that on Friday

cedar zenith
meager shoal
#

Yes, but it is already being used.
My next step is to move to paymentIntent .
I don't want to change to much code at one time.

meager shoal
#

Than how do you recommend I approach it.
Like I want to migrate to setupIntent and paymentIntent ?

#

Like I was thinking to change it to first setupIntent and than later move to paymentIntent .
But know I think I have to change both at the same time in all places right ?

cedar zenith
#

best option is to change to PaymentIntent first really

#

since a PaymentIntent can charge legacy objects like. Card card_xxxx or Source src_xxx so it just works

meager shoal
#

ahan, Thank you ๐Ÿ™‚

#

We have confirmCardPayment method which we use in front-end but do we have the same method for the backend ?

#

I will be charging the client during a cron(backend) job.Which run automatically every Monday.
So how can I confirm it on the backend side ?