#vlad-ko_api
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/1428407514784989305
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
o we have an ios application which using paymentSheet and based on the case - if there is a trial option backend is sending secrets for setup intent, if it is normal payment the BE is sending secrets for payment intent
also on the backend we are creating subscriptions each time
what is not working like you expect?
i think we previously discuesed it with you
so on the ios when he is dismissing the payment sheets - the case where he wants different plan
i am getting on the backend webhook event saying that the invoice is paid
which is strange
Can you share some specific subscription/invoice ID where you observe this and consider it unexpected?
for example
sub_1SIst2COtHrcpcR8XOpHErJR
i will explain what we are doing ion the FE and BE
on FE the user picks spcific product and based on it i am (BE) generating secrets for it - in case of trial -> subscription with trial period and setup intent secrets / in case of normal payment forcing that thing with the latest invoice to get payment intent secrets. Each time the call is made i am creating an incomplete subscription on the backend. but for some reason dismissing the payment collecting screen on IOS kicks a webhook event
example event
"externalPaymentId": "in_1SIrJeCOtHrcpcR8Uj75tpRl",
"externalSubscriptionId": "sub_1SIrJeCOtHrcpcR8PNVJBo19",```
someone
๐ stepping in
Taking a look
So for $0 Subscriptions (like with trials) the Invoice is immediately paid upon the Subscription being created.
This is expected.
You still have access to the generated SetupIntent to collect a PaymentMethod, but it is not contingent on that in terms of the Subscription starting and the Invoice being marked paid.
so basically if i init using the secrets from BE using the paymentsheet in ios it means the invoice is paid and the subscription is moved to trial status from DEFAULT_INCOMPLETE
A trial Subscription will never be in incomplete or default_incomplete
It will always immediately be trialing
no it is not what i was observing previously
Feel free to provide an example