The SDK can be configured in a few ways.
|Optional / Required
|The Gr4vy ID automatically sets the
api.<gr4vyId>.gr4vy.app for production and
api.sandbox.<gr4vyId>.gr4vy.app and to
embed.sandbox.<gr4vyId>.gr4vy.app for the sandbox environment.
|The server-side generated JWT token which will be used to authenticate any of the API calls.
.production. Defaults to
.sandbox is provided the URL will contain
|The amount to authorize or capture in the specified
|A valid, active, 3-character
ISO 4217 currency code to authorize or capture the
ISO 3166 country code.
|An optional ID for a buyer. The transaction will automatically be associated with a buyer with that ID. If no buyer with this ID exists then it will be ignored.
|An optional external ID for a buyer. The transaction will automatically be associated to a buyer with that external ID. If no buyer with this external ID exists then it will be ignored. This option is ignored if the
buyerId is provided.
|The view controller that opens the payment sheet.
|An optional external identifier that can be supplied. This will automatically be associated to any resource that opens the payment sheet and subsequently used to find a resource by that ID.
false - Explicitly store the payment method or ask the buyer, this is used when a
buyerId is provided.
supportsTokenization - Filters the payment methods to show stored methods only, new payment methods only or methods that support tokenization.
capture - Defines the intent of this API call. This determines the desired initial state of the transaction.
|An optional dictionary of keys and values for transaction metadata. All values should be a string.
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
display is implied to be
supportsTokenization. This means that payment options that do not support tokenization are automatically hidden.
|An optional array of cart item objects, each object must define a
|The Apple merchant ID to be used during Apple Pay transactions.
false. Defaults to
false, this prints to the console.
|Theme customization options See Theming Options. The SDK also contains an additional two properties within the
headerText. These are used for the navigation background and foreground colors.
|An optional locale, this consists of a
ISO 639 Language Code followed by an optional
ISO 3166 Country Code, e.g.
|An optional object with information about the purchase to construct the statement information the buyer will see in their bank statement. Please note support for these fields varies across payment service providers and underlying banks, so we can only ensure a best effort approach for each supported platform.
As an example, most platforms will only support a concatenation of
description fields, truncated to a length of 22 characters.
The object can contain
url keys, with string values.
phoneNumber should be in E164 format. Gr4vy recommends avoiding characters outside the alphanumeric range and the dot (
.) to ensure wide compatibility.
|An optional boolean which forces security code to be prompted for stored card payments.
|An optional unique identifier of a set of shipping details stored for the buyer.
|An optional merchant account ID.
The Gr4vy ID is the unique identifier for your instance. Together with the environment (sandbox or production) it is used to connect to the right APIs.