#sander_best-practices

1 messages ยท Page 1 of 1 (latest)

hoary treeBOT
#

๐Ÿ‘‹ 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.

wide schoonerBOT
waxen fog
#

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.

rancid saddle
#

Yes, but could I charge the customer only one time? My product is a little different with subscribtion

waxen fog
#

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?

rancid saddle
#

Ya, the second, only once when they add a new device.

waxen fog
#

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.

rancid saddle
#

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.

waxen fog
#

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.

rancid saddle
#

You are so thoughtful, thanks!

waxen fog
#

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:

Securely accept payments online.

How to use webhooks to respond to offline payment events.

Listen to events in your Stripe account on your webhook endpoint so your integration can automatically trigger reactions.

Learn how to create and send an invoice with code.

rancid saddle
#

You save my day, I will read through these documents, thank you so much!๐Ÿ‘