#ethan_best-practices

1 messages ¡ Page 1 of 1 (latest)

unreal axleBOT
#

👋 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.

gritty sandal
mint cedar
#

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

gritty sandal
#

So these are refunds that you issue after payments are made in a normal way?

mint cedar
#

Correct, we track a gift card in our system that the user is allowed to pay off part of their total with

unreal axleBOT
dusty umbra
#

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.

mint cedar
#

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?

dusty umbra
#

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.

mint cedar
#

Does that show up as a trackable line item/object on the invoice?

dusty umbra
#

No, it's an "applied credit" in the invoice totals reducing the amount

mint cedar
#

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

dusty umbra
#

(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

unreal axleBOT
dusty umbra
#

hey there still working on this, but its looking promising

mint cedar
#

Awesome!

dusty umbra
#

Ok, this works. It's more complicated, but would allow you to build full customized payment combinations from your gift cards or other sources

#

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

#

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