#greggles_api

1 messages ¡ Page 1 of 1 (latest)

austere tinselBOT
acoustic chasmBOT
#

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.

austere tinselBOT
#

👋 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.

sharp pulsar
#

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?

tropic nova
#

Hi there, taking a look at the request you shared

#

Omit amount but use price_data.unit_amount

sharp pulsar
#

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?

tropic nova
sharp pulsar
#

OK, thank you again for your help.

tropic nova
#

Sure thing!