+31 (0) 20 760 2040 info@spilgames.com

Dynamic promotions


In case you are using Dynamic Pricing you should skip this step.


Dynamic Promotions are promotions which do not require any registration on our system, you are able to generate them from the front-end. From our side, when we receive such a promoted transaction we directly contact your back-end, at the URL that you have provided to us as “verification URL”, providing the information below:


Value Definition
 In this case you will receive as method name: “promotion”
 This is the value that you should use as a unique identifier for a user.
For more information about GUID look here. This value is added by us.
 The username that you have pass to us.
 The SKU that get’s the promotion.
 The amount of the SKU without the promotion applied.
 The multiplier that we apply for the promotion.
 The hash that we use on the transactions.


If we receive an [OK] as a reply from your side we grant the promotion, otherwise we process the transaction without the promotion.

Trigger a Dynamic Promotion 

In your client instance, just before the showPaymentSelectionScreen() method, overwrite the onOpen event, as shown in the following example:

client.onOpen = function() {
    client.showPromotion({multiplier:1.7}); // 70% extra SKU amount
Name Type Mandatory? Definition
multiplier numeric Yes

Calculates the extra SKU amount you assign to the promotion.It accepts numeric values:

  • A value of 1 equals to 100% SKU amount, i.e. a promotion with multiplier:1 does not add any extra SKU to the package.
  • A value higher than 1 adds extra SKU to the promotion.
For example:
multiplier:1.7 increases the SKU amount by 70% (0.7).


You cannot set up a new promotion for a specific game/site combination while an existing promotion targeting the same site/game combination is running.


All code examples are syntactically correct, but they use dummy data values.
When you copy-paste these examples, make sure you replace the dummy data with actual, valid data.

Dynamic promotion

The method in the example below takes an object as its first and only argument. The object is a simple key-value representation of the parameters used to determine the content of the payment selection screen.

var client = new PaymentClient();
var options = {
    'siteId': 1,
    'gameId': 1,
    'userId': 'john.doe',
    'token': 'example-token-1234',
    'params': 'action=payment&source=spilgames',
    'selectedSku': 'greendiamonds'

// Optional: active dynamic promotion
client.onOpen = function() {
    client.showPromotion({multiplier:1.7}); // 70% of extra sku