Skip to main content
WEBHOOK

Body

application/json

Purchased credit was already spent when its money came back.

cause
string
required

PAYMENT_DISPUTED (lost to a dispute or chargeback), PAYMENT_REVERSED (a failed collection clawed back), PAYMENT_REFUNDED (a payment refunded without a credit note, at the provider or as an overpayment, after the credit it backed was spent) or CREDIT_NOTE_REFUNDED.

credit_taken_back
integer<int64>
required

Unspent credit taken back from the wallet at the same time, in minor units.

credit_unrecovered
integer<int64>
required

Spent credit this event adds to the loss, in minor units. A failed collection reopens its invoice, which collects it again; a dispute's loss stays unless the dispute is won. wallet.credit_recovered reports what comes back.

credit_unrecovered_total
integer<int64>
required

The loss of this money flow (an invoice's payments, a credit note, or a payment) once this event applies.

customer_id
string<MeteroidId>
required
Example:

"cus_7n42DGM5Tflk9n8mt7Fhc7"

id
string<MeteroidId>
required
Example:

"evt_7n42DGM5Tflk9n8mt7Fhc7"

timestamp
string<date-time>
required
type
enum<string>
required
Available options:
metric.created,
customer.created,
subscription.created,
subscription.updated,
subscription.cancelled,
subscription.ended,
invoice.created,
invoice.finalized,
invoice.paid,
invoice.voided,
invoice.closed,
invoice.consolidated,
invoice.deleted,
invoice.accounting_pdf_generated,
quote.accepted,
quote.converted,
credit_note.created,
credit_note.finalized,
credit_note.voided,
plan.created,
plan.published,
plan.archived,
product.created,
product.updated,
product.archived,
metric.updated,
metric.archived,
coupon.created,
coupon.updated,
coupon.archived,
addon.created,
addon.updated,
addon.archived,
refund.issued,
refund.settled,
refund.failed,
payment.reversed,
payment.reinstated,
payment.failed,
wallet.funded,
wallet.debited,
wallet.balance_low,
wallet.credit_unrecovered,
wallet.credit_recovered,
wallet.auto_top_up_failed,
wallet.auto_top_up_suspended,
wallet.auto_top_up_consent_changed,
wallet.depleted,
wallet.recovered,
wallet.auto_top_up_cap_reached,
credit_grant.expired,
entitlement.usage_threshold_reached,
entitlement.limit_reached,
budget.threshold_reached,
budget.exceeded,
entitlement.too_many_groups
credit_note_id
string<MeteroidId> | null

The refund credit note that caused the loss; absent for a reversed payment.

Example:

"crn_7n42DGM5Tflk9n8mt7Fhc7"

credit_unit
string | null

The credit unit (its code) the amounts are in; absent for a currency.

credit_unit_precision
integer<int32> | null

Decimal places of credit_unit: amounts are integers of 10^-precision credit.

Required range: x >= 0
currency
string | null

Absent when the amounts are in a credit unit.

invoice_id
string<MeteroidId> | null

The invoice whose money bought the credit; absent for a payment no invoice took (a plan-change payment kept as credit).

Example:

"inv_7n42DGM5Tflk9n8mt7Fhc7"

payment_id
string<MeteroidId> | null

The payment whose reversal or reinstatement moved the loss; always set when invoice_id is absent.

Example:

"pay_7n42DGM5Tflk9n8mt7Fhc7"

Response

200

Webhook received successfully