#Shra_1

1 messages · Page 1 of 1 (latest)

worldly wadiBOT
knotty hollow
heady kettle
#

so it means, above mentiond cause is possible to achieve ?

#

how about this ?
(when ever additional charges/invoice item to be added to customer)

  1. I'll retrive the upcoming invoice for the customer(which will already have some charges)
  2. i'll create a invoice Item
  3. i'll add that invoice item to upcoming invoice
    will it work ?
knotty hollow
#

The upcoming invoice API is just for you to preview the upcoming invoice, there's no invoice ID in the upcoming invoice object.

#

Although you can create an invoice item without specify a invoice id, I highly recommend you to specify one so that the invoice item is attached to the correct invoice so that you can prevent attaching it to a wrong invoice.

heady kettle
#

but how do I add it, when Invoice itself is not created.

knotty hollow
#

That's why I advise you to listen to invoice.created event, this event is fired when an invoice is created and you can get the ID from the invoice object in this event

heady kettle
#

got it

#

can you tell me when will the upcoming Invoice be generated ?

knotty hollow
#

Occurs X number of days before a subscription is scheduled to create an invoice that is automatically charged—where X is determined by your subscriptions settings.