Wallet API

The endpoints need to be implemented by the Operator and made available for Nirova to call.

Wallet API is an API to integrate Seamless wallet logic to Nirova. The API works in a manner where Nirova is the consumer and the Operator needs to provide corresponding endpoints based on the following API structures. Wallet API also has its own response status codes available here.

Wallet API Reference

Get user's info


POST /user/info HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 74

{
  "user": "john12345",
  "request_uuid": "583c985f-fee6-4c0e-bbf5-308aad6265af"
}
								

Provides a user's data. The Operator is expected to return all available details.

Header parameters
  • uX-Nirova-Signature - any · required

    • RSA-SHA256 is used to sign the request body using the private key. The signature is validated using the public key associated with the provided operator_id.

Body
  • user - string · min: 4 · required

    • The unique User ID in the Operator’s system. When generating the value, avoid using any real user data, that could be used to identify the person (e.g. full name, phone, email). Minimum value 4 characters.

    • Example: john12345

  • request_uuid - string · optional

    • An ID of an action that is generated for each of our calls to the Operator, used to sync Nirova and Operator sides for debugging purposes, displayed in standard 16-byte UUID format. The Operator has to respond with the same request_uuid as the one received in request.

    • Example: 583c985f-fee6-4c0e-bbf5-308aad6265af

Responses
{
  "user": "john12345",
  "status": "RS_OK",
  "request_uuid": "583c985f-fee6-4c0e-bbf5-308aad6265af",
  "country": "FR",
  "jurisdiction:": "MGA",
  "sub_partner_id": "123_sub",
  "birth_date": "1980-10-20",
  "registration_date": "2010-10-20",
  "tags": [
    "VIP",
    "affiliate"
  ],
  "sex": "MALE",
  "affiliate_id": "124_af"
}

Get user's balance


POST /user/balance HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 152

{
  "user": "john12345",
  "token": "55b7518e-b89e-11e7-81be-58404eea6d16",
  "request_uuid": "583c985f-fee6-4c0e-bbf5-308aad6265af",
  "game_code": "clt_softwareid"
}
								

Called when the user's balance is needed. The Operator is expected to return user's current balance. The Game code is provided to help the Operator with user's activity statistics.

Header parameters
  • uX-Nirova-Signature - any · required

    • RSA-SHA256 is used to sign the request body using the private key. The signature is validated using the public key associated with the provided operator_id.

Body
  • user - string · min: 3 · required

    • The unique user ID in the Operator’s system. In case of DEMO gameplay, this parameter may be omitted.

    • Example: john12345

  • token - string · required

    • The game session token that was passed within /game/url endpoint response.

    • Example: 55b7518e-b89e-11e7-81be-58404eea6d16

  • request_uuid - string · required

    • An ID of an action that is generated for each of our calls to the Operator, used to sync Nirova and Operator sides for debugging purposes, displayed in standard 16-byte UUID format. The Operator has to respond with the same request_uuid as the one received in request.

    • Example: 583c985f-fee6-4c0e-bbf5-308aad6265af

  • game_code - string · required

    • The unique game identifier in Nirova system in the form of a string. game_code can be obtained from the /game/list endpoint.

    • Example: clt_softwareid

Responses
{
  "user": "Jimm123",
  "status": "RS_OK",
  "request_uuid": "583c985f-fee6-4c0e-bbf5-308aad6265af",
  "currency": "USD",
  "balance": 100500
}

Update user's balance based on transaction win


POST /transaction/win HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 566

{
  "user": "john12345",
  "transaction_uuid": "16d2dcfe-b89e-11e7-854a-58404eea6d16",
  "supplier_transaction_id": "41ecc3ad-b181-4235-bf9d-acf0a7ad9730",
  "token": "55b7518e-b89e-11e7-81be-58404eea6d16",
  "supplier_user": "cg_45141",
  "round_closed": true,
  "round": "rNEMwgzJAOZ6eR3V",
  "reward_uuid": "a28f93f2-98c5-41f7-8fbb-967985acf8fe",
  "request_uuid": "583c985f-fee6-4c0e-bbf5-308aad6265af",
  "reference_transaction_uuid": "16d2dcfe-b89e-11e7-854a-58404eea6d16",
  "is_free": false,
  "is_aggregated": false,
  "game_code": "clt_softwareid",
  "currency": "EUR",
  "reward": "zero",
  "amount": 100500,
  "meta": null
}
								

