Skip to content
MothershipDevelopers

Webhook eventsInvoices

Invoice updated

Sent when anything on an invoice changes, such as a line item, a payment, a credit or its status.

EVENTinvoice.updated
POST to your endpointSigned with HMAC-SHA256Retried for up to 4 daysPermission to read invoices
RequestPOSThttps://your-server.example.com/webhooks/mothership
Content-Type:application/json
X-Mothership-Signature:7d368604e73b074fbcedef1d759d5fa4114be7b1dfe76d63e7c039658697fdde
X-Mothership-Delivery-Id:3f6c1a9e-8b2d-4c7a-9e15-2d8b7f4a6c01
{
: "invoice.updated",
: {
: {
: "9d8c7b6a-5f4e-4d3c-8b2a-1f0e9d8c7b6a",
: "MSI123456",
: "open",
: "shipment",
: "MS123456",
: 47500,
: 47500,
: "usd",
: "2026-11-07T15:04:05.000Z",
: "2026-10-08T15:04:05.000Z",
: "2026-10-09T18:22:10.000Z"
}
},
: "2026-10-08T15:04:05.000Z",
: 1,
: 16
}

Hover a key to see what it means. Click it to jump to the field.

Sent when anything on an existing invoice changes: a line item, a payment, a credit or its status. It comes with every change after creation, so subscribing to it alone catches everything.

Finserv records one change as several steps a few seconds apart, such as a payment and then the new balance. Mothership waits until an invoice has gone about 8 seconds without a change, then sends each event that applies once, with the invoice as it is then. A payment that settles an invoice sends one invoice.status.updated, one invoice.paid and one invoice.updated.

Add invoice.updated to a configuration's subscribedEvents with Create a webhook configuration or in the dashboard. The token needs permission to read invoices. Without it, the request answers 403 MISSING_PERMISSION, and opening or resending these deliveries in the dashboard is refused too. Such a token can still remove the event from a configuration.

Event data

data · 1 keys
  • invoiceobject

    The invoice as it is when Mothership sends the event, named as Retrieve an invoice names it. Call that with invoice.id for line items, payments and credits.

  • eventTypestring

    The event. Always invoice.updated here. Route on it, and answer 2xx to types you don't handle.

  • sentAtstring

    When Mothership queued the event to send, as an ISO 8601 string in UTC. Every retry and resend carries the same value, so it does not say when this attempt went out.

  • deliveryAttemptinteger

    Which send of this event this is, starting at 1. Resends from the dashboard count too.

  • pendingRetriesinteger

    How many automatic attempts are left if this one fails. 0 on the last one.

Related