# Pally.GG Donation Integration

**URL:** <https://extensions.streamer.bot/t/pally-gg-donation-integration/1142>\
**Category:** Unapproved/Deprecated\
**Created:** [April 3, 2024, 10:16pm UTC](https://extensions.streamer.bot/t/pally-gg-donation-integration/1142 "2024-04-03T22:16:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![geocym](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/geocym/32/452_2.png) [@geocym](https://extensions.streamer.bot/u/geocym)\
**Post date:** [April 3, 2024, 10:16pm UTC](https://extensions.streamer.bot/t/pally-gg-donation-integration/1142/1 "2024-04-03T22:16:57Z")

</div>

# Pally.GG Donation Integration

[Pally.gg](https://pally.gg) is a donation platform for your stream that allows you to split your revenue with your mods (or anyone you like) and lets your viewers leave an optional message with their donation.

This extension adds a trigger into Streamer.bot to hook into their Websocket API so you can read the incoming donations and messages into your actions.

## Installation

#### API Setup

You will need to create an API key on their dashboard - [API Key Dashboard](https://pally.gg/dashboard/settings/api-keys)

More information can be found on their [Developers Documentation](https://docs.pally.gg/developers/websockets#campaigntip-notify)

#### Streamer.Bot Setup

Drag and drop the `Import File` into Streamer.bot  
[PallyGG.sb](https://extensions.streamer.bot/uploads/short-url/eyvB58T3BcIHt6gTbRtDtUgdjbX.sb) (4.7 KB)

* * *

This should add 4 actions and a Websocket Client to your bot;

| Action | Description |
| --- | --- |
| Pally Connect | Enables the Heartbeat Timed Action that sends a keep-alive ping every 50 seconds |
| Pally Disconnected | Reconnects the Websocket Client automatically if it fails |
| Pally Heartbeat | Keeps the Websocket Client open |
| Pally Donation | Ingests the incoming donation message and deserializes it into usable arguments |

#### Websocket Client

Open up the **Websocket Clients** tab under **Servers/Clients**

 ![image](https://extensions.streamer.bot/uploads/default/original/2X/a/a292b91ddee50ed96e4e66ef0293beaac8331a6f.png)

Double-Click on the _ **pally.gg** _ entry and replace `YOUR_API_KEY` with the key you generated earlier

The setup assumes that the Websocket Client is the first one in the list. If this is not the case the C# code in each of the actions will need to be modified to point to the correct index

If they are not already set, ensure `Auto Connect on Startup` and `Reconnect on Disconnect` are both ticked. This will ensure the trigger is always running ready to receive donation messages.

Right click the Websocket Client and click **Connect** , if everything has been done correctly the Status will change to `Open`

 ![image](https://extensions.streamer.bot/uploads/default/original/2X/5/53569de249b350e4fc766e84ce4822917cfc932f.png)

* * *

#### Building your action

The system is now technically ready to receive messages, you need only build out your Streamer.bot action to do something with the data it is pulling in.

The C# code in the the `Pally Donation` action decodes the websocket message into the following variables:

| Argument | Description |
| --- | --- |
| pallyCreated | Date-Time of the donation |
| pallyUpdated | Uhhh not sure - seems to be the same at the Created Time |
| campaignID | serial number of the pool that received the donation |
| displayName | The name entered by the donator (Not sure if this is goes through the bad words filter or not) |
| grossAmountInCents | The full amount in cents that was donated |
| netAmountInCents | The amount in cents the stream team will receive after processing fees |
| processingFeeInCents | The amount in cents deducted for processing fees |
| pallyMessage | The message sent with the donation |

* * *

All of these can be used just like any other variable by surrounding them in % symbols in sub-actions placed below the C# sub-action

---

<div class="post-metadata">

**Author:** ![pwnyy](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/pwnyy/32/2970_2.png) [@pwnyy](https://extensions.streamer.bot/u/pwnyy)\
**Post date:** [April 4, 2024, 12:42am UTC](https://extensions.streamer.bot/t/pally-gg-donation-integration/1142/2 "2024-04-04T00:42:55Z")

</div>

Afaik, the Pally should already be in contact with Nate or someone else of the admins figuring out how to get it natively integrated. At least that was my last update, I can however ask the dev about it again if they contacted Nate

---

<div class="post-metadata">

**Author:** ![geocym](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/geocym/32/452_2.png) [@geocym](https://extensions.streamer.bot/u/geocym)\
**Post date:** [July 15, 2024, 1:46pm UTC](https://extensions.streamer.bot/t/pally-gg-donation-integration/1142/3 "2024-07-15T13:46:44Z")

</div>

Yes they were, this was a stopgap before it got native integration.