Called when the User wins (credit). The Operator is expected to increase user's balance by amount and return a new balance. The reference_transaction_uuid is used to show to which reward the win is related to. Each win has transaction_uuid which is unique identifier of this transaction. Before any altering of User's balance, Operator has to check that win wasn't processed before. Retry Policy: In case of network fail (HTTP 502, timeout, nxdomain, etc.) we will retry 3 times with 1 sec of timeout. The rest of retry logic is left to provider’s RGS: the retries may continue indefinitely or the reward may be rolled back, and the money returned back to user.

Header parameters
  • uX-Nirova-Signature - any · required

    • RSA-SHA256 is used to sign the request body using the private key. The signature is validated using the public key associated with the provided operator_id.

Body
  • user - string · min: 3 · required

    • The unique user ID in the Operator’s system. In case of DEMO gameplay, this parameter may be omitted.

    • Example: john12345

  • transaction_uuid - string · required

    • The unique transaction identifier. An ID of business logic action (transaction) that needs to be stored on both sides for at least 4 months (for reconciliation purposes). Operator has to respond on each transaction_uuid. An action with same transaction_uuid shouldn't be processed more than once.

    • Example: 16d2dcfe-b89e-11e7-854a-58404eea6d16

  • supplier_transaction_id - string · required

    • The transaction identifier received from the game Supplier. This identifier will be used to investigate any issues via customer support tickets.

    • Example: 41ecc3ad-b181-4235-bf9d-acf0a7ad9730

  • token - string · required

    • The game session token passed within the /game/url endpoint response.

    • Example: 55b7518e-b89e-11e7-81be-58404eea6d16

  • supplier_user - string | null · required

    • The name of the user in the Provider’s system. In case Operator needs to find a user in Provder’s back office or report a problem with the user. If the value is NULL, the Operator can search for their own user_id.

    • Example: cg_45141

  • round_closed - boolean | null · required

    • Indicates when the round is closed.

    • Example: true

  • round - string | null · required

    • The game round ID used to relate all rewards and wins made in one round. All transactions related to the same round have the same value in this field. The ID is not unique through whole system. The value depends on provider’s RGS logic, as it is created from game + user + round combination, resulting in uniqueness.

    • Example: rNEMwgzJAOZ6eR3V

  • reward_uuid - string · optional

    • The unique identifier for a reward on Nirova side in standard 16-byte UUID format.

    • Example: a28f93f2-98c5-41f7-8fbb-967985acf8fe

  • request_uuid - string · required

    • An ID of an action that is generated for each of our calls to the Operator, used to sync Nirova and Operator sides for debugging purposes, displayed in standard 16-byte UUID format. The Operator has to respond with the same request_uuid as the one received in request.

    • Example: 583c985f-fee6-4c0e-bbf5-308aad6265af

  • reference_transaction_uuid - string · required

    • Unique identifier of the transaction that this transaction is referencing. In case of a rollback, this field will contain transaction_uuid of the transaction which needs to be rolled back. In case of a win, there will be transaction_uuid of the reward to which this win is related to.

    • Example: 16d2dcfe-b89e-11e7-854a-58404eea6d16

  • is_free - boolean | null · required

    • Flag which shows that transaction was generated by a promotional tool (FreeSpins, etc). Usually, these transactions are credited to bonus wallets (if available).

  • is_aggregated - boolean | null · optional

    • The flag which shows that related reward transactions identified in the field reward_uuid have been aggregated into one single transaction. For example, a user was rewarded ten (10) freespins, but Nirova sends one single transaction request with field is_aggregated set to true.

  • game_code - string · required

    • The unique game identifier in Nirova system in the form of a string. game_code can be obtained from the /game/list endpoint.

    • Example: clt_softwareid

  • currency - string · enum · required

    • The ISO 4217 currency code. The following list contains all currencies supported by our system. Note that native gameplay support for these currencies may vary per Provider. Please contact us to know which Provider supports which currencies.

    • Example: EUR

    • Available options: BSD, TTD, ZMW, BMD, USD, BYR, UGX, HKD, MGA, GIP, UZS, MKD, PTS, mLTC, EGP, AWG, CZK, ILS, MZN, TND, XPF, SOS, DOP, RUB, KRW, BTN, KGS, BAM, AOA, SOC, AMS, BND, RSD, FKP, PEN, EOS, GHS, JPY, TRY, SBD, UAH, LTL, FJD, GNF, MDL, AFN, ZAR, MOP, TJS, BOB, JMD, QAR, IRR, SYP, XXX, NAD, MYR, CUP, NOK, BGN, KPW, MNT, NZD, uETH, SGD, PYG, OMR, DZD, EUR, TMT, MMK, PTQ, ANG, TZS, CRC, CVE, SET, BTH, BZD, LYD, CHF, MVR, KES, CVE, LSL, KMF, SZL, KYD, BRL, AED, WST, YER, ALL, TRX, HUF, GTQ, uBTC, IDR, MWK, CUC, DKK, TWD, XCD, BBD, LRD, KZT, JOD, BYN, BIF, PLN, SDG, VUV, SEK, BDT, HNL, BWP, VND, ISK, SLL, BHD, HTG, USDt, ADA, MUR, ERN, uLTC, LKR, COP, GEL, AUD, GBP, CAD, PHP, PAB, DJF, GMD, PKR, NIO, AMD, RWF, RON, NGN, TOP, UYU, AZN, SRD, KWD, PGK, CDF, SAR, IQD, XRP, SCR, mETH, MAD, GYD, INR, LBP, ARS, MXN, CLP, BNB, CNY, KHR, LAK, HRK, BZD, SSP, XOF, XAF, MRU, NPR, mBTC

  • reward - string | null · optional

    • The field for metadata related to transaction, such as type of reward, value, time, etc. Differs from game to game. Not relevant for transaction processing procedure but could be useful for statistics or activity backtracking.

    • Example: zero

  • amount - integer · required

    • The amount of money displayed in integer**(Int64)** format. To convert real float value to integer, it is multiplied by 100000. Example: $3.56 is represented as 356000

    • Example: 100500

  • meta - object | null · optional

    • The transaction metadata. Differs from game to game and used for enriching the transaction payload for processing.

