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

# React Native options

The SDK can be configured in a few ways.

| Field                      | Optional / Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| -------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `gr4vyId`                  | **`Required`**      | The ID automatically sets the `apiHost` to `api.<gr4vyId>.gr4vy.app` for production and `api.sandbox.<gr4vyId>.gr4vy.app` and to `embed.sandbox.<gr4vyId>.gr4vy.app` for the sandbox environment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `token`                    | **`Required`**      | The server-side generated JWT token which is used to authenticate any of the API calls.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `environment`              | `Optional`          | `.sandbox`, `.production`. Defaults to `.production`. When `.sandbox` is provided the URL contains `sandbox.GR4VY_ID`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `amount`                   | **`Required`**      | The amount to authorize or capture in the specified `currency` only.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `currency`                 | **`Required`**      | A valid, active, 3-character `ISO 4217` currency code to authorize or capture the `amount` for.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `country`                  | **`Required`**      | A valid `ISO 3166` country code.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `buyerId`                  | `Optional`          | An optional ID for a buyer. The transaction is automatically associated with a buyer with that ID. If no buyer with this ID exists then it is ignored.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `buyerExternalIdentifier`  | `Optional`          | An optional external ID for a buyer. The transaction is automatically associated to a buyer with that external ID. If no buyer with this external ID exists then it is ignored. This option is ignored if the `buyerId` is provided.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `presentingViewController` | **`Required`**      | The view controller that opens the payment sheet.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `externalIdentifier`       | `Optional`          | An optional external identifier that can be supplied. This is automatically associated to any resource that opens the payment sheet and subsequently used to find a resource by that ID.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `store`                    | `Optional`          | `'ask'`, `'preselect'`, `true`, `false` - Explicitly store the payment method, ask the buyer or preselect it by default. Requires `buyerId` or `buyerExternalIdentifier`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `display`                  | `Optional`          | `all`, `addOnly`, `storedOnly`, `supportsTokenization` - Filters the payment methods to show stored methods only, new payment methods only or methods that support tokenization.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `intent`                   | `Optional`          | `authorize`, `preferAuthorize`, `capture` - Defines the intent of this API call. This determines the desired initial state of the transaction. When used, `preferAuthorize` automatically switches to `capture` if the selected payment method doesn't support delayed capture.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `metadata`                 | `Optional`          | An optional dictionary of keys and values for transaction metadata. All values should be a string.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `paymentSource`            | `Optional`          | `installment`, `recurring` - Can be used to signal that Embed is used to capture the first transaction for a subscription or an installment. When used, `store` is implied to be `true` and `display` is implied to be `supportsTokenization`. This means that payment options that do not support tokenization are automatically hidden.                                                                                                                                                                                                                                                                                                                                                                                                        |
| `cartItems`                | `Optional`          | An optional array of cart item objects, each object must define a `name`, `quantity`, and `unitAmount`. Other optional properties are `discountAmount`, `taxAmount`, `externalIdentifier`, `sku`, `productUrl`, `imageUrl`, `categories` and `productType`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `applePayMerchantId`       | `Optional`          | The Apple merchant ID to be used during Apple Pay transactions.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `debugMode`                | `Optional`          | `true`, `false`. Defaults to `false`, this prints to the console.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `theme`                    | `Optional`          | Theme customization options [See Theming Options](/guides/payments/embed/theming#theme-options). The SDK also contains an additional two properties within the `colors` object: `headerBackground` and `headerText`. These are used for the navigation background and foreground colors.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `locale`                   | `Optional`          | An optional locale, this consists of a `ISO 639 Language Code` followed by an optional `ISO 3166 Country Code`, for example `en`, `en-gb` or `pt-br`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `statementDescriptor`      | `Optional`          | An optional object with information about the purchase to construct the statement information the buyer sees in their bank statement. Please note support for these fields varies across payment service providers and underlying banks, so the system can only ensure a best effort approach for each supported platform. <br />As an example, most platforms only support a concatenation of `name` and `description` fields, truncated to a length of 22 characters. <br />The object can contain `name`, `description`, `phoneNumber`, `city`, and `url` keys, with string values. `phoneNumber` should be in E164 format. Avoiding characters outside the alphanumeric range and the dot (`.`) to ensure wide compatibility is recommended. |
| `requireSecurityCode`      | `Optional`          | An optional boolean which forces security code to be prompted for stored card payments.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `shippingDetailsId`        | `Optional`          | An optional unique identifier of a set of shipping details stored for the buyer.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `merchantAccountId`        | `Optional`          | An optional merchant account ID.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `connectionOptions`        | `Optional`          | An optional set of values passed to a connection when processing a transaction (see [New transaction](/reference/transactions/new-transaction))                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `installmentCount`         | `Optional`          | An optional value that indicates the number of installments a buyer is required to make.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |

<Note>
  The instance ID is the unique identifier for the deployment of the system and is included in every API call.
  Together with the environment (sandbox or production) it is used to connect to the right APIs, as well as dashboard.
</Note>
