> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.oppigames.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bonus Configure

> This API is used to create single or multiple bonuses. The bonus was created in USD currency, and the awarded amount was converted accordingly.

## Bonus Types

| Bonus Type           | Description                                                                                                                                                                                                                                                                                                                                                                                                                        |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Free Bets**        | Free Bets are configured for a player on a specific game. Each spin is played at a predefined bet amount set by the operator and does not deduct any funds from the player’s account balance. Instead, the spins are fully funded by the operator or the bonus balance. Any winnings generated from these free spins are credited directly to the player’s wallet. Free bet's transactions are also considered in RTP calculation. |
| **Free Spins**       | A bonus to grants the player any number of free spins, having winning up to the configured reward amount.                                                                                                                                                                                                                                                                                                                          |
| **Wheel Of Fortune** | A bonus mini-game featuring a spinning wheel.                                                                                                                                                                                                                                                                                                                                                                                      |
| **Cascading Reels**  | A bonus game where winning symbols disappear and new symbols fall into place, potentially triggering bonus multiplier for additional wins in a single spin.                                                                                                                                                                                                                                                                        |
| **Fortune Guess**    | A bonus mini-game game where the player is presented with multiple items and must guess the correct one.                                                                                                                                                                                                                                                                                                                           |
| **Wagering**         | A bonus where player can claim/unlock bonus wallet/winnings                                                                                                                                                                                                                                                                                                                                                                        |
| **Card Scratch**     | A bonus mini-game where the player is presented with multiple cards and must guess & scratch the correct one.                                                                                                                                                                                                                                                                                                                      |

## Headers

<ParamField header="x-api-key" type="string" required>
  A unique identifier associated with operator calling API.
</ParamField>

<ParamField header="x-signature" type="string" required>
  A SHA256 HMAC signature generated using the request body and timestamp.
  Format: HMAC\_SHA256(JSON.stringify(data) + '|' + timestamp), signed using the
  provided secret key.
</ParamField>

<ParamField header="x-timestamp" type="string" required>
  An Unix timestamp (milliseconds) Used to verify the request’s freshness.
  Ensure the same value is used in signature generation.

  <Note>
    The signature will remain valid for only 5 minutes from the provided
    timestamp.
  </Note>
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be set to `application/json`.
</ParamField>

## Request Body

<ParamField body="bonuses" type="object[]" required>
  Array containing bonus objects. Up to 50 bonuses data are allowed per API call.

  <Expandable title="Bonus Object Properties">
    <ParamField path="requestId" type="string" required>
      A unique identifier used to track and identify your data when the response is received.
    </ParamField>

    <ParamField path="playerId" type="string" required>
      Unique identifier for the player receiving the bonus.
    </ParamField>

    <ParamField path="bonusType" type="string" required>
      Type of bonus. E.g., "Free Spins".
    </ParamField>

    <ParamField path="gameId" type="string" required>
      Unique identifier representing the game associated with the bonus.
    </ParamField>

    <ParamField path="currency" type="string" required>
      Bonus are only allowed when the player plays using the same currency. (Example : USD, EUR etc.)
    </ParamField>

    <ParamField path="expiredAt" type="string" required>
      The bonus expiration date and time must be in this format (example : "2000-01-01T12:45:00.000+05:30") and must include timezone offset too.
      Value must be at least **10 minutes ahead** of the current time at the moment of configuration.
    </ParamField>

    <ParamField path="totalSpinCount" type="integer">
      totalSpinCount field required in free spin/free bet bonus type.
    </ParamField>

    <ParamField path="spinBetAmount" type="integer">
      spinBetAmount field required in free spin/free bet bonus type.

      <Note>
        To maintain precision and avoid floating-point errors, the spinBetAmount field is processed as an integer value by multiplying the actual amount by 100000.

        For example, a spinBetAmount of 12.34567 will be represented as 1234567 in the API.
      </Note>
    </ParamField>

    <ParamField path="bonusAmount" type="integer">
      bonusAmount field required in free spin/free bet bonus type.
      Bonus win amount. Amount passed here will be max limit for win amount. Player can win anything from 0 to bonusAmount.

      <Note>
        To maintain precision and avoid floating-point errors, the bonusAmount field is processed as an integer value by multiplying the actual amount by 100000.

        For example, a bonusAmount of 12.34567 will be represented as 1234567 in the API.
      </Note>
    </ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="status" type="string" required>
  Code indicates status of the request weather it is succeed or failed. We have listed error codes <a href="/introduction#error-codes">here</a>
</ResponseField>

<ResponseField name="data" type="array" required>
  List of bonuses configured in request.

  <Expandable title="Data properties">
    <ResponseField name="status" type="string" required>
      Code indicates status of the request weather it is succeed or failed. We have listed error codes <a href="/introduction#error-codes">here</a>
    </ResponseField>

    <ResponseField name="requestId" type="integer" required>
      Unique requestId sent with data in request. This ensures exact response of data even if sequence of request and response data mismatch.
    </ResponseField>

    <ResponseField name="bonusId" type="string" required>
      Unique identifier representing the bonus.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json SUCCESS theme={null}
  {
      "status": "RS_OK",
      "data": [
          {
              "status": "RS_OK",
              "requestId": "bonus_request_2",
              "bonusId": "4eda52cd-b8a6-43fa-b5d6-327f003032b7"
          },
          {
              "status": "RS_OK",
              "requestId": "bonus_request_2",
              "bonusId": "8eda00cd-b8a6-43fa-b5d6-327f00303289"
          }
      ]
  }
  ```

  ```json FAILURE theme={null}
  {
    "status": "RS_ERROR",
    "message": "Oops! Something went wrong. Please refresh the page or try again in a moment"
  }
  ```

  ```json FAILURE 1 theme={null}
  {
    "status": "RS_ERROR_BONUS_EXPIRED",
    "message": "Bonus expired or not found"
  }
  ```
</ResponseExample>