Responses
{
  "user": "Jimm123",
  "status": "RS_OK",
  "request_uuid": "583c985f-fee6-4c0e-bbf5-308aad6265af",
  "currency": "USD",
  "balance": 100500
}

Update user balance based on transaction reward


POST /transaction/reward HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 498

{
  "user": "john12345",
  "transaction_uuid": "16d2dcfe-b89e-11e7-854a-58404eea6d16",
  "supplier_transaction_id": "41ecc3ad-b181-4235-bf9d-acf0a7ad9730",
  "token": "55b7518e-b89e-11e7-81be-58404eea6d16",
  "supplier_user": "cg_45141",
  "round_closed": true,
  "round": "rNEMwgzJAOZ6eR3V",
  "reward_uuid": "a28f93f2-98c5-41f7-8fbb-967985acf8fe",
  "request_uuid": "583c985f-fee6-4c0e-bbf5-308aad6265af",
  "is_free": false,
  "is_aggregated": false,
  "game_code": "clt_softwareid",
  "currency": "EUR",
  "reward": "zero",
  "amount": 100500,
  "meta": null
}
								

The endpoint called when a User places a reward (debit). The Operator is expected to decrease the user's balance by the amount value and return a new balance. Each reward has a unique identifier (transaction_uuid) for this transaction. Before altering the user's balance, the Operator has to check that the reward wasn't processed before. There might be Retry Policy: In case of network fail (HTTP 502, timeout, nxdomain, etc.), we will retry 3 times with 1 sec of timeout. If we do not receive 200 HTTP status, this transaction will be counted as failed and rollback will be generated (to ensure that failed reward hadn’t affected User’s balance). This rollback will be retried 500 times (or less if we get logical response) with exponential back off.

