# RubyPlay Seamless Wallet Integration Guide ## General ### Purpose and Audience This document aims to provide information about the RubyPlay system for integration via the implementation of the RubyPlay Seamless Wallet API. The audience is the third-party operators who integrate with RubyPlay. ### Integration Steps To integrate RubyPlay games, the Operator has to: * implement the [RubyPlay Seamless Wallet API](/content/integration/seamless-wallet-api/general), which will be used by the RubyPlay system to report the game process; * fill in the Integration Form, thus providing RubyPlay with all the required information for setup; * test the RubyPlay Seamless Wallet API using the Postman collection. ### Authentication RubyPlay uses basic authentication. If the Operator wants to ensure that the requests are being sent from RubyPlay’s side, they must provide us with test accounts via the Integration Form. ## Currency Support RubyPlay uses **ISO 4217** currency codes by default in the RubyPlay Seamless Wallet API. The list of supported currencies is presented in the [Currency Support List](/content/integration/lists/currency-support-list) document. The Operator is requested to fill in the Currency fields in the Integration Form, thus specifying all the currencies that will be used. RubyPlay operates money from the provider in currencies such as USD, EUR, etc., but inside, RubyPlay stores money as integer numbers in minor unit form according to the currency exponent. For USD, it is cent (1/100 USD); for IDR, it is sen (1/100 IDR); for VND, it is VND. The bet is a 4-byte signed integer, range: 1 - 2,147,483,647. The win is an 8-byte signed integer, range: 0 - 9,223,372,036,854,775,807. In the case of the Indonesian Rupiah, the maximum bet RubyPlay can handle is 20,000,000.00 IDR ~ 1400.00 USD (as of 16 September 2019). However, the RubyPlay Seamless Wallet API transfers money in decimal format. RubyPlay will convert integers to decimals using the exponent value from **ISO 4217.** For different localizations, RubyPlay uses the following rules for displaying currencies: * **Default:** commas separate thousands (e.g. 11,200), and a period is used for decimals (e.g., 24.55). * **Italy or Spain:** periods separate thousands (e.g. 11.200), and a comma is used for decimals (e.g., 24,55). Example: * Default balance: 1,000,000.55 * Italy or Spanish balance: 1.000.000,55 The full list of currency-specific display rules can be found here: [Display Rules](/assets/currencycodetestconditions.3d9485c05d71049a8151de1a396f55389792b43ebdb6cead675e31ebf08b86a9.b4967042.ts) ## Localization See the [Localization List](/content/integration/lists/localization-list) document. ## Game IDs and Configurations See the [Game List](/content/integration/lists/game-list) document. ## Deployment RubyPlay deploys both backend and content to the Google Cloud Platform. ### RubyPlay Environments RubyPlay deploys the following environments: * **stage** - the environment intended for end-to-end testing. The environment implies only consistent updates * **prod** - the production environment The Operator is encouraged to create a corresponding set of environments on his side. The Operator is requested to fill in the Integration Part in the Integration Form, thus specifying the URLs of the services that implement the RubyPlay Seamless Wallet API and credentials for each environment. Please note that credentials for the production environment are sent separately. The following URLs correspond to the RubyPlay environments and should be specified via `server_url` parameter (see the Game Launch URL [section](#game-launch-url) of this document): | № | Environment name | URL | | --- | --- | --- | | 1 | stage | https://asia.stage.rubyplay.io | The RubyPlay team will provide production domains during the integration. ### RubyPlay IP for Whitelisting IP addresses of **stage** environment: `35.234.8.135` `34.80.225.63` `35.194.167.132` IP addresses for testing purposes (VPN, office network): `35.234.121.14` `35.242.222.236` ### Country and Territory Restrictions The USA and its territories, France, Iran, Israel, Lithuania, Australia and Poland are **restricted countries**. If the game domain or game URL becomes blocked by a certain territory (except the mentioned above), RubyPlay is obliged to adjust/change domain/URL and inform the Operator about the changes in the shortest possible time. ## Game Launch URL The RubyPlay game can be launched with the next URL template: ``` https://{game client domain}/launcher?gamename={game_code}&server_url={rubyplay_server_url}&operator={operator_code}&lang={language_tag}&playerSession={sessionToken} ``` | Parameter | Description | | --- | --- | | `game client domain` | A game client domain where the RubyPlay games are hosted. Here is a list of the domains and their description: | Domain | Description | | --- | --- | | https://stage.rpl4y.com | Stage environment | The RubyPlay team will provide production domains during the integration. | | `gamename` | A code of the game is listed in the [Game List](/content/integration/lists/game-list) document. | | `server_url` | A server URL (the address of one of the RubyPlay environments) is listed in the **Deployment** [section](#deployment) of this document. | | `operator` | A unique operator code which is used in the URLs. It can be `operatorName` or `brandName` format if the Operator has only one brand, or `operatorName_brandName` format if the Operator has more than one brand. | | `lang` | A language tag listed in the [Localization List](/content/integration/lists/localization-list) document (default value is "en" for the English language). | | `playerSession` | A unique identifier of the session opened on the Operator's side. For the details, please check the **RubyPlay Seamless Wallet API** [document](/content/integration/seamless-wallet-api/general). | | `homeUrl` | The URL for the casino lobby. It allows players to be redirected to the lobby by clicking the HOME button in-game or in other cases. The field is optional and accepts string values. URL should be provided in the following format: `https://` | | `cashierUrl ` | The URL for the cashier page. It allows players to be redirected to the cashier by clicking the CASHIER button in-game. The field is optional and accepts string values. URL should be provided in the following format: `https://` | For example, if you want to launch the **Medusa Money** game (`gamename=rp_2`) on the Asia production game client domain (`{domain}` is `https://gmr5p.com`) for Asia prod environment (`server_url=https://srv.gmr5p.com`) where the `operator=operatorName`, the `playerSessionToken=cf0153a1f356411e9d1b01cfc5d18543`, and the used language is Spanish (`lang=es`), and also specify links for the lobby (`homeUrl=https://operator.com/lobby`) and cashier (`cashierUrl=https://operator.com/cashier`), you have to use the next game launch URL: ``` https://gmr5p.com/launcher?gamename=rp_2&server_url=https://srv.gmr5p.com&operator=operatorName&lang=es&playerSession=cf0153a1f356411e9d1b01cfc5d18543&homeUrl=https://operator.com/lobby&cashierUrl=https://operator.com/cashier ``` More examples: | Environment | Example | | --- | --- | | Stage | `https://stage.rpl4y.com/launcher?gamename=rp_1&operator=operatorName&server_url=https://asia.stage.rubyplay.io&playerSession=XXXXXXXXXXXXXXXX` | | Demo | See [Demo Play Mode](/content/integration/demo-play-mode) | Before starting the configuration of production, you should contact our team (see the [Support section](#support)) to receive the most correct data, for example, the needed cluster(s), etc. ## Browser and Device Support The RubyPlay games can be launched only in a browser with WebGL support. The games do not support "canvas". The RubyPlay games are tested in the latest versions of the next desktop browsers: 1. Google Chrome 2. Mozilla Firefox 3. Microsoft Edge 4. Safari 5. QQ Browser 6. UC Browser Android mobile devices are tested in the latest version of Google Chrome. iOS devices are tested in the latest versions of Safari and Google Chrome. ## Back Office The Operator is requested to provide us with the email address in the Integration Form. The credentials and back-office address will be sent in the specified email. The RubyPlay back-office application for the particular environment can be accessed via the next URLs: | № | Environment name | URL | | --- | --- | --- | | 1 | stage | https://backoffice.stage.rubyplay.io | The back-office manual will be sent in a separate document. ## Support If you encounter any issues, have questions, or need assistance, our support team is here to help. **Contact:** [support@rubyplay.com](mailto:support@rubyplay.com) ## Miscellaneous ### Marketing Assets The marketing assets are available under the next link: Marketing Assets ### iFrame Support The RubyPlay games can be launched in iFrame. There is no technical restriction for the iFrame dimension. The game is scaled to fit into the provided iFrame size. The RubyPlay games can be launched on a mobile platform via an iFrame if the iFrame always fills the entire mobile device screen. ### In-game Cashier or Chat The RubyPlay games do not support in-game cashier and chat. ### Money Amount Formatting The RubyPlay games do not shorten long money amounts, for example, 100,000 VND will not be displayed as 100k VND. ### Branding The RubyPlay games cannot incorporate any third-party logos/branding.