#steven-priced-invoice
1 messages · Page 1 of 1 (latest)
You can't mostly, you need a separate Price since a Price has a "set amount"
really the easiest is to either have a separate Price or just pass the exact amount/currency on Invoice Item creation: https://stripe.com/docs/api/invoiceitems/create
I can create a discount code and apply it to that invoice item right?
yeah that works
ok so applying a discount well coupon....I'm doing this, but I'm getting Invalid array
`$disc = bcmul($prod['price'], 100) - bcmul($amount, 100);
$coupon = $stripe->coupons->create([
'amount_off' => $disc / 100,
'currency' => 'USD'
]);
$invoice = $stripe->invoices->create([
'customer' => $stripeCustomerId,
'collection_method' => 'send_invoice',
'due_date' => date("U", strtotime("+7 DAYS")),
"discounts" => ["coupon" => $coupon->id]
]);`
sorry missed your follow up my bad