#Suren
1 messages · Page 1 of 1 (latest)
I'd like update subscription or create subscription through card but when i try it it not working
I'd like update subscription or create subscription through card
You already have a card PaymentMethod saved in Stripe that you want to use for the subscription? Or you want to ask the customer to entier their card details?
Yes customer already have saved card and I provided that id when customer trying create or update subscription but it returned client_secret id
Can you share the request ID where you saw that issue?
Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Yes I can, of course
sub_1MJCVnBfTh1Z0SMkh5S8GDuo
this is last subscription id when i try update subscription
via payment method
So I guess this is the request ID: https://dashboard.stripe.com/test/logs/req_yJayYCPmm5mDcB
It seems that it worked, now the default payment method for that subscription is pm_1MFCHgBfTh1Z0SMkSbgV5AkH. So what is the issue?
I don't know, now I also try it and it working, but then it not worked
I don't know, maybe I try it with another customer
but then it not worked
Can you share the request ID (req_xxx) where it didn't work?
where I can get req id ?
Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_yNg6ZNASSkcfeT
This request worked. What is the issue?
The subscription was correctly updated to use the new PaymentMethod.
The request succeed, and the default payment method was updated. So next time a new invoice is created, the new payment method will be used.
Why getting a client secret ID an issue?
I simply thinking when I get client secret it should be used with another method
What your API request is doing: changing the default payment method of the subscription, nothing else.
So this has no direct impact on the existing invoice and client secret. Is your goal to pay the existing invoice?
I understand but why don't works webhook ?
What do you mean? What doesn't work?
when I pay with without linked card so webhook works
but it isn't working when I pay with linked card
not working subscription.update
So when you updated the subscription, you were expecting to recieve a webhook event? Which one?
I'd like to get subscription.update! because when I used pay without linked card I recieve a webhook subscription.update
If you update the default payment method of a subscription, you should receive a subscription.updated event.
Can you share an example of a request ID where you didn't recieve that event?
req_EbDsjmYQzKRFhb
This is a request to create a brand new subscripton, so the event you get is customer.subscription.created
can I check immediately if the payment was successfully ?
without webhook ?
but when I paid with payment method status subscription is incomplete
req_wCuY2YtUcbj9YZ
The corresponding PaymentIntent requires confirmation to go through 3DS, that's why the subscription is complete
can I off 3DS ?
No, it's the bank that may require 3DS. So your integration needs to handle this case.
how can I test that case
?
because now I used testing card stripe
is it possible
because actually payment wasn't successful
maybe client_secret needed me for activation 3DS ?
Can we take a step back, and can you explain to me what are you trying to do?
You want to create a brand new subscription? And do you also want to collect the card payments at the same time, or you already had that stored previously?
Note that if you create a subscription with an existing payment method, yes it's possible that 3DS will be required. In this case you need to:
- Retrieve the
latest_invoice.payment_intent.cient_secret - Send that to the frontend
- And call https://stripe.com/docs/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-attached to start the 3DS flow
Yes I'd like used payment with linked card for create or update subscription
but I'd like to know how to testing it ? how attache phone number to ***42424 testing card stripe?
I told you:
- Retrieve the latest_invoice.payment_intent.cient_secret
- Send that to the frontend
- And call https://stripe.com/docs/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-attached to start the 3DS flow
And then you'll see a popup like this for test cards: