Skip to content

Revolut Pay

Revolut Pay

Provider key: Revolut:RevolutPay

Renders: a Revolut Pay button using the Revolut Checkout Payments SDK.

Options — RevolutPayOptions

Required

FieldTypeDescription
publicTokenstringRevolut public API key. Use pk_sbox_... for sandbox, pk_live_... for production.
currencystringISO 4217 currency code (e.g. 'EUR', 'GBP').
totalAmountnumberAmount in minor units (e.g. 19300 = €193.00).

Optional

FieldTypeDefaultDescription
isShippingCustomerDataRequiredbooleanfalseWhen false (default), Revolut Pay collects the shipping address from the shopper (requestShipping: true). When true, the backend already supplies the address and Revolut Pay skips collection (requestShipping: false).
localestringCheckout UI locale. Accepts collana pay format (de-DE) or Revolut format (de).

Checkout flow flags

isShippingCustomerDataRequired follows the shared CheckoutFlowFlags convention used across providers: false = PSP collects the data, true = backend already has it. The flag maps inverted to the Revolut SDK: requestShipping = !isShippingCustomerDataRequired.

Style — RevolutPayStyle

FieldTypeDescription
variant'dark' | 'light' | 'light-outlined'Button color variant
radius'none' | 'small' | 'large' | 'round'Button border radius
size'small' | 'large'Button size
heightstringButton height as CSS value (e.g. '40px', '3rem'). SDK default when omitted.
action'donate' | 'pay' | 'subscribe' | 'buy'Label shown on the button face. Default: 'pay'.

Example

html
<div id="revolut-container"></div>
js
const buttons = CollanaPay.ExpressButtons({
  providers: [
    {
      providerProtocolType: 'Revolut',
      paymentMethodType: 'RevolutPay',
      container: '#revolut-container',
      style: {
        variant: 'dark',
        radius: 'small',
        size: 'large',
      },
      options: {
        publicToken: 'pk_sbox_YOUR_TOKEN',
        currency: 'EUR',
        totalAmount: 19300,   // €193.00
        // isShippingCustomerDataRequired: false  → Revolut collects shipping (default)
        // isShippingCustomerDataRequired: true   → backend already has shipping address
      },
    },
  ],

  onClick: async (identity, options) => {
    const res = await fetch('/api/orders', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ provider: identity, options }),
    });
    const transaction = await res.json();
    return transaction.checkoutData;
  },

  onCancel: (identity) => {
    console.log('Revolut Pay cancelled', identity);
  },

  onError: (identity, error) => {
    console.error('Revolut Pay error', error);
  },
});

buttons.render();

CollanaPay SDK Documentation