CoverPay Link

CoverPay Link is a drop-in module that provides a secure, elegant authentication flow for your users to connect to BNPL providers. Similar to Plaid Link, it handles the entire checkout experience — provider selection, eligibility, and payment confirmation — so you don't have to build it yourself.

How Link Works

CoverPay Link abstracts the complexity of multi-provider BNPL into four steps. Your app initializes the SDK, opens the modal, and receives a payment token on success.

1
Initialize

Configure SDK with your client ID and environment

2
Open

Call open() with amount, merchant name, and callbacks

3
Select Provider

User picks from Klarna, Affirm, Afterpay, and more

4
Receive Token

Get a payment token to confirm server-side

Link Flow

┌─────────────────────────────────────────────────┐

Your App

│ │

│ 1. CoverPay.create({ clientId, env }) │

│ 2. coverpay.open({ amount, merchant }) │

│ │

│ ┌─────────────────────────────────────────────┐ │

│ │ CoverPay Link Modal │ │

│ │ │ │

│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │

│ │ │ Klarna │ │ Affirm │ │ Afterpay │ ... │ │

│ │ └──────────┘ └──────────┘ └──────────┘ │ │

│ │ │ │

│ │ Smart Router selects best provider │ │

│ │ User confirms plan → payment token returned │ │

│ └─────────────────────────────────────────────┘ │

│ │

│ 3. onSuccess({ paymentToken, provider }) │

│ 4. POST /v1/checkout/confirm { token }

└─────────────────────────────────────────────────┘

Platform Support

CoverPay Link is available on web and iOS. Each platform provides a native integration that matches the platform's conventions.

PlatformPackageStatusMin Version
Web / JavaScript@coverpay/sdkStableES2018+
React@coverpay/reactStableReact 18+
iOS / SwiftCoverPaySDKBetaiOS 16+

Configuration Options

These options are shared across all platforms. See platform-specific pages for additional options.

ParameterTypeRequiredDescription
clientIdstringRequiredYour CoverPay API client ID from the dashboard
environment"sandbox" | "production"RequiredAPI environment. Use sandbox for testing.
amountnumberRequiredCheckout amount in cents (e.g., 9999 = $99.99)
merchantNamestringRequiredYour business name, displayed in the checkout modal
customerEmailstringOptionalPre-fill the customer email for faster checkout
onSuccessfunctionRequiredCallback when payment is authorized. Receives payment token.
onErrorfunctionOptionalCallback when an error occurs during checkout
theme"light" | "dark" | "auto"OptionalUI theme for the checkout modal. Defaults to auto.

Quick Example

import { CoverPay } from '@coverpay/sdk';

const coverpay = CoverPay.create({
  clientId: 'your_client_id',
  environment: 'sandbox',
});

const result = await coverpay.open({
  amount: 9999,
  merchantName: 'My Store',
  customerEmail: 'user@example.com',
  onSuccess: (result) => {
    console.log('Payment token:', result.paymentToken);
    console.log('Provider:', result.provider);
  },
  onError: (error) => {
    console.error('Checkout failed:', error);
  },
});

Platform Guides

Need server-side integration?

CoverPay Link handles the client-side checkout. To confirm payments and receive webhooks, see the API Reference and Webhooks guide.