#r0zator
1 messages · Page 1 of 1 (latest)
Also, there is a status called "processing". Where is the status gonna be sent when the payment is succesfully processed? When is processing being sent?
Hi there, you shouldn't reply on the query params on the URL to determine the setupIntent status. You should retrieve the setupIntent object and check its status, and/or listen to webhook events.
understood. So I should use the api and not rely on the url
You are right.
ah ok, so for cards it's not happening. good. thanks
Question - should i rely on query parameters at least for the setup intent id, so I can fetch details of it from API? @graceful monolith
You don't need the setupIntent ID to retrieve the SetupIntent, you can pass the clientSecret to retrieve a SetupIntent (https://stripe.com/docs/js/setup_intents/retrieve_setup_intent#stripe_retrieve_setup_intent)
and how I can retrieve the client_secret from api without waiting for the stripe elements to render and generate the secret?
because currently i am using stripe elements for adding a card payment, add it -> on redirect url I have the setup intent id -> get the setup intent from API on my backend side and check the status of it.
and i know that client secret is required only on client side - but I want to do everything on server side
You should get the client_secret from the the response of SetupIntent creation.
ok, thanks