Skip to main content

Drop-in API Reference

PayrailsDropin

Properties


Events


Style

Pass a DropinStyles object to the styles property.

Payment Methods Configuration

Controls how individual payment methods appear and behave within the Drop-in.

Translations

All UI strings are localised through the translations prop.

Elements API Reference

All Elements must be rendered inside a PayrailsProvider. For usage examples, see How to Use Elements.

PayWithCardButton

Renders a payment button for a stored card instrument. The button displays the card network icon and masked card number automatically. It is disabled while a payment request is in progress. Hooks

PayWithNewCardButton

Renders the submit button for a new card payment. Must be placed inside a TokenizationForm. The button is automatically disabled until all card fields pass validation. Related hooks

ApplePay

Renders the native Apple Pay button on iOS. Returns null on Android and when Apple Pay is unavailable. Hooks

GooglePay

Renders the native Google Pay button on Android. Returns null on iOS and when Google Pay is unavailable. Hooks

PayPal

Renders a PayPal payment button. Works on both iOS and Android. Hooks

GenericRedirect

Renders a redirect-based payment button for methods such as iDEAL, Pix, Yape, MercadoPago, and others.
paymentMethodCode must match the payment method code from your configuration exactly, including case.
RedirectModes

Lean

Renders a bank transfer payment button for the UAE, powered by the Lean SDK checkout dialog. Prerequisites
  • Lean requires the peer dependency lean-react-native with version 4.2.0. Earlier versions may not be compatible.
  • Also install react-native-webview if it is not already installed in your project.
React Native
The button label is fixed to “Pay by bank with Al Tareq.” and cannot be overridden via translations. LeanCustomization For payment completion options, see Payment Completion Modes.

Event Callbacks

All Elements share the same callback contract. See the React Native event glossary for full type definitions.
Last modified on September 30, 2026