#ethan_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/1463160495405011086
đ 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.
- ethan_error, 4 days ago, 7 messages
- ethan_unexpected, 5 days ago, 10 messages
Hi there, can you give me a bit more detail about what you mean by gift cards? Are you referring to what's detailed in these docs: https://stripe.com/resources/more/accepting-gift-cards-101
It would be considered a Closed-loop gift card, we have provided gift cards to customers as a refund mechanism
Worth noting these aren't in any third part vendor, this is all tracked in our software
So these are refunds that you issue after payments are made in a normal way?
Correct, we track a gift card in our system that the user is allowed to pay off part of their total with
hey there, just stepping in for dougal who had to step away. There are some other ways to consider approaching this.
First, you can evaluate leveraging customer credit balances: https://docs.stripe.com/invoicing/customer/balance
With this flow, you'd apply the "gift card" to the customer credit balance, which would automatically get applied to the next invoice that gets finalized, reducing the amount due without affecting the line item behaviour.
The customer needs to be able to choose when to use the gift card is there a way to do that with a customer balance?
What do you mean, can you explain more? You don't have to add it to the balance right away, you could issue the gift card to defer that, only adding to the balance later when they re-enter the gift card etc.
Once added to the balance no you can't pick, it always applies to the next invoice, up to the invoice amount, until depleted.
Does that show up as a trackable line item/object on the invoice?
No, it's an "applied credit" in the invoice totals reducing the amount
Is there any way to make Invoice Credit Notes not change the total tax charged on an invoice? Otherwise that sounds like the only option
(i'm testing another flow currently, but don't want to recommend it until i know it works)
It's relatively new, so I want to make sure the abstraction works for my understanding of your use case
hey there still working on this, but its looking promising
Awesome!
Ok, this works. It's more complicated, but would allow you to build full customized payment combinations from your gift cards or other sources
Take a look here for invoice partial payments: https://docs.stripe.com/invoicing/partial-payments?dashboard-or-api=api#invoice-payment-statuses
In brief, you can calculate how much the customer will pay from your gift card and another source based on their choices and your tracked balance etc
Put the gift card portion aside, for now
For the balance, you create a payment intent for the amount to pay, and attach it to the invoice as shown in the doc
Once that is paid, the invoice amount due will be reduced
Then, for the gift card portion, you can create a PaymentRecord to represent your gift card purchase from your tracked balances
You can use the custom payment method details, like shown in the example snippet, to describe your gift card
https://docs.stripe.com/api/payment-record/report-payment/report?lang=node#report_payment_records_report_payment-payment_method_details-custom
Just like attaching the payment intent, you can attach this payment_record to the invoice
So say there is a 100$ invoice, and the custom has a $20 gift card
you'd create an $80 payment intent and a $20 payment record
attaching both to the invoice will complete the payment and it will transition top paid
Soi i think this is flexible enough to let you offer this payment structure any way you see fit
You'll need to explore these APIs a bit and test out flow you want to make sure the end result works for you
But this technique would let you offer the GC payments flexibly, the customer can choose if/when/how much of the GC to apply to the invoice
and pay the rest some other way