#kierandt

1 messages ยท Page 1 of 1 (latest)

lusty steepleBOT
tawdry ridge
#

๐Ÿ‘‹ happy to help

#

would you mind sharing the request ID that failed?

stoic aurora
tawdry ridge
stoic aurora
#

The logs don't match up with the webhook response, the webhook shows this

#

But this API request shows 200 req_oNcZAb4KfsnK7B

#

Then when I try to apply credit note to invoice, it has this message: req_ASaL8TgotfRVBM

tawdry ridge
#

taking a look

stoic aurora
#

great thanks

tawdry ridge
#

if you're creating a credit note, it's better to wait until the invoice has been paid

#

and not just created

stoic aurora
#

I can't do it this way. I discussed this previously with a support engineer who adviced me to do it this way:

  • invoice.created - turn off auto collection, finalise it using sdk, add credit note, then charge the customer.

But for some reason in the test clocks it looks like it might be going from draft, finalised, paid without waiting the 1 hour of time between draft and finalised status? which is resulting in not giving enough time for our API to adjust the invoice

#

Should I be setting the test clock to midnight of the desired day, to avoid invoices getting fast forwarded?

tawdry ridge
#

I'm not sure if that's the right flow though

#

instead of trying to update that afterwards

stoic aurora
#

Should I update this on the invoice during handling of the invoice.created webhook?

#

Since it's a subscription invoice, I don't create it manually

tawdry ridge
#

ok let's step back for a second

#

would you mind describing the use-case first?

stoic aurora
#

This is my previous discussion with another stripe engineer

#

It is essentially overpayments with a reduced monthly amount, which Stripe doesn't support

#

It's quite a unique use case

tawdry ridge
stoic aurora
#

When I spoke to them we came to the conclusion of using credit notes to the subscription invoices. Is it possible to apply a recurring line item (of a negative amount, to reduce the invoice) automatically onto a subscription using the prebilling?

tawdry ridge
#

I'm not familiar with that beta feature to be honest

#

why not use Customer Credit Balance

stoic aurora
#

yeah i just noticed the docs say that it's preview feature

tawdry ridge
#

if you want to give the customer a reduction on the invoice

stoic aurora
#

we cant use customer balance because customer can have multiple subscriptions and only one of them may require it to be reduced

#

and AFAIK, customer credit balance will apply to the next invoice raised

tawdry ridge
#

exactly

#

so what you can do, is create the Customer Credit Balance

#

when you receive the right invoice.upcoming event

stoic aurora
#

It could work, but it feels just similar to applying the credit note to the invoice. In terms of the pre-billing, I just have a question around this https://stripe.com/docs/billing/subscriptions/prebilling#upgrades-downgrades

It seems like this might work for us if we can create a mid term change to the subscription by adding a negative line item to all future invoices for the subscription. Is there any way you can find out how I can achieve this and do it via the Stripe SDK?

hazy pike
#

Hi ๐Ÿ‘‹ jumping in as my teammate needs to step away soon. I'm catching up on the conversation.

#

Seems like this has gone through a bit. I see originally this started about an error being surfaced about an Invoice not existing, but the provided request IDs did not show that error being returned. Is that still the focus here?

stoic aurora
#

I think the original issue has been resolved, I was setting my test clock too far in the future so it was causing the invoice to skip the draft status and was being immeditaltey charged. I was then trying to apply a credit note to it after it was paid so it was throwing an error.

My question above still stands though, if I am able to make use of the preview prebilling feature, to adjust a subscription mid-term and be able to apply a negative line item for each invoice left in the subscription length? Is this possible to do it via the SDK?

hazy pike
#

I'm not sure, we're not too familiar with beta/preview features in this forum.

stoic aurora
#

No problem. Is it possible to be able to chat with someone or be pointed in the direction of somebody who would know? Because it seems to me from what I am reading, that this would be a much better solution for us if what I have mentioned above is possible

hazy pike
#

Hm, I'm not too sure, let me see what I can find.

stoic aurora
#

Thank you I appreciate it, take your time ๐Ÿ™‚

hazy pike
#

I found Prebilling mentioned on this page, so I'm thinking it's part of the larger offering discussed here. So I would suggest completing the form near the top to express your interest in hearing more about the features:
https://stripe.com/docs/billing/subscriptions/sales-led-billing
The other approach that comes to mind, is to reach out to our Support team. I'm not sure they'll know anything about the features, but they may have a contact that I'm not aware of that they can provide.
https://support.stripe.com/?contact=true

Quote and bill complex sales contracts automatically on Stripe Billing.

stoic aurora
#

I am just thinking incase you know....might my problem just be solved by simply adjusting the subscription price? If I update the subscription price, I assume it just updates that specific subscription price (for that single customer)? ๐Ÿค”

#

I will certainly do the above, I've learnt so much about Stripe the last 2 weeks I feel like I need to join the team soon ๐Ÿคฃ

hazy pike
#

If by "update the price" you mean updating the Subscription to change the ID of the Price that it is using, then yes you could do that if your overall goal is to change the amount the customer is charged each billing period. You can't just update the Price object though, those are locked once they're used.