Invoice not generated for a new subscription after immediate cancellation

10 views
Skip to first unread message

Vivek Manpuria (Vivek)

unread,
Sep 8, 2025, 2:52:43 AM (yesterday) Sep 8
to Kill Bill users mailing-list
Dear Team,

In the following scenario, Killbill logs indicate that an invoice is generated but the invoice does not show up in Kaui.

Step 1: Call Create Subscription API for plan A
Step 2: Observe Invoice in Kaui for plan A.
              Observe INVOICE_CREATION event
              Observe log indicating Payment method is not set
Step 3: Call Cancel Subscription API (immediate cancel - partial credit)
Step 4: Call Create Subscription API for plan A
Step 5: Observe Killbill logs a message indicating invoice was generated, "Generated invoiceId='c2a3437b-298e-4c15-8915-366c46670e45', numberOfItems='2', accountId='..."
Step 6: Observe invoice with id c2a3437b-298e-4c15-8915-366c46670e45 is not visible in Kaui nor is it retrievable via API which returns a Not Found error.
Step 7: Observe, no INVOICE_CREATION event.

It appears that if the account has a partial credit, no new invoice is generated when new subscriptions are created.

Thank you,
Vivek

stephane brossier

unread,
2:27 AM (18 hours ago) 2:27 AM
to Vivek Manpuria (Vivek), Kill Bill users mailing-list
In step 6, how do you 'observe'  invoice with id c2a3437b-298e-4c15-8915-366c46670e45 ? Are you seeing it in the database?

--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/killbilling-users/47481a18-ea68-48ab-be3d-5681eaabe087n%40googlegroups.com.

Vivek

unread,
2:28 AM (18 hours ago) 2:28 AM
to stephane brossier, Kill Bill users mailing-list
Hi Stephane,

I clicked on the "Invoices" tab in Kaui but the invoice mentioned in Step 6 was not there. I have attached a screenshot of the invoices tab.

The "/1.0/kb/invoices/<invoice-id>" api too returned a 404 Not Found for that invoice id with the following response:

{
"className": "org.killbill.billing.util.callcontext.InternalCallContextFactory$ObjectDoesNotExist",
"code": null,
"message": "Object id=39433ea1-1a0a-4289-935c-f362f8132da1 type=INVOICE doesn't exist!",
"causeClassName": null,
"causeMessage": null,
"stackTrace": []
}

I also noticed the following issues:
  1. only the 1st subscription (Step 1) has a CTD. For the subsequent subscription (Step 4), neither an invoice was generated nor the CTD was set. I have attached a screenshot of the subscriptions tab.
I have also attached a screenshot of the payments tab showing the payment failure (Step 2).

Thank you,
Vivek

invoices-tab.png
payments-tab.png
subscriptions-tab.png

Vivek

unread,
2:28 AM (18 hours ago) 2:28 AM
to stephane brossier, Kill Bill users mailing-list
Hi Stephane,

The invoice with id "c2a3437b-298e-4c15-8915-366c46670e45" does not exist in the DB.

The /1.0/kb/invoices/c2a3437b-298e-4c15-8915-366c46670e45 API call response is:
404 Not Found
{
"className": "org.killbill.billing.util.callcontext.InternalCallContextFactory$ObjectDoesNotExist",
"code": null,
"message": "Object id=c2a3437b-298e-4c15-8915-366c46670e45 type=INVOICE doesn't exist!",
"causeClassName": null,
"causeMessage": null,
"stackTrace": []
}

Thank you,
Vivek

Reply all
Reply to author
Forward
0 new messages