#eddyconer_best-practices

1 messages ¡ Page 1 of 1 (latest)

floral cosmosBOT
#

👋 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.

spark hull
#

I'm not sure I follow. What specifically are you trying to get?

olive ridge
#

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.

spark hull
#

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

olive ridge
#

My request id is :
req_rZk5mx4rLPJxfp

spark hull
#

taking a look now

#

Yeah, so immediate payment is expected in this case. What are you wanting to do prior to payment?

olive ridge
#

I want to get his authorization for that payment to happen when he uses apple pay with the apple bottom sheet showing.

spark hull
#

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?

olive ridge
#

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

spark hull
#

Do you have a screenshot of what you're referring to when you say "apple bottom sheet"?

olive ridge
#

Yes, it is like this

spark hull
#

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?

olive ridge
#

I want to keep the default payment method and then present it again

spark hull
#

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

floral cosmosBOT
crimson schooner
#

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?

olive ridge
#

Yup that is correct!

crimson schooner
#

Got it. Can you try the followings

floral cosmosBOT
olive ridge
#

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?

crimson schooner
#

Can you share with me the invoice ID?

olive ridge
#

the invoice id is : in_1Pn2RLP1ske6zh727c9BpRRv

crimson schooner
#

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.

olive ridge
#

Ok so i remove the remove the invoice_settings.default_payment_method in the invoice.created event?

crimson schooner
#

You should remove it beforehand.