Getting started #
This guide covers the starting steps for configuring Pragma to process orders setup with a supported provider.
- Set up store with a supported provider.
- Configure an Order Provider Plugin.
- Define the Order Mappings content catalog.
1. Set up store with a supported provider #
Before integrating with Pragma Engine, you’ll need to set up an account with a supported provider. For more information on setting up stores with a provider’s system, refer to their respective documentation.
You can map an order to ownership of a Steam application or inventory item.
You can map an order to any type of Epic offer.
Setup Twitch drops.
2. Configure the Order Provider Plugin #
Add the order provider plugins under the social config.
Requirements:
- Each order provider configured must also be configured as a identity provider.
- You must allow users to log in with this provider and/or link their account.
- The credentials configured for both plugins must be the same. Use shared config to avoid miss-configuration.
social:
shared:
configs:
Steam:
class: "pragma.shared.SteamCredentialsConfig"
config:
appId: "[steam-app-id]"
steamWebAPIKey: "[encrypted-steam-web-api-key]"
Epic:
class: "pragma.shared.EpicCredentialsConfig"
config:
clientId: "[epic-client-id]"
clientSecret: "[encrypted-epic-client-secret]"
deploymentId: "[epic-deployment-id]"
sandboxId: "[epic-sandbox-id]"
Twitch:
class: "pragma.shared.TwitchCredentialsConfig"
config:
clientId: "[twitchClientId]"
clientSecret: "[encrypted-twitch-client-secret]"
pluginConfigs:
ThirdPartyNodeService.orderProviderPlugins:
plugins:
Steam:
class: "pragma.order.SteamOrderProviderPlugin"
config:
sharedConfigKey: "Steam"
Twitch:
class: "pragma.order.TwitchOrderProviderPlugin"
config:
sharedConfigKey: "Twitch"
gameId: "{twitchGameId}"
Epic:
class: "pragma.order.EpicOrderProviderPlugin"
config:
sharedConfigKey: "Epic"
clawbackPollingEnabled: true # enables refund processing
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.
You can implement your own custom Order Provider Plugin. See the Create a Custom Order Provider Plugin guide for details.
3. Define the Order Mappings content catalog #
Once you have setup your store, you can create a orders mapping content catalog. This will map the provider’s identifiers with a unique Pragma identifier. This lets you map orders across providers to the same grant.
Requirements
skuIdmust be unique.- a source can only map to one skuId.
- a skuId can contain multiple sources of the same type. For example you can have three different Steam applications map back to the same sku.
Below is an example with Steam, Epic, and Twitch sources mapped to a single Pragma sku.
The content catalog must be defined in the OrderMappingsSpecs.json file.[project]/content/src/OrderMappingsSpecs.json
[
{
"skuId": "SmallGoldBundle",
"sources": [
{
"provider": "STEAM",
"steamSource": {
"inventory": {
"itemDefId": "475"
}
}
},
{
"provider" : "EPIC",
"epicSource" : {
"entitlement" : {
"audienceItemId" : "231f97b3e1a44fb7b496e1832ec6b3d6"
}
}
},
{
"provider": "TWITCH",
"twitchSource": {
"rewardId": "twitch_item_drop"
}
}
]
}
]
Run the content apply command to validate and generate content catalogs.
./pragma content apply
Next steps #
You are now ready to define the fulfillment grants.

