#luffysenchou9488
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- luffysenchou9488, 2 days ago, 25 messages
- luffysenchou9488, 2 days ago, 61 messages
Hi Vanya
You can add a one-time Invoice Item: https://stripe.com/docs/api/subscriptions/create#create_subscription-add_invoice_items
Can i do this from the dashboard directly?
and will this replace existing invoice items or just add to the existing invoice items?
It will add extra ones. Not sure how it works on the Dashboard though.
But adding others is not my requirement, i need to replace the exisitng ones. Because if it just adds to the current items, he will still get charged for them
Then I recommend adding a trial period until the start of next month, and using add_invoice_items to charge for the full first month.
Happy to help.
Are the params to be added not accepted as json? I need to add add_invoice_items to this payload but very confused as to how I add it these are accepted as request params and not a Json payload
-u "sk_test_k8Y8rztC8oYOEox2xceyxI3O00YaQB6rXQ:" \
-d "add_invoice_items.price_data.currency"="USD" \
-d "add_invoice_items.price_data.unit_amount"="45"```
-d "add_invoice_items[price_data][unit_amount]"="45"
Hi Karllekko
I'm updating the subscription via API for adding additional invoice items. The below API is giving 200 response code but i dont see any additional items in the invoice for this subscription:
-u "sk_test_k8Y8rztC8oYOEox2xceyxI3O00YaQB6rXQ:" \
-d '{
"add_invoice_items": [
"price_data": {
"unit_amount": "4500",
"currency": "USD"
}
]
}'```
you can't pass JSON to the API, that doesn't work
I suggest not using curl and writing real code in your real app and the programming language you're comfortable with; or using Stripe CLI.
If you're using curl you need to pass it the way that was explained above
when i tried the way vanya said, it was throwing invalid array error
yeah because there was a mistake, it should be -d "add_invoice_items[0][price_data][unit_amount]"="45"
ok, but this is very inconvienient without a json
the error log when opened showed the request body in a json format. So i assumed it accepts a json as well: https://dashboard.stripe.com/test/logs/req_kzGM5SDjjQlso1?t=1705661595
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
makes sense but no, the API does not accept JSOn
just use a real library in real code in your application and you don't have to think about it
yes, will be using an sdk, but till then i have to explore the functionalities of stripe for adding invoice items. Unfortunately vanya said this is not supported in dashboard, hence, using the api
is there a way i can add invoice items from dashboard directly till i do this in a programmatical way?