#birdy247

1 messages ยท Page 1 of 1 (latest)

tawny tokenBOT
haughty forge
nova shore
#

I have been using that

#

But my query is around confrimPayment v confirmCardPayment

#

the form requires an elements object

#

the latter does not

#

So should we only be displaying confirmCardPayment if someone is being asked to confirm their payment

#

and then use confirmPayment if they need to enter new card details?

haughty forge
#

So should we only be displaying confirmCardPayment if someone is being asked to confirm their payment
Yes, and this method will handle further actions if the PaymentMethod requires that, like 3DS auth.
and then use confirmPayment if they need to enter new card details?
You use this method, when the user is submitting new PaymentMethod,

To resume, the confirmPayment method requires Element that contains the PaymentMethod details that the user entered meanwhile the confirmCardPayment requires just the PaymentIntent secret that requires further actions to be done by the customer

nova shore
#

Got it

#

Question

#

Could someone attempt verify a payment and it then gets declined

haughty forge
#

In some cases for an renewal attempt yes, like the bank requires a new 3Ds auth from the card holder

nova shore
#

Ok, so we should be prepared to also ask for new payment details in some cases in the same user flow?

haughty forge
nova shore
#

would we need to do anything with a setupIntent here?

#

Presumably not

#

Even if they use a new card?

#

Or would that be our backend updating the subscription with the new default card?

haughty forge
nova shore
#

But updating the subscription or the customer with the new default payment method

#

Thats up to us?

haughty forge
#

Yes your backend handle these updates

nova shore
#

Can you advise on the best approach for this

#

My thinking is that we set future usage to true on the payment_intent that failed

#

This will then attach the PM to the customer right?

#

And then we can update the subscription with this new PM

rough needle
nova shore
#

Yes, thats what we want

#

context is customer is on a subscription

#

and then a payment later fails

#

Getting this error

#

{
"error": {
"message": "You cannot update a subscription schedule that is currently in the canceled status. It must be in not_started, active status to be updated.",
"type": "invalid_request_error"
}
}

#

But the subscription schedule is fine

#

Am I missing something? Does a subscription schedule end after the last phase is executed?

#

If so, should we update the subscription instead?

#

from stripe:

#

Completing a schedule
Subscription schedules end after the last phase is complete. At this point, the subscription is left in place and is no longer associated with the schedule. If you want to cancel a subscription after the last phase of a schedule completes, you can set end_behavior to cancel.

#

when it says "last phase is complete", does this mean that all iterations within the phase are completed, or just when the last phase is executed?

rough needle
#

looking

rough needle
# nova shore But the subscription schedule is fine

the subscription schedule is using a test clock, in the test clock, it is 2023-01-03, and that schedule used end_behaviour:cancel and presumably all its phases ended before that date in 2023, so it's cancelled now

rough needle
#

or just when the last phase is executed?
that one

nova shore
#

Still confused

#

There were 5 phases on that subscription schedule

rough needle
nova shore
#

Oct, Nov, jan, Feb, Mar

rough needle
#

you got the error(request ID req_SDMVQzD53NwL8L) for schedule sub_sched_1LotT0F9NVx519I1Lc1ZeR0Y which is associated with subscription sub_1LotT0F9NVx519I1Gzx89NmQ

nova shore
#

So I am looking at the wrong subscription?

rough needle
#

maybe

#

you mentioned getting an error and I looked at your account and that error is related to the IDs I posted

nova shore
#

Ok

#

We only had 1 active subscription schedule as far as I could see

#

But with the test clocks etc..

#

I guess I might be wrong

#

Ill try everything again

#

Ok, that works

#

But can I confirm above

#

If we have a subscription schedule set to "cancel" at the end

#

and it has 2 phases, the 2nd phase with 4 iterations

#

When would you expect the subscription schedule to be cancelled?

rough needle
#

at the end of the last iteration of the second phase

nova shore
#

at the end of the 4th iteration of the 2nd phase?

#

Brill

#

Thats great