#chemuturi-Invoice

1 messages · Page 1 of 1 (latest)

halcyon talon
#

Hi, do you want Invoice not limited to a Subscription?

old frost
#

I want to add an invoice line item to a subscription after two invoices generated!

halcyon talon
#

From the Subscription Id you can query how many Invoices it has, filter by 2

old frost
#

Is there any way that I can use a schedule for once to update the subscription using subscription schedule object for adding one invoice line item to charge for only once at the time of billing cycle?!

halcyon talon
#

Sorry I don't follow that. Could you elaborate a bit more clearly on what you are trying to achieve?

old frost
#

Here is my scenario : :
I have a subscription which has a free trail of 30 days and after that the subscription is billed on the basis of usage.
My product has a one time fee which should be charged once per subscription.
So, in this case the first invoice would be 0.00
and the second invoice would also be 0.00
Then comes the third invoice which the customer will be charged according to his usage. In that invoice I want to add the invoice line item for one time payment.
I've created an API for adding invoice line item but worried when should I trigger that one time payment invoice line item to the subscription?!
Can I achieve this with subscription schedule?!

halcyon talon
#

Doesn't sound like an usage for Subscription Schedule

#

Can you elaborate why 2nd Invoice should be 0.00?

#

The 2nd Invoice should be the Invoice for your first Billing Cycle

old frost
#

Because the second invoice would be generated stright away after free trial ends, but my application charges customer on the basis of usage i.e., metered usage which will be charged at the end of the month!

#

For example if the subscription is taken today, it will generate a invoice of 0.00 today and after that end of the month next month subscription renews and since the usage is metered it will charge the customer at the end of the month i.e., in 61st day. On the 61st day I want to add one time fee as invoice line item to that subscription!

halcyon talon
#

I doubt that. The first Invoice will be 0.00 sure yes, because of its trialing period. But the second Invoice should be the usage-based billing on 30th day

#

Do you have a sample Subscription Id?

old frost
#

Give me couple of minutes, I'll share the subscription!

#

Check this subscription : :
sub_1LISXwSDLx9D8C1wOsz9hQPe

old frost
#

Any suggestions?!

halcyon talon
#

Sorry I am swinging around different threads. Looking...

prisma tundra
#

All I see on that subscription is :

  • trial period starts ($0 invoice)
  • trial period ends($0 invoice as it's metered billing so nothing to charge yet)
    -then you report usage, during this Aug 4->Sep 4 period.
  • the next invoice on Sep 4 will bill for that usage.

Seems normal.

old frost
#

Here before the third invoice finalizes, I need to add an invoice line item to that subscription!

#

How would I achieve this?!

prisma tundra
#

I need to add an invoice line item to that subscription!
why?

#

I want to add the invoice line item for one time payment.
ah ok

old frost
#

How do I have control to add the invoice line item after 60 days?!

prisma tundra
#

I don't understand the question.

old frost
#

If I add Invoice line item when the user takes the subscription which will start at free trial, after the end of free trial it will charge the customer straight away but I want that to be happened at the end of the month along with the rest of the metered usage items!

prisma tundra
#

then you just make the API call at the right time

#

one option might be to listen for webhooks like customer.subscription.updated to detect when the subscription has ended the trial or moved to the next period, and make the call then