npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sumup/vendure-plugin

v0.3.1

Published

SumUp payment plugin for Vendure.

Readme

@sumup/vendure-plugin

Vendure Plugin Registry NPM Version CI Downloads License Node.js

Accept payments in Vendure with SumUp Hosted Checkout or the SumUp Payment Widget.

Requires Node.js 20 or later and Vendure ^3.6.4. Keep your SumUp API key on the server. SumUp collects the shopper's payment details.

Installation

npm install @sumup/vendure-plugin

Vendure Configuration

Register the plugin and payment handler:

import { VendureConfig } from "@vendure/core"

import { SumUpPlugin, sumUpPaymentHandler } from "@sumup/vendure-plugin"

export const config: VendureConfig = {
  // ...
  plugins: [
    SumUpPlugin.init({
      apiKey: process.env.SUMUP_API_KEY!,
      merchantCode: process.env.SUMUP_MERCHANT_CODE!,
      checkoutMode: "hosted",
      returnUrl: "https://your-vendure.example/payments/sumup/webhook",
      redirectUrl: "https://storefront.example/checkout/sumup/return",
    }),
  ],
  paymentOptions: {
    paymentMethodHandlers: [sumUpPaymentHandler],
  },
}

Set returnUrl to your Vendure server's public /payments/sumup/webhook URL so SumUp can send payment updates. Set redirectUrl to the storefront page the shopper should return to after checkout.

Create the Payment Method

Create and enable a payment method in the Vendure Admin UI:

  • Code: sumup
  • Handler: sumup

You can override merchantCode, checkoutMode, returnUrl, redirectUrl, and paymentDescription in the payment method's handler arguments. Otherwise, the values from SumUpPlugin.init() apply.

Create a Checkout

Once the order is in ArrangingPayment, call addPaymentToOrder with method: "sumup":

mutation AddPaymentToOrder {
  addPaymentToOrder(
    input: { method: "sumup", metadata: { checkout_mode: "hosted" } }
  ) {
    ... on Order {
      id
      state
      payments {
        state
        transactionId
        metadata
      }
    }
    ... on ErrorResult {
      errorCode
      message
    }
  }
}

The response includes the checkout details in payments[].metadata.public.

You can pass an empty metadata object to use the configured checkout mode. To supply your own checkout reference, set metadata.checkout_reference; otherwise, the plugin uses the order code. Use a new reference when creating a replacement checkout.

Hosted Checkout

Hosted Checkout is the default. You can also select it with metadata.checkout_mode: "hosted".

After addPaymentToOrder, redirect the shopper to:

payments[].metadata.public.hostedCheckoutUrl

Payment Widget

Set checkoutMode: "widget" in your configuration or pass metadata.checkout_mode: "widget" when creating the payment.

After addPaymentToOrder, read:

payments[].metadata.public.checkoutId

Use that checkoutId to mount the SumUp Payment Widget in your storefront.

Payment Status

Creating a checkout leaves the payment in SumUpPending and the order in ArrangingPayment. The order stays unpaid while the shopper completes checkout.

When SumUp sends an update, the plugin checks the checkout status with SumUp and updates the payment:

| Checkout result | Vendure payment state | | ---------------- | --------------------- | | Paid | Settled | | Failed | Declined | | Expired | Cancelled | | Awaiting payment | SumUpPending |

A fully paid order moves to PaymentSettled. Confirm the order's payment status before fulfilling it. Returning to redirectUrl or receiving a widget success event alone does not confirm payment.

Public Payment Metadata

The plugin exposes these fields in payments[].metadata.public:

| Field | Description | | ------------------- | ------------------------------------------ | | checkoutId | SumUp checkout id | | checkoutReference | Merchant checkout reference sent to SumUp | | checkoutMode | hosted or widget | | hostedCheckoutUrl | Hosted Checkout URL when SumUp returns one | | redirectUrl | Redirect URL associated with the checkout |

Configuration Options

| Option | Required | Description | | --------------------- | -------- | ------------------------------------------------------------------------------------------------------------- | | apiKey | Yes | SumUp API key or access token. Keep it server-side. | | merchantCode | Yes | SumUp merchant code that receives the payment. | | defaultLanguageCode | No | Language used for the handler description shown in Vendure. | | checkoutMode | No | Default checkout mode: hosted or widget. Defaults to hosted. | | returnUrl | No | Backend callback URL used by SumUp for checkout status updates. | | redirectUrl | No | URL the shopper is sent to after redirect-based payment flows. | | paymentDescription | No | Default SumUp checkout description. | | timeout | No | SumUp SDK request timeout in milliseconds. | | maxRetries | No | SumUp SDK retry count. | | supportedCurrencies | No | Override the list of accepted currencies. The currency must also be supported by your SumUp merchant account. |

Contributing

See CONTRIBUTING.md for local development, tests, custom API clients, and releases.