#sander_best-practices
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/1280510859449466910
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- sander_best-practices, 1 hour ago, 5 messages
Hi there ๐ sure, quantity sounds like a reasonable parameter to use to track the number of devices that your customer's are signed up to use.
Are you planning on charging for each device that is subscribed? That would align with the use of quantity well also.
Yes, but could I charge the customer only one time? My product is a little different with subscribtion
Can you elaborate a bit on what you mean when you say you only want to charge the customer once? Is that only once when they first sign up, or only once when they add a new device?
Ya, the second, only once when they add a new device.
Gotcha, I'm not sure I'd use a Subscription-based integration. It sounds more like you're processing one-time payments rather than setting up recurring payments where Subscriptions would fit well. (Unless I'm still not understanding well and you're charging a recurring fee for your service plus a one-time fee per device signed up)
For one-off payments, I think it'd be easier to track the number of devices that your customser has signed up in your database. You can set up a webhook endpoint to receive an Event every time a payment is completed, and then use that to trigger a process for updating the customer's quantity on your end.
Ohhh, got it, yes, I think my scenario is more related to one-off payment. Thank you for the suggestion, the webhook is a great idea, can you share the related document for me? super super thanks.
Yup sure thing! Let me grab some links for you (I didn't want them to flood the conversation if it wasn't what you were after), just a sec.
You are so thoughtful, thanks!
I'd suggest looking here for the outline of a payment flow (there are several integration options in there)
https://docs.stripe.com/payments/accept-a-payment
Then these for the webhook endpoint and event handling:
https://docs.stripe.com/payments/handling-payment-events
https://docs.stripe.com/webhooks
The one additional thought I have here, is that if you want to produce full invoices via Stripe, as opposed to just receipts, you'll want to look at building an Invoice-integration instead:
https://docs.stripe.com/invoicing/integration
For events that I would suggest listening to:
payment_intent.succeededif you're doing one-off payments (it will also work for Invoices too if you prefer): https://docs.stripe.com/api/events/types#event_types-payment_intent.succeededinvoice.paidif you're building an Invoice flow: https://docs.stripe.com/api/events/types#event_types-invoice.paid
Listen to events in your Stripe account on your webhook endpoint so your integration can automatically trigger reactions.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You save my day, I will read through these documents, thank you so much!๐