#greggles_api
1 messages ¡ Page 1 of 1 (latest)
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.
- greggles_best-practices, 1 day ago, 65 messages
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1252759099611807774
đ Have more to share? Add details, code, screenshots, videos, etc. below.
I can add the product to a subscription by using
$subscription_array['add_invoice_items'] = array(
array(
'quantity' => 1,
'price_data' => array(
'currency' => 'usd',
'product' => $stripe_tax_product_id,
'unit_amount' => $_POST['subscription_tax']
)
)
);
Is it possible to add a product to an invoice in a similar way?
Hi there, taking a look at the request you shared
I think you probably want to work with price_data here too: https://docs.stripe.com/api/invoiceitems/create#create_invoiceitem-price_data
Omit amount but use price_data.unit_amount
Hi, thanks for the reply. Unfortunately that didn't work. req_fYeHmnwuM0v2YB
I also tried omitting the price(id) and specifying price_data.product and got a different error about missing parameters
Wait
I think that worked. This is great, thank ytou so much for that.
Is it possible to add multiple invoice items in one shot or does one need to call create->invoiceItems every time you add an item?
Not possible. You'll need to create an Invoice Item for every item
OK, thank you again for your help.
Sure thing!