Hooks API

Web Hook

DeactivateDiscount4

Deactivate a coupon code that Bubblehouse previously created.

Kind Mutation Hook
Method POST
URL The webhook URL you specify, with :name replaced by DeactivateDiscount4
Authentication JWT HS256 Bearer token

Bubblehouse calls this hook when a coupon code should no longer be usable, such as after a redeemed coupon expires.

If redeemed coupon expiration is enabled for your Bubblehouse store, your system must either enforce the end_time value in CreateDiscount4 or subscribe to this hook. If you implement this hook, Bubblehouse may call it as a defensive cleanup step even when end_time was also provided.

Input

  • venue_id bubbleflake optional

    Bubblehouse venue ID associated with the coupon code.

  • type string? optional

    The coupon type, when known.

  • code string? optional

    The coupon code string to deactivate.

  • code_id string? optional

    The external ID returned by CreateDiscount4, if any.

  • extras object? optional

    Additional metadata returned by CreateDiscount4, such as a stack ID.

Output

A successful response has no meaningful properties and only contains an ok property always set to true:

{"ok": true}
Previous
CreateDiscount4