#jack11sparrow

1 messages · Page 1 of 1 (latest)

drowsy streamBOT
fleet marsh
#

Hello 👋
The Subscription doesn't get created until the checkout is completed

So the creation request won't have a subscription ID

kind path
#

ohkk, so we have somehing like
we create a checkout session from backend then ui uses link from that to show to customer and he pays
after that ui needs access to the subscriptionID
how can we do that

fleet marsh
kind path
#

how will i set subscriptionID at time of checkout session generation if i don't have it at that point of time

fleet marsh
#

You can't really "set" a subscription ID.
As I mentioned above, you won't have access to subscription ID until the completion.

You can retrieve the Checkout session once it has completed and is redirecting to whatever success_url you set

junior vigil
#

@fleet marsh
me and @kind path are working together on the above integration. So, what you are suggesting is make the checkout session, complete the payment, then using the success-url providing the checkout-session id, retrieve the checkout session object and extract values from that?

fleet marsh
#

Correct

#

Because there won't really be a subscription in existence until the checkout session is completed

junior vigil
#

Its the same with one-time payments for payment-intent also, am I correcT?

fleet marsh
#

Correct

junior vigil
#

One final doubt,
{CHECKOUT_SESSION_ID}
so my success url will be sometrhing like
abc.com/?session_id={CHECKOUT_SESSION_ID}
Where I dont replace checkout_session_id value as its automatically replaced by stripe

fleet marsh
#

Yup

junior vigil
#

Thanks hanzo, we will quickly implement it and le you know if we face any problems