Skip to content

Webhook fires subscriptions event on failed payment #352

@m0nk3y33

Description

@m0nk3y33

Describe the bug
Webhook fires a gift_subs event even when the payment for gift subs fails (either on the provider's side or due to a bank rejection). The event is triggered twice, reporting that a user sent 10 gitf subs - despite the transation never completing. No trace of the transaction apperars in the moderation logs on the platform side.

To Reproduce

  1. Attempt to send gift_subs (in that case 10x) via button on stream.
  2. Have a payment fail (bank rejection or payment provider error) - no successful transaction occurs.
  3. Observe that webhook fires twice (because after a failed attempt he tried again) with a gift_subs event for that user and quantity, as if the gift subs were successfully sent.

Expected behavior
If the payment fails and no gift subs are actually delivered, the webhook should not fire. Events should only be emitted upon confirmed, successful transactions - consistent with what is visible in mod logs.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: N/A (server-side / webhook issue)
  • Browser N/A
  • Version N/A

Additional context

  • Mod logs shows no record of the gift subs being sent.
  • This is a critical issue for integrations that act on webhook events (eg. triggering in-stream rewards, overlays, point systems), as it causes false positives that cannot be reconciled against actual transaction data.
  • At the same time, this is a repeated error becasue it was already there some time ago but the thread was closed:
    Subscribing or gifting a subscription webhook bug #91

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions