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
| Parameter | Description | Required |
|---|---|---|
environment | Which Plexy environment to talk to. Use test while developing; switch to a live environment when you go live. See Test vs live payments. | Yes |
clientKey | Your public client key (pb_...), used for client-side authentication. | Yes |
amount | Amount 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 |
countryCode | The shopper's country in ISO 3166-1 alpha-2 format, for example KZ. | For Apple Pay and Google Pay, together with amount |
locale | Force 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 |
returnUrl | Where 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,
},
};| Parameter | Description | Required |
|---|---|---|
enabled | Enable or disable SDK analytics. Defaults to true. | No |
verboseLogs | Extensive SDK logging, helpful while debugging. Defaults to false. | No |
Drop-in options
Configure the Drop-in payment sheet under dropin:
| Parameter | Description | Required |
|---|---|---|
showPreselectedStoredPaymentMethod | Show the preselected stored payment method step. Defaults to true. | No |
skipListWhenSinglePaymentMethod | Skip the payment method list when there is only one non-instant method. Defaults to false. | No |
title | Custom title for the preselected stored payment method view on iOS (defaults to the app name). No effect on Android. | No |
showRemovePaymentMethodButton | Let 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:
| Parameter | Description | Required |
|---|---|---|
addressVisibility | Billing address form mode: "none", "postal", "full", or "lookup". Defaults to "none". | No |
allowedAddressCountryCodes | ISO 3166-1 alpha-2 codes shown in the country picker of the full address form. | No |
hideCvc | Hide the security code field entirely. Defaults to false. | No |
hideCvcStoredCard | Hide the security code field for stored cards. Defaults to false. | No |
holderNameRequired | Show and require the cardholder name field. Defaults to false. | No |
kcpVisibility | Show security fields for South Korea-issued cards: "show" or "hide". Defaults to "hide". | No |
showStorePaymentField | Show the "save this card" toggle. Defaults to true. | No |
socialSecurity | Visibility of the CPF/CNPJ field for Brazilian cards: "show" or "hide". Defaults to "hide". | No |
supported | Allowed card brands. Defaults to the brands list from the payment method. | No |
installmentOptions | Installment 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 |
showInstallmentAmount | Show 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
| Parameter | Description | Required |
|---|---|---|
requestorAppUrl | Alternative return URL for the 3D Secure 2 out-of-band flow. Always use a Universal Link (iOS) / App Link (Android). | No |
Partial payments
| Parameter | Description | Required |
|---|---|---|
pinRequired | Show the security code field. Defaults to true. | No |
onBalanceCheck | Called when a balance check is needed — call the /paymentMethods/balance API. | No |
onOrderRequest | Called when a partial payment order is needed — call the /orders API. | No |
onOrderCancel | Called 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.stringsfile 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.xmlvia Android Studio's Translations Editor.