#rizvan_api

1 messages · Page 1 of 1 (latest)

proper canyonBOT
undone rampartBOT
#

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.

proper canyonBOT
#

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

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

undone rampartBOT
indigo mesa
cinder jasper
#

I am trying to integrate stripe into our CRM. So when we create a invoice and try to make a payment we will be send the payment link to our clients.

#

How do we identify which client has made the payment

indigo mesa
#

then I wouldn't really use PaymentLinks, I would create a CheckoutSession or Invoice directly instead.

#

PaymentLinks are for easily putting a "buy now" button on a public site not tied to a specific customer. You're probably better off directly creating CheckoutSessions/Invoices in the API.

cinder jasper
#

but we need a payment link to send it via mail or SMS

indigo mesa
#

you can send a link to a page on your own siite, and that page then creates and redirects to a CheckoutSession, for example.

cinder jasper
#

I really didnt get this step

#

Is it mandatory to create a product and then get the price_id of the product only then pass it to https://api.stripe.com/v1/checkout/sessions get create a checkout session? or we can just push products during the creation of a session

#

the response url from the checkout session can be used as the payment link?

indigo mesa
indigo mesa
cinder jasper
indigo mesa
#

you wouldn't; you would create a new CheckoutSession each time

cinder jasper
#

Oh okay got

#

thanks

#

So I will need to redirect the site to the checkout session url that was just created?

indigo mesa
#

yes

cinder jasper
#

Should the customer be already created and we need to pass the customer id to create a checkout session?

#

because I passed a random name to the customer parameter and it said no such customer exists

indigo mesa
#

if you want to associate the Session with a specific Customer you have an exsting cus_xxx Customer object and pass its ID yes

cinder jasper
#

How to setup the payment account details to which the amount is credited to?

indigo mesa
#

do you mean just adding your bank account to your Stripe account?

cinder jasper
#

Yes

indigo mesa
cinder jasper
#

can we retrieve the payment status session of a checkout session?

indigo mesa
#

sure

#

I suggest trying it out and reading the API reference(there's a payment_status field documented )

cinder jasper
#

okay got it thanks

cinder jasper
#

I am passing 5000 as the price of a product and currency is in INR but when i create a link or checkout session its displaying 50

wicked path
#

Stripe API, accepts the smallest unit of each currency, so you need to take into considerations cents in your price value.

cinder jasper
#

This is in rupees so should I enter 500000 to get 5000 rupees?