#vlad-ko_api

1 messages ¡ Page 1 of 1 (latest)

prime kestrelBOT
#

👋 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/1333757879592943639

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

deft mesa
#

hi there!

#

what is not working exactly?

tribal sparrow
#

cannot figure out how to do the checkout from ios side

#

if i understand correctly i should have clientSecret - which is something test_....fi_....

#

customer id

#

and EphemeralKey?

deft mesa
#

let's take a step back. what do you mean by "checkout from ios side"? are you building a native application on iOS?

tribal sparrow
#

yes

#

native app

deft mesa
#

OK, so you are not using Checkout, but the PaymentSheet

#

at which step in teh documentation you shared you are stuck?

tribal sparrow
#

and currently on the backend i am creating a hosted on stripe side checkout form -> stripeSdk.client.checkout().sessions().create(

#

but i want to have the same thing on ios side too

#

ok, for ios i need PaymentSheet -> this requires

#

4 params

deft mesa
#

stripeSdk.client.checkout().sessions().create(
I really don't understand. where do you see this code in the documentation you shared?

tribal sparrow
#

right?

#

this is currently on my side - sdk + my code ...already have it for the web version

#

i am generating stripe.model.Session

deft mesa
#

I think you are mixing up to different integration: Checkout Session (for the web) and PaymentSheet (for native apps). In your case you should only do PaymentSheet, and not Checkout Session.

tribal sparrow
#

so the whole configurations - subscription details, customer and price creation on the backend should be replicated but should use PaymentSheet instead

#

ok, in that case if i have a session

#

checkout session, can i get from this object the payment intend and get the client secret from that object

#

because this secret is different

deft mesa
#

so the whole configurations - subscription details, customer and price creation on the backend should be replicated but should use PaymentSheet instead
don't use Checkout Session at all. Instead create a Subscription on the backend (https://docs.stripe.com/api/subscriptions/create), then use the PaymentSheet to collect the payment details.

#

The Subscription will contain a latest_invoice.payment_intent.client_secret, that you can use with the PaymentSheet.

tribal sparrow
#

basically the idea is to get the payment intend and continue it based on the documentation

#

don't use Checkout Session at all. Instead create a Subscription on the backend (https://docs.stripe.com/api/subscriptions/create), then use the PaymentSheet to collect the payment details.
The Subscription will contain a latest_invoice.payment_intent.client_secret, that you can use with the PaymentSheet.
i already have this logic implemented for the WEB and I have free trial logic also incorporated in the checkout + currently will implement discounts on that checkout session

#

and you are saying use directly the API call to create subscriptions

#

where is the added value to host (because it is not ok to collect on our side) collection of the billing details on your side

deft mesa
#

you are saying use directly the API call to create subscriptions
if you want to use PaymentSheet, then yes.

prime kestrelBOT
tribal sparrow
#

so this session won't be able to be completed in the mobile app cs_test_a13CkB09HYxwmLPKzRD95md4RrVygmfEjtiXnhH3mO8dor7EjZCNCNkppP

rose path
#

Hey! Taking over for my colleague.

rose path
tribal sparrow
#

ok, thanks (close the thread)