Page cover

book-openGames You Play Implementation Guide

Step by step approach to getting started with the Lucra Games You Play product

Briefing

By the end of this implementation guide, users on your platform will be able to create and join Games You Play (GYP) matchups for real money or rewards, increasing engagement in your ecosystem.

There are many ways to integrate the GYP Lucra Product, this guide focuses on leaning on the client side Lucra SDK to standup the UI. If you're looking for other approaches, see the SDKs & APIs section

Prerequisites

  • Your Lucra account has been setup with Games tied to your account and has predefined Games to display on the Lucra landing page

circle-info

This can be done through the Lucra Console or ask your Lucra representative for assistance

  • Obtain Lucra Keys for your application, two apiKey values, one for sandbox environment and another for production environment.

Lucra API Keyschevron-right

Step by step guide

1

Install & Initialize the SDK

Set up the SDK and confirm initialization is successful.

Install

Initialize the SDK

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

2

Apply brand theming

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

Branding & Themingchevron-right
3

Configure your user

circle-info

This is an optional but recommended step.

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.

circle-check

Upon attempting to create or join a matchup, or deposit money, they will be prompted for identifying information such as age and location so that we can verify they are compliant to proceed.

Supplying the information you have for the current user through the Lucra SDK can streamline the experience for a number of reasons:

  • 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 to Lucra users

circle-exclamation

Find your client configure user SDK docs here

4

Setup Free to Play support

circle-info

This is an optional step, the Lucra SDK will not show reward options for matchup creation if not provided

The Lucra SDK offers the ability to provide Free to Play rewards to users who aren't interested in putting real money on the line. Rewards are entities defined and provided by you, at runtime. These rewards will show up as available items to select to put on the line instead of real money.

Learn more here:

ticket-perforatedFree to Playchevron-right

Find your client platform Free To Play technical docs here

Find your API and Webhook Free To Play technical docs here

circle-info

Backend integration is not required for Free to Play support, but it can help with end to end user reward experiences

5

Setup Convert to Credit support

circle-info

This is an optional step, the Lucra SDK will not show Convert to Credit options if not provided

Convert to credit functionality allows users to convert their real money earnings into a defined currency of your choosing. An example would be converting $10 for 120 tokens within your ecosystem.

Learn more here:

money-bill-transferConvert to Creditchevron-right

Find your platform technical convert to credit docs here:

circle-exclamation
6

Enable Apple Pay, Paypal, Venmo for payments

circle-info

This is an optional step, a default payment processor comes out of the box.

circle-info

If Apple Pay enablement is desired for iOS, ReactNative and Javascript, please reach out to Lucra for further assistance

Read more here

Paymentschevron-right

Find your platform technical payment docs here

7

A key function of the Games You Play implementation is the ability for matchup creators to send matchup links to invite participants and allowing participants to open the link to join the fun.

This is a simple two step process of providing Lucra with a link that is recognized in your platform ecosystem, and forwarding the embedded Lucra details to the Lucra SDK to navigate invited users to the correct location at runtime.

circle-exclamation

When a GYP matchup is created, the Lucra SDK will request a deeplink URL to be generated given a matchupId , it is your responsibility to take that matchupId and embed it in a link that is recognized by your platform.

An example of a returned deeplink could look something like this https://www.app.com/matchupId?={matchupId} or app://matchupId?={matchupId}

circle-exclamation

At this point, the link will be shared to participants who expect to be navigated to your platform (website or mobile app) and see the matchup to join on their own.

Continuing the example links above, https://www.app.com/matchupId?={matchupId} or app://matchupId?={matchupId} , you will simply extract the matchupId value and provide it to the Lucra SDK to open and navigate the user to the details of the matchup.

Find your platform technical deeplink docs here

8

Launch the Create a Game Lucra experience

At this point, the Lucra SDK is ready get your users involved in GYP matchups. Lucra will handle user authentication, user identification, and any compliance forms required for real money actions.

That said, this requires intentional action by your platform to launch the Create A Game experience, both for creating and joining matchups.

Creating a matchup

Joining a matchup

This step is handled by a successful implementation of the Handling Incoming Lucra Deeplinks step above.

9

Listen for key events

Depending on your integration, you might need to know when users take certain actions. This can be for many reasons, including, but not limited to, the following:

  • Know when a user creates a matchup

  • Know when a user decides to join a matchup

  • Know when a matchup has been started to navigate them away from the Lucra SDK

  • Know the outcome of a matchup

The Lucra SDKs, APIs and Webhooks allow you to be in tune with much of the user's and matchup's lifecycle.

Client SDKs

Setup client side event listeners with the technical docs here

Server Webhooks

Setup your backend to receive webhooks here

Games You Play Webhookschevron-right
10

Setup remote matchup settlement

circle-info

This is an optional step, the out-of-the-box experience is such that, the creator decides the outcome of the GYP matchup, for both real money payouts and Free to Play rewards.

Given the nature of your platform, it may not be desirable to let the creator of matchups decide the outcome, this is where our GYP APIs come into play. If you're in full control of the game and know the outcome, you can settle matchups remotely.

The GYP REST API allows you to submit outcomes remotely.

Games You Play REST APIchevron-right
circle-exclamation
11

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

Testingchevron-right
circle-exclamation

GYP Platform Technical Documentation


Mobile Notification Support

circle-exclamation

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

Double check your deeplink implementation, and verify the links you generate are registered/aligned with your mobile app/website's domain.

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.

circle-info

Not finding the answers you're looking for? Reach out to your Lucra representative for further assistance

Last updated