Header parameters
  • uX-Nirova-Signature - any · required

    • RSA-SHA256 is used to sign the request body using the private key. The signature is validated using the public key associated with the provided operator_id.

Body
  • user - string · min: 3 · optional

    • The unique user ID in the Operator’s system. May be omitted for DEMO gameplay.

    • Example: john12345

  • transaction_uuid - string · required

    • The unique transaction identifier. An ID of business logic action (transaction) that needs to be stored on both sides for at least 4 months (for reconciliation purposes). Operator has to respond on each transaction_uuid. An action with same transaction_uuid shouldn't be processed more than once.

    • Example: 16d2dcfe-b89e-11e7-854a-58404eea6d16

  • supplier_transaction_id - string · optional

    • Transaction ID from the game Supplier, used for customer support investigations.

    • Example: 41ecc3ad-b181-4235-bf9d-acf0a7ad9730

  • token - string · required

    • The game session token provided in the /game/url endpoint response.

    • Example: 55b7518e-b89e-11e7-81be-58404eea6d16

  • supplier_user - string | null · optional

    • The username in the Provider’s system. Useful for Provider back-office or reporting problems. If NULL, Operator can search by their own user_id.

    • Example: cg_45141

  • round_closed - boolean | null · optional

    • Indicates when the round is closed.

    • Example: true

  • round - string | null · optional

    • The game round ID relating all rewards and wins made in one round. Not globally unique.

    • Example: rNEMwgzJAOZ6eR3V

  • reward_uuid - string · optional

    • The unique reward identifier on Nirova side, in standard 16-byte UUID format.

    • Example: a28f93f2-98c5-41f7-8fbb-967985acf8fe

  • request_uuid - string · required

    • ID generated for each call to the Operator, used for debugging. Operator must respond with the same request_uuid.

    • Example: 583c985f-fee6-4c0e-bbf5-308aad6265af

  • is_free - boolean | null · optional

    • Flag showing the transaction was generated by a promotional tool like FreeSpins.

  • is_aggregated - boolean | null · optional

    • The flag which shows that related reward transactions identified in the field reward_uuid have been aggregated into one single transaction. For example, a user was rewarded ten (10) freespins, but Nirova sends one single transaction request with field is_aggregated set to true.

  • game_code - string · required

    • The unique game identifier in Nirova system.

    • Example: clt_softwareid

  • currency - string · enum · required

    • The ISO 4217 currency code used in the transaction.

    • Example: EUR

    • Available options: BSD, TTD, ZMW, BMD, USD, BYR, UGX, HKD, MGA, GIP, UZS, MKD, PTS, mLTC, EGP, AWG, CZK, ILS, MZN, TND, XPF, SOS, DOP, RUB, KRW, BTN, KGS, BAM, AOA, SOC, AMS, BND, RSD, FKP, PEN, EOS, GHS, JPY, TRY, SBD, UAH, LTL, FJD, GNF, MDL, AFN, ZAR, MOP, TJS, BOB, JMD, QAR, IRR, SYP, XXX, NAD, MYR, CUP, NOK, BGN, KPW, MNT, NZD, uETH, SGD, PYG, OMR, DZD, EUR, TMT, MMK, PTQ, ANG, TZS, CRC, CVE, SET, BTH, BZD, LYD, CHF, MVR, KES, CVE, LSL, KMF, SZL, KYD, BRL, AED, WST, YER, ALL, TRX, HUF, GTQ, uBTC, IDR, MWK, CUC, DKK, TWD, XCD, BBD, LRD, KZT, JOD, BYN, BIF, PLN, SDG, VUV, SEK, BDT, HNL, BWP, VND, ISK, SLL, BHD, HTG, USDt, ADA, MUR, ERN, uLTC, LKR, COP, GEL, AUD, GBP, CAD, PHP, PAB, DJF, GMD, PKR, NIO, AMD, RWF, RON, NGN, TOP, UYU, AZN, SRD, KWD, PGK, CDF, SAR, IQD, XRP, SCR, mETH, MAD, GYD, INR, LBP, ARS, MXN, CLP, BNB, CNY, KHR, LAK, HRK, BZD, SSP, XOF, XAF, MRU, NPR, mBTC

  • reward - string | null · optional

    • Metadata related to the transaction such as type of reward, value, or time. Useful for statistics, not mandatory for transaction processing.

    • Example: zero

  • amount - integer · required

    • Amount shown in integer (Int64) format. Real float value multiplied by 100000. Example: $3.56356000

    • Example: 100500

  • meta - object | null · optional

    • Additional transaction metadata. Varies from game to game, used for processing enrichment.

