> For the complete documentation index, see [llms.txt](https://docs.lucrasports.com/lucra-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lucrasports.com/lucra-sdk/mini-games/mini-games-implementation-guide.md).

# Mini Games Implementation Guide

Step-by-step guide for integrating Lucra's Mini Games product into your platform

## Briefing

Mini Games is Lucra’s lightweight format for quick, casual play experiences that intersect with the broader Lucra ecosystem - including Tournaments, PvP matchmaking, rewards, and achievements. Sessions can be initiated across any of these contexts, giving your platform a flexible, low-friction engagement layer that ties directly into the scoring, reward, and achievement systems your users already interact with.

By the end of this guide, your platform will be able to launch into the MiniGames experience for your users to select games to practice, put money on the line and track their results across peer to peer matchups and tournaments. If you're looking for other headless approaches, to represent the games and user matchup state within your own platform, see [Mini Games Headless Implementation Guide](/lucra-sdk/mini-games/mini-games-headless-implementation-guide.md)

### Prerequisites

* You must have at least one Mini Game configured in the Lucra Console.
* Obtain your Lucra API Keys: two apiKey values, one for sandbox and one for production.
* Install a supported Lucra client SDK for your platform (iOS, Android, or React Native).

## Step by step guide

{% stepper %}
{% step %}

### Install & Initialize the SDK

Install a Lucra client SDK and confirm initialization is successful.

**Install**

{% tabs %}
{% tab title="iOS" %}
{% content-ref url="/pages/NkHdjUFmx0pufBioBAEy" %}
[Project Setup (iOS)](/lucra-sdk/sdks-and-apis/client-sdks/ios/1.0.0_project_setup.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="Javascript" %}
{% content-ref url="/pages/0Gf8EooSZqrZvD3C2CMR" %}
[Getting Started](/lucra-sdk/sdks-and-apis/client-sdks/javascript-web/1.0_project_setup.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="Android" %}
{% content-ref url="/pages/QLMpPk8VpWr4Qw5DI28y" %}
[Getting Started](/lucra-sdk/sdks-and-apis/client-sdks/android/1.0.0_project_setup.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="React Native" %}
{% content-ref url="/pages/ihc5rUDwDwDUzFkaH1ta" %}
[Getting Started](/lucra-sdk/sdks-and-apis/client-sdks/react-native/1.0.0_project_setup.md)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}

**Initialize the SDK**

With the provided `apiKey` you can now initialize the LucraClient SDK on your platform

{% tabs %}
{% tab title="iOS" %}
{% content-ref url="/pages/np2OOS1D9c7T0YH7FbMI" %}
[LucraClient Initialization (iOS)](/lucra-sdk/sdks-and-apis/client-sdks/ios/1.2.0_initialize_client.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="Javascript" %}
{% content-ref url="/pages/PkTGPYh2Jj3FNZWR6wqX" %}
[Initializing the LucraClient](/lucra-sdk/sdks-and-apis/client-sdks/javascript-web/1.2_initialize_client.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="Android" %}
{% content-ref url="/pages/6GiryIVJmsReaiw5Puqg" %}
[Initializing the LucraClient](/lucra-sdk/sdks-and-apis/client-sdks/android/1.2.0_initialize_client.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="React Native" %}
{% content-ref url="/pages/hXageI3tzKAdanQ2MbwP" %}
[LucraSDK Initialization](/lucra-sdk/sdks-and-apis/client-sdks/react-native/1.2.0_initialize_client.md)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

#### Apply brand theming

Provide brand colors and images to make the Lucra experience as familiar as your own

{% content-ref url="/pages/zWiz3LPiEX9gh4U3OY6q" %}
[Branding & Theming](/lucra-sdk/readme/whats-included/branding-and-theming.md)
{% endcontent-ref %}
{% endstep %}

{% step %}

### Configure your user

{% hint style="info" %}
This is an optional but **highly** **recommended** step.
{% endhint %}

When a user logs into Lucra for the first time, they are given a randomly generated name and will have no other identifying properties beyond the phone number they used to two-factor-authenticate into the experience.

{% hint style="success" %}
If a user has previously logged into Lucra within a *different Lucra client* product using the same phone number, their information will be merged and can be automatically verified if their account is still in good standing.
{% endhint %}

