#matheuscp - bill instantly

1 messages · Page 1 of 1 (latest)

uncut sluice
#

I will check in to if there is a way to configure that kind of behavior

frank pulsar
#

the subscription is active, but it is not charged at the time. i'm using laravel

#

Like this:

#

$pagamento = $stripe->subscriptionSchedules->create([
'customer' => $user_stripe_id,
'start_date' => 'now',
'end_behavior' => 'cancel',
'phases' => [
[
'items' => [
[
'price' => $plan->stripe_id,
'quantity' => 1,
],
],
// 'coupon' => $request->cupom_id,
'iterations' => 12,
],
],
]);

#

my client may have the impression that something is wrong when signing because it takes 1 hour to be charged

uncut sluice
#

In that case, please reach out to Laravel's support. Stripe doesn't make the Laravel API so unfortunately I do not have much insight in to how to use it.

frank pulsar
#

Ok, but stripe have PHP documentation in his site

frank pulsar
#

and not in laravel

uncut sluice
#

Oh I see, I was confusing that with the Laravel Cashier API

#

So yes, I am looking in to how to bill sooner right now

frank pulsar
#

Ok

#

Do you want me to send you a print or did I manage to explain my problem well?

uncut sluice
#

I think I understand your problem. Invoices have a draft period of one hour and you would like to skip that.

#

It looks like there isn't a way to configure around that. I think you will want to create a webhook endpoint that listens for the invoice.created event.

frank pulsar
#

Exactly. The subscription is active, but the charge does not appear on the invoice immediately

uncut sluice
frank pulsar
#

Sorry, I did not understand

#

😞

uncut sluice
#

Any of it, or some specific part? I am happy to explain any part of that again

frank pulsar
#

So,I will try to explain my second doubt

#

when I sign a client, does the stripe return this "id" that is being passed in the function?

#

$stripe->invoices->finalizeInvoice(
'in_1KelpPFjoquTQj7kXO1X6v9q',
[]
);

#

the solution to skip this 1 hour time, would be to call this "$stripe->invoices->finalizeInvoice". Eight?

#

Right*

uncut sluice
#

Yes, subscriptions charge your customers through Invoices. Every time an invoice is created either from the user signing up or from the subscription cycle renewing, we will send you a invoice.created event.

#

And if you make that finalize call, the invoice's status will transition from draft to open and we will attempt to charge your customer.

frank pulsar
#

Oh, I got it

#

I wll try this

#

If I have any other questions, I'll come back here. Thank you very much