Take a deeper dive into the technical details of using Twitch Commerce to sell your games and items on Twitch. What are the options and tradeoffs? What code do you need to write? Come on in! The water's fine.
Jon Pulsipher, Integration Success Engineer, Twitch
3. What we’ll cover
• Why sell your games on Twitch
• What options we offer for commerce…
• …and how you should choose between them
• …and the technical work involved
• How to get started
21. Game Library Integration
• You give us the game bits
• We publish them (and future updates)
• Simplest way to sell your game on Twitch
• Optionally, you can use the SDK
• Runtime entitlement check
• In-game commerce
22. Twitch Commerce SDK
• C++ SDK
• Check for Twitch Entitlement Service entitlements from your client
• Build an in-game store that sells items through the Twitch Commerce system
• Ensure a signed in Twitch user is running the game from the Twitch App
24. Account Linking Best Practices
• Scopes: think broadly
• Use the Authorization Code Flow
• Store both access and refresh tokens
• Handle auth failures (40x)
• retry, refresh, re-link
• Support unlinking from your side
Reference: https://dev.twitch.tv/docs/authentication
Sample code: https://github.com/TwitchDev/authentication-samples
Forums: https://discuss.dev.twitch.tv
25. Twitch Entitlement Service
Customer
Viewing Channel
Page
Twitch Your Game Server
Customer buys
item and
completes
purchase flow
Twitch stores
entitlement info
for user
Instructions on
Thank You page
to claim item
TES
26. Twitch Entitlement Service
Customer
Viewing Channel
Page
Twitch Your Game Server
Customer buys
item and
completes
purchase flow
Twitch stores
entitlement info
for user
Instructions on
Thank You page
to claim item
TES
Link Twitch Acct
Get list of goods
Store Oauth
tokens
/commerce/user/goods
Parse list for
“Fulfill” or
“Revoke”
{
"goods": [
{
"receipt_id": "b8018fd4-9d8b-45b7-87e1-cfd6fdc1d8ed",
"sku": "AmazingGame_001",
"next_instruction": "NOOP"
},
{
"receipt_id": "7dc926fe-75bb-41e3-ad83-a99ed5b00d3e",
"sku": "SuperFunPack_001",
"next_instruction": "REVOKE"
},
{
"receipt_id": "6a1b755e-7703-46ce-8464-7eae4802a4e3",
"sku": "AnotherSuperFunPack_002",
"next_instruction": "FULFILL"
}
]
}
Complete fulfill/
revoke actions
Call Fulfill
endpoint
Game/item
entitlement
/commerce/user/fulfill
28. Next Steps
• Engage with our Business Development team
• Register your app on dev.twitch.tv
• We’ll provide additional documentation and support
• Explore your goals and the best option for your game and
your business