PlexySDK DOCS
React Native

Configuration

Every configuration option for the Plexy React Native SDK

Configuration

Every payment starts from a Configuration object passed to <PlexyCheckout config={...}>:

import { Configuration } from '@plexy/react-native';

const configuration: Configuration = {
  environment: 'test', // switch to a live environment for real payments
  clientKey: 'YOUR_CLIENT_KEY',
  countryCode: 'KZ',
  amount: { currency: 'KZT', value: 10000 }, // value in minor units
  returnUrl: 'yourapp://payment',
};

Root options

ParameterDescriptionRequired
environmentWhich Plexy environment to talk to. Use test while developing; switch to a live environment when you go live. See Test vs live payments.Yes
clientKeyYour public client key (pb_...), used for client-side authentication.Yes
amountAmount shown on the Pay button, as { value, currency } in minor units — { value: 10000, currency: 'KZT' } is ₸100. For card pre-authorization set the value to 0.For Apple Pay and Google Pay, together with countryCode
countryCodeThe shopper's country in ISO 3166-1 alpha-2 format, for example KZ.For Apple Pay and Google Pay, together with amount
localeForce a specific locale for the payment UI (for example ru-RU). Defaults to the device locale. On the sessions flow this is controlled by the shopperLocale your backend sets when creating the session.No
returnUrlWhere the shopper lands after an external redirect. See Return URL.Yes

The amount is only shown on the Pay button when both amount and countryCode are set. Payment method titles come from the Plexy API, localized by the shopperLocale of your /sessions or /paymentMethods request.

Return URL

Use a custom URL scheme or an App/Universal Link of your app (maximum 1024 characters). Platform behavior differs:

  • iOS — any means of redirect can be used.
  • Android, Components — any means of redirect can be used.
  • Android, Drop-in — the value is overridden automatically by the SDK. Use await PlexyDropIn.getReturnURL() to obtain the value your backend needs:
import { Platform } from 'react-native';

import { PlexyDropIn } from '@plexy/react-native';

const returnUrl = Platform.select({
  ios: 'yourapp://payment',
  android: await PlexyDropIn.getReturnURL(),
});

On the advanced flow, pass data.returnUrl from the onSubmit callback straight into your /payments request — it already resolves this per platform.

Analytics

const configuration: Configuration = {
  // ...
  analytics: {
    enabled: true,
    verboseLogs: false,
  },
};
ParameterDescriptionRequired
enabledEnable or disable SDK analytics. Defaults to true.No
verboseLogsExtensive SDK logging, helpful while debugging. Defaults to false.No

Drop-in options

Configure the Drop-in payment sheet under dropin:

ParameterDescriptionRequired
showPreselectedStoredPaymentMethodShow the preselected stored payment method step. Defaults to true.No
skipListWhenSinglePaymentMethodSkip the payment method list when there is only one non-instant method. Defaults to false.No
titleCustom title for the preselected stored payment method view on iOS (defaults to the app name). No effect on Android.No
showRemovePaymentMethodButtonLet the shopper remove stored payment methods from the UI. Defaults to false. Works out of the box on the sessions flow; on the advanced flow you must also implement onDisableStoredPaymentMethod.No
onDisableStoredPaymentMethod(storedPaymentMethod, resolve, reject)Called on the advanced flow when the shopper removes a stored method. Call your backend to disable the token, then resolve() on success or reject() on failure.No

Card component options

Configure the card form under card:

ParameterDescriptionRequired
addressVisibilityBilling address form mode: "none", "postal", "full", or "lookup". Defaults to "none".No
allowedAddressCountryCodesISO 3166-1 alpha-2 codes shown in the country picker of the full address form.No
hideCvcHide the security code field entirely. Defaults to false.No
hideCvcStoredCardHide the security code field for stored cards. Defaults to false.No
holderNameRequiredShow and require the cardholder name field. Defaults to false.No
kcpVisibilityShow security fields for South Korea-issued cards: "show" or "hide". Defaults to "hide".No
showStorePaymentFieldShow the "save this card" toggle. Defaults to true.No
socialSecurityVisibility of the CPF/CNPJ field for Brazilian cards: "show" or "hide". Defaults to "hide".No
supportedAllowed card brands. Defaults to the brands list from the payment method.No
installmentOptionsInstallment configuration keyed by card brand ("visa", "mc", "amex") or "card" for all brands. Each entry has values (allowed installment counts) and optional plans ("regular" and/or "revolving").No
showInstallmentAmountShow the per-installment amount in the form. Defaults to false.No
onUpdateAddress(prompt, lookup)Provide address lookup.update(results) suggestions for the shopper's prompt. Used with addressVisibility: "lookup".No
onConfirmAddress(address, lookup)Confirm the selected address with lookup.confirm(address). Used with addressVisibility: "lookup".No
onBinLookup(binData)Called when BIN lookup data becomes available.No
onBinValue(binValue)Called when the BIN (first 6–8 digits) typed by the shopper changes.No

3D Secure 2

ParameterDescriptionRequired
requestorAppUrlAlternative return URL for the 3D Secure 2 out-of-band flow. Always use a Universal Link (iOS) / App Link (Android).No

Partial payments

ParameterDescriptionRequired
pinRequiredShow the security code field. Defaults to true.No
onBalanceCheckCalled when a balance check is needed — call the /paymentMethods/balance API.No
onOrderRequestCalled when a partial payment order is needed — call the /orders API.No
onOrderCancelCalled when the order must be cancelled — call the /orders/cancel API.No

See Partial payments for the server side of this flow.

Wallets

Apple Pay (applepay) and Google Pay (googlepay) have their own configuration sections — see Apple Pay & Google Pay.

Full example

const configuration: Configuration = {
  environment: 'test',
  clientKey: 'YOUR_CLIENT_KEY',
  countryCode: 'KZ',
  amount: { currency: 'KZT', value: 10000 },
  returnUrl: 'yourapp://payment',
  analytics: {
    enabled: true,
    verboseLogs: false,
  },
  dropin: {
    skipListWhenSinglePaymentMethod: true,
    showPreselectedStoredPaymentMethod: false,
  },
  card: {
    holderNameRequired: true,
    showStorePaymentField: false,
    hideCvcStoredCard: true,
    installmentOptions: {
      card: { values: [2, 3] },
      visa: { values: [2, 3, 4], plans: ['revolving'] },
    },
    showInstallmentAmount: true,
  },
  threeDS2: {
    requestorAppUrl: 'https://your-universal-link.example.com/',
  },
};

Localization

The payment UI uses the device locale by default and falls back to en-US for unsupported locales. To force a locale, set configuration.locale (advanced flow) or shopperLocale on your session request (sessions flow).

To override individual strings:

  • iOS — add a Localizable.strings file per localization in Xcode and override the keys you need. Make sure the Xcode project's "Localizations" list contains every language you support.
  • Android — override the SDK strings in /res/values/strings.xml via Android Studio's Translations Editor.

On this page