JavaScript
Properties
When to Fire
- When card is declined
- When insufficient funds error occurs
- When Stripe
invoice.payment_failedwebhook fires
Stripe Webhook
Maps toinvoice.payment_failed.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Track when a payment attempt fails.
window._upstack('track', 'payment_failed', {
accountId: 'acct_abc123',
invoiceId: 'inv_ghi012',
subscriptionId: 'sub_def456',
amount: 9900,
failureReason: 'card_declined',
failureCode: 'insufficient_funds',
currency: 'USD'
});
| Property | Type | Required | Description |
|---|---|---|---|
| accountId | string | Yes | Account identifier |
| amount | number | Yes | Failed payment amount in cents |
| invoiceId | string | No | Invoice identifier |
| subscriptionId | string | No | Subscription identifier |
| failureReason | string | No | Failure reason code |
| failureCode | string | No | Detailed failure code |
| currency | string | No | ISO 4217 currency code |
invoice.payment_failed webhook firesinvoice.payment_failed.
Was this page helpful?