#anthonyg-nothing-to-invice

1 messages · Page 1 of 1 (latest)

slow ruin
near island
#

I'm seeing what it is actually.

#

But

#

No invoice items to add to the invoice.

#

I was trying to create the invoice first so taht I could reate invoice items and them to it

#

To insure that the items I was creating get to the correct invoice and not the upcoming one

#

Since the invoice I'm trying to create is a one off invoice while the sub is paused and on trial

#

Not paused, sorry, just on trial

#

So how do I insure the invoice items get to the correct invoice I'm newly creating?

sly obsidian
#

@near island sorry for the delay, taking over let me read quickly

near island
#

Sure!

sly obsidian
#

It's not possible to create an empty invoice today in our API. You have to have at least one pending invoice item for this to work

near island
#

Ok, so if I create the items and then the invoice and have both associated with the same sub, will the system be sure to put the items on the newly created invoice? Reason I ask is because when I put the items in before the invoice they first go to the next upcoming invoice after teh sub is set to end trial.

#

I will try and add the invoice after and see what happens.

sly obsidian
#

1/ Create an invoice item (or have one already)
2/ Create an invoice (pulls the invoice item(s) in it)
3/ Create new invoice items and pass invoice: 'in_123' to add those new ones to the invoice you created at step #2

near island
#

So is step one a dummy invoice item? Can I not do step 1 and 3 before step 2, or will that not insure they all get onto the invoice created in step 2

sly obsidian
#

you can do 1 and 3 before 2 if you want yes. You just risk the bad luck of "something else happens that creates an invoice and pull those automatically without you realizing it" such as the subscription renewing

near island
#

Right, yeah, that's (well not that exactly, but something like that) is what I was worried about.

#

The sub is on trial though when I'm doing this 100% of the time, so there's no worry of it renewing.

sly obsidian
#

famous last words :p

near island
#

hahaha

sly obsidian
#

but yes it's totally fine to
1/ Create all invoice items one by one
2/ Create the invoice to unify them all

near island
#

Ok yeah, that worked perfectly.

#

So even if the sub is in trial and I create a one off invoice I'm seeing that it will auto_advance (finalize and process). I don't have to do that manually?

#

Just wanted to make sure there was nothing different about the process if the sub was in trial vs not.

sly obsidian
#

correct

near island
#

So I manually tried to finalize the invoice I just created and it's set now as Open status and payment in displaying as Incomplete. What exactly does that all mean? in_1Jv835K4OwuAC0l7G4NVOG1E

sly obsidian
#

just means we haven't attempt to charge yet it's all async

near island
#

ok, so that will happen automatically in 1 hour unless I manually also call the pay endpoint on it?

sly obsidian
#

correct

near island
#

ok. It's saying something like will retry in 1 hours, so I was a little confused.