#rob-p_api
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/1387511619399192577
๐ 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.
- rob_lots-questions, 34 minutes ago, 14 messages
Hi there ๐ you can tell from amount_paid being 0 that a payment wasn't processed for this invoice, which is reinforced by no Payment Intent being associated with the Invoice.
You can also see in total that the Invoice's total was negative, so the entire negative amount was credited to the customer's balance (rather than their balance decreasing because it was used to pay for this invoice).
https://docs.stripe.com/billing/customer/balance#:~:text=Prorations from downgrading a subscription can indirectly create credits to reduce the amount due on the next invoice.
And how will the next subscription cycle event occur, if the renewal can be fully completed by credits? Which webhook events will be sent in this scenario on the next cycle?
You can use Test Clocks to see exactly how this scenario will play out through the entire Subscription lifecycle in testmode:
https://docs.stripe.com/billing/testing/test-clocks
starting_balance and ending_balance on the Invoice object can be used to see exactly how the Invoice impacted the customer's balance
Ok thanks Toby, I will test using the test-clocks to see what events are being sent.
I have another question about taxes in the locked thread maybe you could help answer as well.
"Another question I have is with taxes, I am noticing I am getting back Tax rate information on the Subscriptions however in the Stripe dashboard it is showing that the tax was not collected what could I examine in the objects that indicates that the Country my Stripe account is in is not able to collect taxes for and is there a way to view the list of countries that our Stripe account will collect taxes on Digital Services on?"
Are you using Stripe Tax?
yes
Gotcha, did you already add the states/countries/regions where you're registered to collect tax in your dashboard?
https://dashboard.stripe.com/test/tax/registrations
Yes, just checked only in Canada, so can that list be fetched from the API?
I want to make sure the code can dynamically handle if we add tax collection in new countries
I just tried this endpoint, and it's listing the same registrations that I see in my dashboard. So I think this is what you're looking for:
https://docs.stripe.com/api/tax/registrations/all
Ok perfect thanks. So on a new Subscription if the address is not in a location where the tax is collected is there something returned in the creation webhook payload that indicates that tax is not collected in this Legacy SDK? Like tax exempt on the customer? Or is it better to request that list from that endpoint and if the billing address of the customer is not in the registrations just skip tax calculations?
I think looking at the Invoice object will be the best way to see that. Either in total_taxes.taxability_reason:
https://docs.stripe.com/api/invoices/object#invoice_object-total_taxes-taxability_reason
or that same field exists at the line item level if you need to see that specific value for multiple line items:
https://docs.stripe.com/api/invoices/object#invoice_object-lines-data-taxes-taxability_reason
It'll give you insight into why tax wasn't applied if it wasn't. not_collecting is the value that is displayed if the tax is for a jurisdiction where you aren't registered currently.
Ok thanks very much!
One more question... If I add a new tax collection registration after some subscriptions have been created , will the old subscriptions be updated to reflect collection on the next cycle?
Hhmmm, I think so, or at least would really hope so ๐
Looking to see if we have any docs that confirm that, but testing with a Test Clock may be faster
Based on the UI I see when adding a new registration, I do believe that's how this will work, since you're also given the option to schedule when that tax registration should begin collecting taxes. But let me know if that isn't what you see in testing, I'd be happy to raise that concern to the appropriate team.
Ok thanks I will run a few tests here and follow back up if I find any issues.
Any time! I need to step away, but my teammate is here to help if there are any follow-up questions. Take care! ๐
I ran a test clock and added the tax registration for the billing address and it looks good on the next invoice for charging the tax.
Only thing that I noticed while doing this is I was able to set the tax registration effective date earlier than the test clock and that when looking at invoices that occurred after the tax registration effective date but before the next renewal were not adjusted.
I think that is the correct behavior as the invoices were finalized before the tax registration effective date was set but there is nothing in the invoice indicating that is what occurred. I think it is a rare edge case so I think it is all good. ๐
That seems right to me!