Easy Labs
SDKsReact Native

TypeScript

Type-level conventions and exported types in @easylabs/react-native.

@easylabs/react-native is written in TypeScript and built against @tsconfig/strictest. All exports ship with .d.ts files; no extra @types/* package is required.

Public types

The package re-exports two upstream type sets, plus its own React Native-specific helper types.

Re-exported from @easylabs/common

The full payments domain model. Pull these types when you need to type your own state, server responses, or wrapper utilities.

import type {
  // Responses
  ApiResponse,
  ErrorResponse,
  Paginated,
  PaginationParams,

  // Customers
  CreateCustomer,
  CustomerData,

  // Payment instruments
  CreatePaymentInstrument,
  CreatePaymentInstrumentBase,
  UpdatePaymentInstrument,
  PaymentInstrumentData,
  FinixPaymentInstrumentData,
  Address,
  AccountType,

  // Money movement
  CreateTransfer,
  TransferData,

  // Catalog
  CreateProduct,
  CreatePrice,
  ProductData,
  PriceData,

  // Subscriptions
  CreateSubscription,
  SubscriptionData,

  // Checkout
  CreateCheckoutSession,
} from '@easylabs/react-native';

Re-exported from @basis-theory/react-native-elements

The element ref types. You'll attach these to useRef<…>(null) calls in any component that captures card or bank data.

TypeUsed for
BTRefRefs for CardNumberElement, CardVerificationCodeElement, and TextElement.
BTDateRefRef for CardExpirationDateElement (exposes .month() / .year() for tokenization).
InputBTRefUnderlying { id, format } shape produced by element refs — useful when typing custom token payloads.
ElementEventPayload of onChange, onFocus, and onBlur element callbacks (empty, complete, valid, errors, brand, cardLast4, cvcLength, cardBin).
import { type BTDateRef, type BTRef, CardNumberElement } from '@easylabs/react-native';
import { useRef } from 'react';

const cardNumberRef = useRef<BTRef>(null);
const expirationRef = useRef<BTDateRef>(null);

React Native-specific helper types

Defined in this package and exported from the package root.

TypeDescription
ClientOptions{ apiKey?: string } — minimal options shape exposed for forward compatibility.
CreatePaymentInstrumentParamsDiscriminated union of PAYMENT_CARD and BANK_ACCOUNT create payloads, with element refs in place of raw card or account data. Pass to createPaymentInstrument.
CreatePaymentInstrumentTokenParamsSlimmer ref-only union used by tokenizePaymentInstrument when you want a token but no instrument record yet.

Module augmentation

The SDK does not currently expose any module-augmentation slots. To add app-specific tag schemas, prefer typing them at your own call sites:

import type { CreateCustomer } from '@easylabs/react-native';

type AppCustomerTags = { source: 'web' | 'ios' | 'android'; campaign?: string };

const data: CreateCustomer & { tags: AppCustomerTags } = {
  first_name: 'Jane',
  last_name: 'Doe',
  tags: { source: 'ios', campaign: 'launch-2026' },
};

On this page