#geo_coupons-invoices

1 messages ยท Page 1 of 1 (latest)

surreal dragonBOT
#

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

๐Ÿ“ 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.

magic forum
#

Good question, I am not immediately sure. Looking in to this and will get back to you

compact jungle
#

thank you!

magic forum
#

Unfortunately it looks like there isn't a good way to do this at the moment. Outside of coupons, the two ways that I can think of to reduce the amount on an invoice would also take 1 extra API call. Namely:

  • Creating a negative invoice item. We do allow for negative invoice items which you can even give a custom name to make it clear that it is a discount. Unfortunately we don't allow this in the susbcription creation call's add_invoice_items parameter so that would need to be a separate API call.
  • Creating customer credit balance
surreal dragonBOT
compact jungle
#

and if I do go any of the routes above, would that apply to just the first invoice or every invoice?

livid parcel
#

Hi ๐Ÿ‘‹

I'm stepping in as my colleague needed to go.

#

If you use either of the approaches my colleague listed above, they would apply per invoice and you would need to manage them

#

If you don't mind me asking, is there a reason you wouldn't just create Coupon objects in your Stripe account to represent these discounts?

compact jungle
#

I see

#

Could it be possible to ask another unrelated question here or would you like me to create a new thread?

livid parcel
#

No that's fine, ask away.

compact jungle
#

oh wait acutally give me a sec, essentially I created a subscritpion with metadata but when I call for it via api I don't get metadata back. Let me tripe check that it's the right one

#

apologies

livid parcel
#

No worries. If you have the API request where you create the Subscription I can check where the metadata is being saved.

compact jungle
#

I can see it in the dashboard, just not in the call but it looks like I might have the wrong id. This is my souce of truth sub_1QXVOzDY3BzcP9iqb2QNBFEp

livid parcel
compact jungle
#

so im calling invoice in_1QXVOzDY3BzcP9iqTgrZHPSf to get subscription id, which returns sub_1QUyCQDY3BzcP9iqKNHA6FMl, then I'm calling subs api but it seems that's not the one I'm looking for. Probably got the wrong invoice id

livid parcel
#

Well I'm not sure which Subscription you are looking for but in_1QXVOzDY3BzcP9iqTgrZHPSf shows up as being linked to sub_1QXVOzDY3BzcP9iqb2QNBFEp when I look at it.

I'm not sure where sub_1QUyCQDY3BzcP9iqKNHA6FMl is coming from.

#

What is it you are trying to do? Like what's the larger goal here?

compact jungle
#

I need the metadata to trigger something else. I can continue debugging this on my code, it seems the invoices are being messed up in my code somehow

#

Thanks!

livid parcel
#

Sure thing! For what it's worth, I do see the metadata on the first subscription you referenced so you are setting it properly.

compact jungle
#

yep, user error probably, I'm user lol

#

have a good one!