#brunoripa.
1 messages ยท Page 1 of 1 (latest)
Hello
Hi !
Generally you can use metadata to set stuff like this. In terms of using Prices specifically, you can also use lookup_key which is designed for this purpose: https://stripe.com/docs/api/prices/create#create_price-lookup_key
Ok, I see your point. Thanks. So, potentially, by adding proper metadata I could fetch a "customer's catalog", too.
๐
Yep
What's the impact on Stripe about this ?
No impact
metadata is designed for purposes like this.
no scaling issues, then.
And we have no limit on Products/Prices
๐
I am now guessing how much should I leverage my local DB and how much the stripe backend ๐
Is there any best practice suggested ?
Yeah up to you really. We mostly recommend using your own DB but it really depends on the integration and use-case.
but syncronizing things could make things annoyingly complex with lots of edge cases to handle ๐ค
The issue with using Stripe here is that you can run into scale issues with rate limits (https://stripe.com/docs/rate-limits) if you are constantly needing to retrieve big lists and whatnot
Yes that is fair. Like I said, going to depend on your integration really.
Yeah, I'd imaging you might be throttling api
Another thing is not clear to me is pricing. If you imaging a CRUD page for products, it's clear you'd have the chance to change prices. Now, prices can't be changed, but you have to:
- create a new one
- change the default price on the product
- delete the old price
or, to the best of my understanding, I could update the price by creating a new one using a lookup_key and using it to modify the product price. Have I understood this :?
Yes that's correct. You either want to create a new one using lookup_key or you could potentially create them inline using price_data
Are you using Stripe Checkout here?
Yeah
Yep then you could create them when you create the Checkout Session via price_data: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data
And not creating products stripe-side won't make any difference in terms of invioices etc ?
It's exactly how I am doing atm ...
Hi there ๐ jumping in as my teammate needs to step away soon. When you're asking about whether this impacts invoices, is that because you're planning to use these Products/Prices later on down the road when creating Invoices, or is that just in regards to having Checkout Sessions create Invoices for completed payments?
I will be selling products on behalf of customers, and get a cut of that. Then I will send them money (every X days)
I was just asking about invoices in case they might be needed, and if a different implementation of products should have been taken into account for possible edge cases
Happy to talk through that in more details in there are questions, but in general there isn't a concern with using price_data and product_data. I don't recall exactly, but I think you may run into problems later on if you try to reuse the Prices/Products created that way, but if you aren't I wouldn't anticipate any problems.
I'm not sure how far you've gotten in picking your integration, but in general when selling on behalf of a third-party, where you need to send them funds for the payments, we typically recommend using Stripe Connect:
https://stripe.com/connect
It's meant for handling scenarios like that and works well for marketplace like platforms.
If you're handling paying out your vendors on your end though, then you may not have a need for Connect.