Below you will find all the information you need to know about gifting with Fourthwall.
1. How to enable Streamelements gifting
- Go to Twitch Gifting App in your Fourthwall admin dashboard
- Select Streamelements gifting radio button and ensure your shop is connected with Streamelements
- Click on the
Enable checkbox to enable the Twitch Gifting App
2. Webhook configuration
Go to Webhook Settings and create webhooks for:
GIFT_DRAW_STARTED
GIFT_DRAW_ENDED
3. How to start Gift Draw
First, ensure your stream is live:
PUT https://api.fourthwall.com/open-api/v1.0/streaming/start
Authorization: Basic {credentials}
Content-Type: application/json
{
"services": [
{
"type": "TWITCH",
"broadcasterId": "test-broadcaster-id",
"broadcasterLogin": "raziosx",
"thumbnailUrl": "test-thumbnail-url"
}
]
}
Then go to your shop main page and purchase any product as a gift. This will trigger the Gift draw started webhook event.
4. How to finish Gift Draw
Send a request to finish the draw:
PUT https://api.fourthwall.com/open-api/v1.0/gifting/draw/{drawId}/finish
Authorization: Basic {credentials}
Content-Type: application/json
{
"participants": [
{
"service": "TWITCH",
"userId": "{twitchWinnerUserId}",
"userName": "{twitchWinnerUserName}"
}
]
}
The response will include the winner details along with the redeem URL. The Gift draw ended webhook will also be triggered.
Gift draws not finished within the configured time (+ 1 minute) will be automatically finished without winners to allow redoing the draw.