#rizvan_api
1 messages ¡ Page 1 of 1 (latest)
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.
- rizvan_api, 31 minutes ago, 39 messages
- rizvan_api, 4 days ago, 16 messages
đ 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/1235944124520071218
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
thanks
So if I am trying to create a checkout session i will have to create product each time?
Or will duplicate entry be restricted?
No you can reuse a product
Just store it's id somewhere
In your database for example
Then you can re-use
What details specifically are you referring to?
Meaning name,email, phone
This is an existing customer object in Stripe?
Ok well you'll need to create the customer object first
With those details
And pass its id in here: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
okay but since we dont have search option does that mean we will have to create customer object everytime?
No you can re-use customers too
okay.... same store it somewhere like in database?
Yeah
That way you don't need to call the stripe api for these things
It'll speed up your integration too
Less api calls
This is a different question..... can we get the payment status of a payment made if we send the payment link using paymentlink api
because we need to send the payment link to our customers so they can pay later
and we cannot add customer details in payment link api
what can be done here?
Yeah I recommend listening for webhook events to be notified in your app each time a payment is successful
You can listen for payment_intent.succeeded
Or checkout_session.completed
No other way using just API's?
I mean you can poll the api
But that's super inefficient
Webhooks are always better for this sort of thing
Yes right!
Yeah the alternative to webhooks is to poll the api on a schedule to check for successful payments
Not recommended at all
So we cannot check based on the ID of the paymentlink?
No the recommended way is to use webhooks: https://docs.stripe.com/payments/checkout/fulfill-orders