Supplying the information you have for the current user ahead of their journey through the Lucra SDK can streamline the experience for a number of reasons:<br>

* Pre fill user information such as name, city, state, zip, address and email
* Pre fill and **lock** the phone number used to login
* Predefine their username so that the Lucra account is familiar to your platform's account
* Supply arbitrary [metadata](#how-user-metadata-can-streamline-your-tournaments-implementation) to the user's Lucra account

{% hint style="warning" %}
To avoid compliance issues, we recommend configuring user information that is accurate and up to date.
{% endhint %}

Find your client configure user Lucra SDK docs here

{% tabs %}
{% tab title="iOS" %}
{% content-ref url="/pages/hc6BkNd9161LAIuwukKk" %}
[Headless Functionality (iOS)](/lucra-sdk/sdks-and-apis/client-sdks/ios/1.2.9_headless_interactions.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="Javascript" %}
{% content-ref url="/pages/f741cRKYLxLqnIR0Kn5C" %}
[Updating Users](/lucra-sdk/sdks-and-apis/client-sdks/javascript-web/1.8_updating_users.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="Android" %}
{% content-ref url="/pages/icLjJly9wpu0cLQuZLcR" %}
[Interacting with Lucra Headless Functionality](/lucra-sdk/sdks-and-apis/client-sdks/android/1.2.9_headless_interactions.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="React Native" %}
{% content-ref url="/pages/vwFlUjjFRvIzWUzF0Oci" %}
[Headless Functionality](/lucra-sdk/sdks-and-apis/client-sdks/react-native/1.2.9_headless_interactions.md)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Enable Apple Pay, Paypal, Venmo for payments

{% hint style="info" %}
This is an optional step, a default payment processor comes out of the box.
{% endhint %}

{% hint style="info" %}
If Apple Pay enablement is desired for iOS, ReactNative and Javascript, please reach out to Lucra for further assistance
{% endhint %}

Read more here

{% content-ref url="/pages/1k8jP8csQLxtHF4Ax3eV" %}
[Payments](/lucra-sdk/readme/whats-included/payments.md)
{% endcontent-ref %}

Find your platform technical payment docs here

{% tabs %}
{% tab title="iOS" %}
{% content-ref url="/pages/pcDcWNn3maIuUVI5TNvY" %}
[Payments (iOS)](/lucra-sdk/sdks-and-apis/client-sdks/ios/1.2.4_payments.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="Javascript" %}
{% hint style="info" %}
Web based Apple Pay requires assistance from the Lucra team, please reach out for more information
{% endhint %}
{% endtab %}

{% tab title="Android" %}
{% content-ref url="/pages/4gFtRIuyyCVzrewAr2qX" %}
[Payment Integrations](/lucra-sdk/sdks-and-apis/client-sdks/android/1.2.4_payments.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="React Native" %}
{% content-ref url="/pages/cZXOcqL5oee5w8TLp5m5" %}
[Payments](/lucra-sdk/sdks-and-apis/client-sdks/react-native/1.2.4_payments.md)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Enable Tournaments

{% hint style="info" %}
This is an optional step, if tournaments are enabled and running on your platform, users will be able to join and participate within the Lucra SDK experience
{% endhint %}

Setup tournaments for your users to join and play games against more users, with larger incentives. Read more here

{% content-ref url="/pages/JbDU8OHCu3j54vlEYq2f" %}
[Tournaments Implementation Guide](/lucra-sdk/tournaments/gyp-sdks.md)
{% endcontent-ref %}
{% endstep %}

{% step %}

### Create Achievements and Rewards

{% hint style="info" %}
This is an optional step, please reach out to your Lucra representative to setup achievements to allow your users to win rewards defined in your system.
{% endhint %}

All Mini Game scoring can contribute towards achievement progress, resulting in rewards. All achievement related experiences are contained within the Lucra SDK. This can help incentivize your users to play with or without money on the line. Read more here

{% content-ref url="/pages/Gm2WmimiOVSGpolGrJhU" %}
[Rewards](/lucra-sdk/rewards.md)
{% endcontent-ref %}
{% endstep %}

{% step %}

### Launch Mini Games Home Flow

At this point, you're now able to launch the Lucra Mini Games Home Flow to allow your users to find games, select game modes and wagers.

The Lucra SDK will organically navigate the user to the appropriate screen for the user to track their latest matchup details, see their previous matchup results, manage funds, verify their identity, join tournaments and play games - all contained within the Lucra SDK.

![](https://3672116411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkRDKveSoEa2KT6qDNxu%2Fuploads%2Fjsa5G9oDeVgm6g7muoYB%2Fimage.png?alt=media\&token=a625cbfb-bbbe-48ff-ab7e-b47d9e0e76a5) ![](https://3672116411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkRDKveSoEa2KT6qDNxu%2Fuploads%2FIk7x5IEGJRVHn02sDFjf%2Fimage.png?alt=media\&token=fd81427e-8cf1-44c9-a08b-cddcb15f1238)

{% hint style="info" %}
The games, modes, wagers are pre configured for your instance, if you'd like to define the available games, modes and wagers, please reach out to your Lucra representative
{% endhint %}

{% tabs %}
{% tab title="iOS" %}
{% content-ref url="/pages/BFQqsj0a0ThZQD3k8sxY#lucraflow\.minigameshome" %}
[/pages/BFQqsj0a0ThZQD3k8sxY#lucraflow.minigameshome](https://docs.lucrasports.com/lucra-sdk/mini-games/pages/BFQqsj0a0ThZQD3k8sxY#lucraflow.minigameshome)
{% endcontent-ref %}
{% endtab %}

{% tab title="Android" %}
{% content-ref url="/pages/GKTJSsP6NOHDeBbO2yBF#lucrauiprovider.lucraflow\.minigameshome" %}
[/pages/GKTJSsP6NOHDeBbO2yBF#lucrauiprovider.lucraflow.minigameshome](https://docs.lucrasports.com/lucra-sdk/mini-games/pages/GKTJSsP6NOHDeBbO2yBF#lucrauiprovider.lucraflow.minigameshome)
{% endcontent-ref %}
{% endtab %}

{% tab title="React Native" %}
`MINI_GAMES_HOME`  [Lucra Flows](/lucra-sdk/sdks-and-apis/client-sdks/react-native/1.2.7_lucraflows.md)
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Test end-to-end

At this point, testing the full integration will likely be on your to-do list. This is where our `sandbox` environment comes in. This environment allows you to simulate a production environment with test users and money transactions that don't impact anyone's bank account.

Read more here

{% content-ref url="/pages/75qBkq1W3CD60doO42QQ" %}
[Testing](/lucra-sdk/readme/whats-included/implementation-support/testing.md)
{% endcontent-ref %}

{% hint style="warning" %}
When testing your Lucra SDK and API integration, be sure to use your provided `sandbox` keys for both client side SDKs and API endpoints.
{% endhint %}
{% endstep %}
{% endstepper %}

***

## Mobile Notification Support

{% hint style="warning" %}
Successful mobile notification integration will require Lucra involvement, please reach out to your contact to learn more.
{% endhint %}

{% tabs %}
{% tab title="iOS" %}
{% content-ref url="/pages/fbduIajxAtBk81xSQjeO" %}
[Push Notifications (iOS)](/lucra-sdk/sdks-and-apis/client-sdks/ios/1.2.3_push_notifications.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="Android" %}
{% content-ref url="/pages/sQsFPqNR56xpNCutK1Tm" %}
[Setting up Push Notifications](/lucra-sdk/sdks-and-apis/client-sdks/android/1.2.3_push_notifications.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="React Native" %}
{% content-ref url="/pages/h3cvYwUp8kMVx7IqKPMx" %}
[Push Notifications](/lucra-sdk/sdks-and-apis/client-sdks/react-native/1.2.3_push_notifications.md)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}

***

## Common troubleshooting

### The Lucra SDK says I'm unauthorized after launching a Flow

Be sure to double check your provided `apiKey`(s) and the environment you're pointing to. Each platform (web, mobile, server) have a respective key *per environment*

### Lucra says my account is suspended

Our compliance ruleset will suspend accounts for a number of different reasons due to suspicious activity. If you don't think your account should be suspended, please reach out to Lucra for assistance.

{% hint style="info" %}
Not finding the answers you're looking for? Reach out to your Lucra representative for further assistance
{% endhint %}
