# rn-truelayer-payments-sdk

> RN wrapper for TrueLayer's payments SDK

Latest version **3.1.4** (published 2026-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install rn-truelayer-payments-sdk
pnpm add rn-truelayer-payments-sdk
yarn add rn-truelayer-payments-sdk
bun add rn-truelayer-payments-sdk
```

## Health

**Score 50/100 (C)** — status: active.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 3.1.4 |
| Published | 2026-07-16 |
| First published | 2023-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 117.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | TrueLayer Limited |
| Maintainers | tl-kieran-allen, truelayer-svc |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/rn-truelayer-payments-sdk
- Repository: https://github.com/TrueLayer/truelayer-react-native-sdk
- Homepage: https://github.com/TrueLayer/truelayer-react-native-sdk#readme
- Issues: https://github.com/TrueLayer/truelayer-react-native-sdk/issues
- npm.io page: https://npm.io/package/rn-truelayer-payments-sdk

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 3.1.4 (latest) — 2026-07-16
- 3.1.3 — 2026-05-15
- 3.1.2 — 2026-02-27
- 3.1.1 — 2025-11-28
- 3.1.0 — 2025-11-13
- 3.0.1 — 2025-09-10
- 3.0.0 — 2025-08-13
- 2.3.0 — 2025-02-03
- 2.2.1 — 2024-10-17
- 2.2.0 — 2024-09-23
- 2.1.0 — 2024-04-22
- 2.0.0 — 2024-03-06
- 1.4.0 — 2023-12-14
- 1.3.1 — 2023-05-16
- 1.3.0 — 2023-05-11
- … 4 more at https://npm.io/package/rn-truelayer-payments-sdk/versions

## README

# TrueLayer Payments SDK

TrueLayer's React Native SDK allows you to quickly add open banking payments to your app. The SDK integrates with TrueLayer's Payments API, making it simple to get up and running.

The SDK presents native screens that allow your users to select their bank and consent to the payment. The user is then redirected to their banking app or website to authorise the payment. It also handles the network requests and errors.

## Table of Contents

- [TrueLayer Payments SDK](#truelayer-payments-sdk)
  - [Table of Contents](#table-of-contents)
  - [How to Install the SDK](#how-to-install-the-sdk)
  - [Setup](#setup)
    - [Prerequisites](#prerequisites)
      - [Setting Up Your Backend](#setting-up-your-backend)
      - [Payments Quickstart](#payments-quickstart)
      - [Minimum Versions](#minimum-versions)
    - [Android specific setup](#android-specific-setup)
    - [Additional setup to use the SDK with Expo](#additional-setup-to-use-the-sdk-with-expo)
    - [Using the SDK with Expo](#using-the-sdk-with-expo)
  - [How to Use the SDK](#how-to-use-the-sdk)
  - [How to setup the DemoApp](#how-to-setup-the-demoapp)

## How to Install the SDK

Using Yarn:

`yarn add rn-truelayer-payments-sdk`

Using npm:

`npm install rn-truelayer-payments-sdk --save`

In your iOS folder, run the Cocoapods install command:

- If using the [New Architecture](https://reactnative.dev/docs/new-architecture-intro), run:

	```
	RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
	```
- If using the old architecture, run:

	```
	bundle exec pod install
	```

## Setup

### Prerequisites

#### Setting Up Your Backend

- Create an account in the [TrueLayer console](https://console.truelayer.com/).
  Follow [this guide](https://docs.truelayer.com/docs/get-started-with-truelayer) to set it up correctly.

- You need a backend which is able to retrieve an access token and create a payment on behalf of the user. This is to enforce security on the client, avoiding the need to store static secrets in your app. The API documentation can be found [here](https://docs.truelayer.com/).

Finally, your app should setup a payment. Once the payment has been setup, it is possible to delegate all the remaining parts of the process to the SDK. To set up a payment, the backend should:

1. [Authenticate with TrueLayer](https://docs.truelayer.com/docs/retrieve-a-token-in-your-server-for-payments-v3).
2. [Create a Payment](https://docs.truelayer.com/docs/single-payments-for-payments-v3).
3. Return the payment identifier and the resource token to the app.

#### Payments Quickstart

Alternatively, you can use our [open source server](https://github.com/TrueLayer/payments-quickstart).

#### Minimum Versions

- Xcode 14.x and iOS 14.0.
- Android 7.0 (API level 24)

### Android specific setup

Enable Core Library Desugaring and update packing options to remove excess LICENSE-MIT files.

In order to be able to run on API level below 26 the SDK requires your application to have core library desugaring enabled. Without this the SDK will crash. 

```groovy
android {
    // this part will enable core library desugaing
    compileOptions {
        coreLibraryDesugaringEnabled true
    }
    
    // this part will remove excess LICENSE-MIT files
    packagingOptions {
        resources {
            excludes += '/META-INF/{AL2.0,LGPL2.1}'
            pickFirsts += ['META-INF/LICENSE-MIT']
        }
    }
}

dependencies {
    // Add to your projects `build.gradle`.
    // We are currently using following version of desuga libraries
    coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.5"
}
```

### Additional setup to use the SDK with Expo 52

Please check [Expo Integration](docs/Expo.md)

## How to Use the SDK

1.  Import the SDK:

```typescript
import {
  TrueLayerPaymentsSDKWrapper,
  Environment,
  ResultType,
} from "rn-truelayer-payments-sdk";
```

2.  Configure the SDK with the given environment (`Environment.Sandbox` or `Environment.Production`):

```typescript
TrueLayerPaymentsSDKWrapper.configure(Environment.Sandbox).then(
  () => {
    console.log("Configure success");
  },
  (reason) => {
    console.log("Configure failed " + reason);
  }
);
```

3.  Checkout [Documentation](docs/DOCUMENTATION.md).


## How to setup the DemoApp
Go to [DemoApp](DemoApp/README.md) for more information.

---
_Source: https://npm.io/package/rn-truelayer-payments-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
