#jodobird_api
1 messages ยท Page 1 of 1 (latest)
๐ 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/1342216481634783302
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello! No, the Customer Balance only applies to Invoices. See here for details: https://docs.stripe.com/billing/customer/balance
To clarify, you're using Payment Links? You're not creating the Checkout Sessions yourself?
Thank you for your response!
Yes I am using payment links, since that is what they were already using. I am happy to start using checkout.sessions myself through API calls etc. The only thing is that then I would probably need to start adding quite some backend code and also not 100% sure how it connects with Kajabi, since that is a lo code platform.
Yeah, I'm not familiar with Kajabi and can't help with that side of things, but if you were creating Checkout Sessions yourself directly you could do things like specify an existing Customer and/or apply a discount when you create them.
That makes sense indeed and understandable you're not familiar with Kajabi. One of the reasons they used payment links is because it had it's own separate page. I do not really have access in Kajabi to dynamically call an API on a button click and then visualize a page (or element within the page) the way I want it with response from that API for instance.
Would you have a different idea to deal with this? I was thinking a potential solution is to create a different FE page and host it on a separate server for the payments. However, that of course also makes it a bit vague for the user's perspective, switching URLs etc.
No specific suggestions since I don't have enough context, but it sounds like you're on the right track.
Note that when you create a Checkout Session it provides a url to direct your customer to. The url points to a Stripe-hosted payment page. It's very similar to how Payment Links work, except each Checkout Session has a unique URL.
Payment Links are designed for the use case where you have a bunch of different customers all buying the same thing.
Checkout Sessions are for when you want a specific customer to pay for a specific thing.
One thing you can do with Payment Links is give your customers promotion codes they can type in on the payment page to get a discount. Not sure if that would work for your use case or not.
okay clear. Thanks I will look a bit more into the API and I indeed might be able to generate a dynamic payment link (potentially including information of their customer invoice balance to reduce from the original price) and link them through to the created URL.
We definitely also would like to use promo codes indeed. But more as a separte feature. So Feature A is buying some credits, to use for future products payments. Feature B is using promo code to reduce price
Hello, my colleague has to step out but I can help. Catching up now
No worries, thanks for the help Rubeus and thanks Pompey!
I agree with Rubeus, the best way to do this if it is possible for you would be to create Checkout Sessions directly because they are more flexible than payment links while still giving you a URL for a Stripe-hosted page. So if you can make your own API calls, I can link you to the relevant Checkout info. Otherwise, I think you would have to do something like create the Payment Link and then also provide a promo code for the customer to put in when they are on the page
Is a promo code going to be something like 25% off or $20 discount. Or can it also be $500 discount, and then when you buy a product for $30, you still have $470 left? I guess not, right? I guess the promo code is either single use or time based or something?
Yeah our coupons/discounts are applied in full each time they are applicable. So Customer Balance would be the closest thing for you. As mentioned before balance only works for Invoices, but our invoices have Stripe-hosted URLs as well so that may be an option for you as well depending on how much leeway you have to write your own server-side API calls
Clear, was indeed what I expected.
I can create my own API calls, so that is definitely an option then, to use dynamic payment links (and build logic in there to reduce the amount based on invoice balance). Sadly I just don't have a lot of control on the front-end side to really streamline the user flow. So please do share any relevant checkout or invoices info, that would be greatly appreciated. I do think that I could use the invoice balance and use that API to increase it when the user buys credit (through a payment link). and reduce the amount when they buy a product. But not 100% sure
This guide shows the API calls to create an invoice
https://docs.stripe.com/invoicing/integration
The one thing that you would do differently from the sound of it is that instead of the step 6 in that doc, you could just get the hosted_invoice_url property from the finalized invoice and redirect your customer to that page.
https://docs.stripe.com/api/invoices/object#invoice_object-hosted_invoice_url
This doc is good for how to take a payment through Checkout
https://docs.stripe.com/payments/accept-a-payment
And to have a discount pre-applied you can supply its ID to the discounts parameter when creating the session.
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-discounts
Perfect, definitely stuff I can work with! Thanks for the suggestions and help! Will take a look ๐
Of course, glad we could give you some leads! Let us know if you run in to anything else
Will do, have a good day!