Integrating with Steam #
Set up the store #
You can map a Pragma order to a Steam inventory item or an application id.
Plugin configuration #
Once you have setup your application and store in Steam, you are ready to configure Pragma. You can configure through the shard config file or using the social operator portal.
Check out the Steam’s auth documentation to learn how to generate a Steam’s web key.
social:
# a SteamCredentialsConfig can be shared with:
# SteamIdentityProviderPlugin and SteamOrderProviderPlugin
shared:
configs:
Steam:
class: "pragma.shared.SteamCredentialsConfig"
config:
appId: "[steam-app-id]"
steamWebAPIKey: "[encrypted-steam-web-api-key]" # encrypted value
pluginConfigs:
ThirdPartyNodeService.orderProviderPlugins:
plugins:
Steam:
class: "pragma.order.SteamOrderProviderPlugin"
config:
sharedConfigKey: "Steam" # required when using shared config
AccountService.identityProviderPlugins:
plugins:
Steam:
class: "pragma.account.SteamIdentityProviderPlugin"
config:
sharedConfigKey: "Steam" # required when using shared config
playerLoginEnabled: true
accountLinkingEnabled: true
accountLinkingCooldownInDays: 30
Any configuration set through the portal will override any values assigned in a config yml file.
- Do not manually encrypt any secrets. The API automatically encrypts all sensitive values during submission.
- You only need to enter credential values in one form. Portal will store credentials under shared config.
Order provider configuration #
- Navigate to the Order Providers page: select the
CommerceTab →Order Providersin side menu. - Select platform to configure and fill out the form.
- Click
Confirmto see changes. - Click
Deployto apply changes.
Id provider configuration #
- Navigate to the ID Provider page: select the
AccountsTab →ID Providerin the side menu. - Select a provider and fill out the form.
- Click
Confirmto see changes. - Click
Deployto apply changes.
Order mapping example #
The content format for a Steam inventory item and application are different. Follow examples below when adding order mapping content.
Order mapping example for a inventory item:
[project]/content/src/OrderMappingsSpecs.json
{
"skuId": "SmallGoldBundle",
"sources": [
{
"provider": "STEAM",
"steamSource": {
"inventory": {
"itemDefId": "[item-def-id-from-steam-catalog]"
}
}
}
]
}
Order mapping example for a application id:
[project]/content/src/OrderMappingsSpecs.json
{
"skuId": "SmallGoldBundle",
"sources": [
{
"provider": "STEAM",
"steamSource" : {
"ownership" : {
"appId" : "[application-id]"
}
}
}
]
}
Run the content apply command to validate and generate content catalogs.
./pragma content apply
Testing #
To test order processing on a local or dev environment there are a couple of things you can do to make things easier.
Link a Steam account to a Unsafe account using the player portal #
- This lets you authenticate and call the fulfill orders API through a unsafe account vs having to login with a Steam account.
- You can use the Postman collection for this flow.
Grant items to the Steam account using the Add Item API #
- This API lets you grant items without going through the Steam store. Use this when you want to test the Pragma processing and not Steam’s payment flow.
Refunds and charge backs #
Steam does not support refunds on inventory items that have been consumed. If Pragma has recorded an order for a Steam inventory item, it has been consumed and can not be returned.

