Skip to content

Introduction

CollanaPay SDK is a drop-in Express Payment Buttons library for any webshop. With a single ExpressButtons() call you render fully-branded, wallet-ready payment buttons — no deep integration with each provider SDK required.

Supported Providers

The SDK ships with 16 built-in provider implementations:

Provider KeyDescription
PayPal:PayPalExpressNative PayPal Express Checkout
PayPal:PayLaterNative PayPal Pay Later
Google:GooglePayGoogle Pay (direct)
Apple:ApplePayApple Pay (W3C Payment Request API)
Klarna:KlarnaKlarna button
Amazon:AmazonPayAmazon Pay
Adyen:PayPalExpressPayPal Express via Adyen Drop-in
Adyen:GooglePayGoogle Pay via Adyen Drop-in
Adyen:ApplePayApple Pay via Adyen Drop-in
Braintree:PayPalExpressPayPal Express via Braintree
Braintree:PayLaterPayPal Pay Later via Braintree
Computop:GooglePayGoogle Pay via Computop gateway
Computop:ApplePayApple Pay via Computop gateway
Mollie:ApplePayApple Pay via Mollie
Revolut:RevolutPayRevolut Pay
Stripe:GooglePayGoogle Pay via Stripe Express Checkout Element

Integration Modes

Script Tag (UMD)

Load the SDK directly from a CDN — no build step required:

html
<script src="https://cdn.example.com/collana-pay@VERSION/collana-pay.umd.js"
        integrity="sha384-..." crossorigin="anonymous"></script>

The SDK exposes window.CollanaPay with ExpressButtons and registerProvider.

npm (ESM)

Install as an npm package and import with a bundler (Vite, webpack, Rollup, etc.):

bash
npm install collana-pay-js
js
import { ExpressButtons } from 'collana-pay-js';

Architecture Overview

  1. Configure — Pass an ExpressButtonsConfig to ExpressButtons(). This includes a list of ProviderButtonConfig entries and four lifecycle callbacks (CallbackHandlers).
  2. Render — Call .render() on the returned instance. Each provider SDK is loaded and the button is mounted into the specified container element. Providers render in parallel via Promise.allSettled, so one failure does not block others.
  3. Callbacks — When the user clicks a button, onClick fires so you can create an order on your backend and return an OrderResult. The provider SDK then handles wallet authentication. On completion, onApprove, onCancel, or onError is called.

Next Steps

CollanaPay SDK Documentation