Hooks API
Web HookDeactivateDiscount4
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
-
Bubblehouse venue ID associated with the coupon code.
-
typestring? optionalThe coupon type, when known.
-
codestring? optionalThe coupon code string to deactivate.
-
code_idstring? optionalThe external ID returned by CreateDiscount4, if any.
-
extrasobject? optionalAdditional 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}