#eddyconer_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1272695999709839401
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
I'm not sure I follow. What specifically are you trying to get?
I am trying to make sure that I get the users authorization when using apple pay before any time of payment is attempted. Like for example when he is upgrading his subscription, i want to make sure that i have his authorization before his subscription gets updated. The problem is that when upgrading his subscription with apple pay as his default payment, it attempts payment automatically and the payment goes through.
Do you have an example request that you're using to update the Subscription for the upgrade?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
My request id is :
req_rZk5mx4rLPJxfp
taking a look now
Yeah, so immediate payment is expected in this case. What are you wanting to do prior to payment?
I want to get his authorization for that payment to happen when he uses apple pay with the apple bottom sheet showing.
So you want him to be able to select an upgrade for the subscription and manually reauthorize the payment method instead of using the default one?
The case is as follows
He adds his payment method using the setup Intent and adds his apple pay which is now his default payment method. Then he selects an upgrade for his subscription and decides to upgrade then when he clicks upgrade, i want to show the apple bottom sheet which shows the amount he will be paying, billing agreement etc. he will then authorize the upgrade
Do you have a screenshot of what you're referring to when you say "apple bottom sheet"?
Yes, it is like this
Do you want to keep the default payment method and just present it again? Or are you wanting to prompt them for an entirely new payment method?
I want to keep the default payment method and then present it again
Got it, okay. Thanks for clarifying. I'm going to see if I can grab someone who knows iOS + React Native a bit better. I'll circle back in a few
Hi @olive ridge This is Jack and I'm also an engineer from Stripe. So basically you don't want Stripe to automaically pay the invoice generated from trial -> full plan, you want the customer to explicitly pay it again using Apple Pay. Am I right?
Yup that is correct!
Got it. Can you try the followings
- listen to
invoice.createdevents - When
invoice.createdhappens, remove itsdefault_payment_methodhttps://docs.stripe.com/api/invoices/update?lang=node#update_invoice-default_payment_method and finalize the invoice - Prompt your customer to pay invoice's paymentIntent with Apple Pay
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I am checking the event logs for invoice.created when the upgrade happens, and the default_payment_method seems null. Would you like the event id? Also i believe the payment.intent.succeeded for the upgrade fires before the draft invoice is created => finalized and paid from looking at the event logs so I believe he is already charged?
Can you share with me the invoice ID?
the invoice id is : in_1Pn2RLP1ske6zh727c9BpRRv
Ok, Although this invoice doesn't have a default_payment_method, the associated customer has invoice_settings.default_payment_method and Stripe will use this to pay the invoice.
Ok so i remove the remove the invoice_settings.default_payment_method in the invoice.created event?
You should remove it beforehand.