mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-08 02:52:12 +00:00
notes
This commit is contained in:
1 parent
bd2e091238
commit
d08753234c
2 files changed
+9
-5
No files matched your search
+1
-1
@@ -40,7 +40,7 @@ For one-off payments (eg. credits packs), we see this typical sequence of events
|
||||
- checkout.session.completed (EventId("evt_1S3guvEobp4xy4TlxY7TVlUs")) -- Can use, but `payment_intent.succeeded` is better
|
||||
- charge.updated (EventId("evt_3S3gutEobp4xy4Tl1RgfG4NL")) -- IGNORE
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
#[derive(Serialize)]
|
||||
|
||||
+8
-4
@@ -10,14 +10,18 @@ pub fn ignore_known_unwanted_events(webhook_payload: &Event) -> Option<StripeArt
|
||||
match webhook_payload.data.object {
|
||||
EventObject::ChargeSucceeded(_) => {
|
||||
// charge.succeeded - building block event and also used for older legacy integrations.
|
||||
// Use `invoice.paid` as billing success signal for subscriptions instead.
|
||||
// Suggested also to use `payment_intent.succeeded` for add-on purchase
|
||||
// Use `invoice.paid` as billing success signal for subscriptions.
|
||||
// Use `payment_intent.succeeded` for one-off and add-on purchases.
|
||||
}
|
||||
EventObject::ChargeUpdated(_) => {
|
||||
// This doesn't track the payment status, and we don't care about fraud, risk,
|
||||
// receipt, etc. updates.
|
||||
}
|
||||
EventObject::CustomerCreated(_) |
|
||||
EventObject::CustomerDeleted(_) |
|
||||
EventObject::CustomerUpdated(_) => {
|
||||
// Only necessary if we want to know about customer object metadata changes,
|
||||
// e.g. their stripe email.
|
||||
// We don't need to know about Stripe customer object metadata changes,
|
||||
// eg. stripe email change.
|
||||
}
|
||||
EventObject::PaymentIntentCreated(_) => {
|
||||
// Not very actionable for us. We only care about successful payments.
|
||||
|
||||
Reference in new issue
Block a user