#ilamathi
1 messages ยท Page 1 of 1 (latest)
๐ Hi there, Happy to help!
Actually Stripe APIs, accept form-encoded body and not json:
https://stripe.com/docs/api#:~:text=accepts form-encoded request bodies%2C returns JSON-encoded
You should use x-www-form-urlencoded forma as the error response mentionning
oh ok.. so nest object i can mention with dot.. Example items[0][price] ?
Yes, take a look at the curl example:
https://stripe.com/docs/api/subscriptions/update?lang=curl
ok got it thanks...
You're welcome ๐
This webhook event "invoice.upcoming" is not applicable for daily plan right?
AFAIK it's not but I'm double checking for you
sure .. thanks
so yes it doesn't apply for daily plans
In this event data, we will get the upcoming invoice details.. in addition to that, is there any details to check the amount and tax are same as previous/current one or the current invoice details ?
I'm not really following, could you please elaborate?
in the "invoice.upcoming" webhook event data, i could see the details on the upcoming invoice.. Is there is any specific details about previous invoice or any flag to identify this upcoming invoice amount same as previous or it got differ like those details?
you'd have to retrieve the last invoice and compare it to the upcoming if you need to see whether there is any differences
in this "invoice.upcoming" invoice event i could see subscriptionIID and there is no last invoice id ? Do we get that?.
you need to retrieve the subscription and expand on last_invoice
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
sorry it's latest_invoice
In stripe price update API, i could see there is a option like currency_options.<currency>.unit_amount, is that just to add new currency to the existing price? Or using this can we alter the existing currency's unit_amount?
it's for a new feature where Prices can have multiple currencies; so to answer your question it's the former.
sorry i didn't quite clear on ur answer.. pls ellaborate more
as far i know we can not update the unit_amount on existing priceID.. but i could see this option currency_options.<currency>.unit_amount in the update API.. so only i got confused and asking this question
currency_options is used as part of this feature : https://stripe.com/docs/multi-currency-prices
correct, you can't change the unit_amount on a Price. you can use currency_options to set unit amounts for other currencies for that price