#vlad-ko_api

1 messages ยท Page 1 of 1 (latest)

verbal bronzeBOT
#

๐Ÿ‘‹ 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.

autumn flicker
#

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

jagged patio
#

hi there

#

that split flow (setup vs payment intent secret) seems correct to me

autumn flicker
#

also on the backend we are creating subscriptions each time

jagged patio
#

what is not working like you expect?

autumn flicker
#

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

jagged patio
#

Can you share some specific subscription/invoice ID where you observe this and consider it unexpected?

autumn flicker
#

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",```
verbal bronzeBOT
autumn flicker
#

someone

stone lion
#

๐Ÿ‘‹ 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.

autumn flicker
#

is this someting new

#

because we were not seeing it before

stone lion
#

No that is not new

#

It has always been the case

autumn flicker
#

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

stone lion
#

A trial Subscription will never be in incomplete or default_incomplete

#

It will always immediately be trialing

autumn flicker
#

no it is not what i was observing previously

stone lion
#

Feel free to provide an example