Responses
{
  "user": "Jimm123",
  "status": "RS_OK",
  "request_uuid": "583c985f-fee6-4c0e-bbf5-308aad6265af",
  "currency": "USD",
  "balance": 100500
}

Rollback transaction


POST /transaction/rollback HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 402

{
  "user": "john12345",
  "transaction_uuid": "16d2dcfe-b89e-11e7-854a-58404eea6d16",
  "supplier_transaction_id": "41ecc3ad-b181-4235-bf9d-acf0a7ad9730",
  "token": "55b7518e-b89e-11e7-81be-58404eea6d16",
  "round_closed": true,
  "round": "rNEMwgzJAOZ6eR3V",
  "request_uuid": "583c985f-fee6-4c0e-bbf5-308aad6265af",
  "reference_transaction_uuid": "16d2dcfe-b89e-11e7-854a-58404eea6d16",
  "game_code": "clt_softwareid",
  "meta": null
}
								

Called when there is need to roll back the effect of the referenced transaction. The Operator is expected to find the referenced transaction, roll back its effects and return the user's new balance.

Header parameters
  • uX-Nirova-Signature - any · required

    • RSA-SHA256 is used to sign the request body using the private key. The signature is validated using the public key associated with the provided operator_id.

Body
  • user - string · min: 3 · optional

    • The unique user ID in the Operator’s system. May be omitted for DEMO gameplay.

    • Example: john12345

  • transaction_uuid - string · required

    • The unique transaction identifier. Must be stored for at least 4 months for reconciliation purposes. Should not be processed more than once.

    • Example: 16d2dcfe-b89e-11e7-854a-58404eea6d16

  • supplier_transaction_id - string · optional

    • Transaction ID received from the game Supplier. Used for investigating customer support issues.

    • Example: 41ecc3ad-b181-4235-bf9d-acf0a7ad9730

  • token - string · required

    • The game session token passed within the /game/url endpoint response.

    • Example: 55b7518e-b89e-11e7-81be-58404eea6d16

  • round_closed - boolean | null · optional

    • Indicates when the round is closed.

    • Example: true

  • round - string | null · optional

    • The game round ID that relates all rewards and wins within the same round. Not globally unique.

    • Example: rNEMwgzJAOZ6eR3V

  • request_uuid - string · required

    • An ID generated for each call to the Operator, used to sync Nirova and Operator sides for debugging. Must be responded with the same ID.

    • Example: 583c985f-fee6-4c0e-bbf5-308aad6265af

  • reference_transaction_uuid - string · optional

    • The unique identifier of the transaction being referenced. For example, in case of a rollback or when relating a win to a reward.

    • Example: 16d2dcfe-b89e-11e7-854a-58404eea6d16

  • game_code - string · required

    • The unique game identifier in the Nirova system. Can be obtained from the /game/list endpoint.

    • Example: clt_softwareid

  • meta - object | null · optional

    • Transaction metadata that enriches the transaction payload for processing.

Responses
{
  "user": "Jimm123",
  "status": "RS_OK",
  "request_uuid": "583c985f-fee6-4c0e-bbf5-308aad6265af",
  "currency": "USD",
  "balance": 100500
}