Hi,
I'm trying to use KillBill to manage subscriptions for my platform where the subscriptions are paid via an in-app currency. I'm trying to accomplish this via setting the MANUAL_PAY tag on all accounts and listening for invoice created push notifications for future transfers.
1. Before a subscription is created, transfer the in app currency in my code and then create the subscription in KillBill. I want to give the user immediate access to the subscription and don't want to wait for KillBill to generate an invoice.
2. For subscription renewals - listen to the invoice created event, transfer the in app currency and then mark the invoice as paid in KillBill.
An issue I'm running into now with (1) - when the subscription is created (but already paid for), KillBill will still generate the "invoice created" webhook. I need some way to differentiate between invoices generated from the subscription creation and subscription renewal - is there a good way to do this via the invoice created hook? Is there a way to attach metadata to the invoices when creating a subscription or a field I am missing?