#David Gallardo
1 messages · Page 1 of 1 (latest)
Hi there, the invoice's initial state is draft, you need to finalize it to move its state to open
Hello, this is id of invoice production:
in_1M1UjCFM9jDuA8CDt7db1wZa
I have permission.
But what has been done is to extend a subscription. Normally the invoice is created and charged.
I notice that the auto_advance is turned off, So Stripe will not automatically finalize it
They are subscriptions that are extended and are charged at the moment, I give you another example of a similar invoice that has worked correctly:
in_1M01RJFM9jDuA8CDzHG6t3y4
ok, use ['auto_advance' => true]
but i no create invoice, only update subscription
This in_1M01RJFM9jDuA8CDzHG6t3y4 was generated when the subscription is changed, and its collection_method was set to charge_automatically because the subscription's collection_method=charge_automatically. So Stripe will attempt pay it immediately.
The invoices is auto by stripe when i update suscription in API
\Stripe\Subscription::update($stripeSubscriptionId, [
'items' => $itemsList['items'],
'payment_behavior' => 'error_if_incomplete',
'proration_behavior' => 'always_invoice',
"default_tax_rates" => $taxrate
]);
Although in_1M1UjCFM9jDuA8CDt7db1wZa was also generated from a subscription change, the subscription's collection_method=send_invoice so the invoice 's collection_method is set to send_invoice and Stripe won't immediately pay it in this case
ok, i write collection_method=charge_automatically in the code
'items' => $itemsList['items'],
'payment_behavior' => 'error_if_incomplete',
'proration_behavior' => 'always_invoice',
"default_tax_rates" => $taxrate,
"collection_method" => "charge_automatically"
Thanks, i try, bye!