> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stash.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Stash Webhooks

> Learn about Stash webhooks - automated notifications sent to your backend when events occur across Stash products. Understand how to configure webhooks in Stash Studio and handle webhook events for player interactions, purchases, and more.

Webhooks are automated notifications that Stash sends to your backend when certain events occur in Stash products.
They are a core component of integrating Stash Pay and Stash Webshop. When an event is triggered—such as a player
making a purchase—Stash sends an HTTP POST request (with a JSON payload) to the webhook URL you've configured in
Stash Studio.

Common webhook event examples include:

* Purchase completed successfully
* Items added or removed from cart
* User views a product
* Payment intent created
* Subscription created, renewed, or canceled

By handling these webhook notifications, your backend can:

* Grant items to players after successful purchases
* Track user behavior and analytics
* Maintain synchronization between your game and Stash
* Manage subscription access and renewals
* Process refunds and handle edge cases

The following diagram illustrates a typical webhook flow:

```mermaid theme={null}
sequenceDiagram
participant User as User
participant Stash as Stash Server
participant Backend as Your Backend

User->>Stash: Completes action (purchase, etc.)
Stash->>Backend: Sends webhook notification
Backend->>Backend: Process event (grant items, etc.)
Backend-->>Stash: Returns 200 OK
```

## Webhook formats

Stash webhooks use two payload formats:

### v1 format (existing)

Used by purchase and webshop events (`PURCHASE_SUCCEEDED`, `MUTATE_CART`, etc.). These use uppercase event types with camelCase nested objects:

```json theme={null}
{
  "type": "PURCHASE_SUCCEEDED",
  "purchaseSucceeded": { ... }
}
```

### v2 format (new)

Used by subscription events (`subscription.created`, `subscription.canceled`, etc.). These use lowercase dot-notation event types with a `data` object:

```json theme={null}
{
  "type": "subscription.created",
  "data": { ... }
}
```

**New webhook events will use the v2 format.** Your webhook handler should support both formats. See the [Webhook List](https://docs.stash.gg/guides/get-started/stash-webhooks/webhook-list.md) for detailed payload examples.

## Configure webhooks

[Configure webhooks](https://demo.arcade.software/cr202HXWmXvGNvRfejst?embed\&embed_mobile=tab\&embed_desktop=inline\&show_copy_link=true)

Interactive Demo

To start receiving webhooks, you need to set them up in your Stash Studio project settings:

**1. Open your project**

Open your game project in Stash Studio.

**2. Navigate to Settings**

Go to the **Settings** section in the main navigation.

**3. Configure Webhooks**

Click on **Webhooks**.

Here, you can add a new webhook by entering the URL of your webhook listener endpoint. Stash Studio will also provide you with a unique webhook secret, which you should use to verify the signature of each incoming webhook message.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.