Overview
Theinvoice.created webhook is triggered when a new invoice is created in your Metrifox account. Invoices are generated for subscriptions, orders, and other billable events.
When It’s Triggered
This event is sent immediately after an invoice is successfully created, which can happen when:- A subscription billing cycle starts (recurring invoice)
- An order is completed and invoiced
- An invoice is created manually
- An invoice is generated through the API
Payload Structure
Data Fields
Thedata.invoice object contains the complete invoice record, including:
id: Internal invoice IDinvoice_number: Human-readable invoice numbercustomer_id: ID of the customer this invoice is forcustomer_key: Customer keysubscription_id: ID of the subscription (if applicable)order_id: ID of the order (if applicable)status: Invoice status (e.g., “open”, “paid”, “void”, “draft”)total_amount: Total invoice amount including taxessubtotal: Subtotal before taxestax_amount: Total tax amountcurrency: Currency code (e.g., “USD”, “NGN”)due_date: Date when the invoice is dueissued_at: Timestamp when the invoice was issuedtenant_id: The tenant ID this invoice belongs toline_items: Array of invoice line items with descriptions, quantities, and pricescreated_at: Timestamp when the invoice was createdupdated_at: Timestamp when the invoice was last updated- Additional invoice-specific fields
Example Use Cases
- Send invoice emails to customers
- Sync invoices to your accounting system
- Update financial records
- Trigger payment processing workflows
- Track revenue and billing analytics
- Generate invoice PDFs

