Metrics: total spend from Stripe's charges, as Stripe counts it
Customers who paid without an invoice (one-off Checkout payments) were missed, and the Stripe card counted every customer record, deleted ones too. The sync now reads charges (and follows their events); a customer's total spend is their successful charges, captured less refunded. A database synced before reads everything once (sync state version 2). Until charges are in, paid invoices less refunds stand in. The Stripe card's Customers now counts those who spent more than $0, "of N in Stripe", and a Payments count is added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -227,7 +227,8 @@ var EventTypes = []string{
|
||||
"customer.created", "customer.updated", "customer.deleted",
|
||||
"invoice.created", "invoice.finalized", "invoice.updated", "invoice.paid", "invoice.voided", "invoice.marked_uncollectible",
|
||||
"credit_note.created", "credit_note.updated", "credit_note.voided",
|
||||
"refund.created", "refund.updated", "charge.refunded",
|
||||
"refund.created", "refund.updated",
|
||||
"charge.succeeded", "charge.captured", "charge.updated", "charge.refunded", "charge.failed",
|
||||
}
|
||||
|
||||
// Event is one change, with the object as it was after it.
|
||||
|
||||
Reference in New Issue
Block a user