Hyperse
  • Pricing
  • FAQs
Newsletter

Subscribe to our newsletter

Receive weekly updates with latest collections and exclusive offers, straight to your inbox.

Hyperse

Headless commerce solutions for brands, developers, and modern ecommerce teams.

Explore

  • Home
  • About Us
  • Partners
  • FAQs

Legal & resources

  • Proposal
  • Privacy Policy
  • Terms & Conditions

© 2026 Hyperse. All rights reserved.


  1. Home
  2. Vendure Plugins
  3. hps-plugin-payment-stripe
hps-plugin-payment-stripe

hps-plugin-payment-stripe

By Hyperse

hps-plugin-payment-stripe is a Payment Stripe plugin in the Hub Pay group.hps-plugin-payment-stripe provides Payment Stripe plugin capabilities for Hub Pay. Payments, billing, invoicing, and money-related capabilities. It is especially useful for payment workflows.

CoreVendure Plugins

Specifications

Technical details and package information for this product.

Package

@hyperse-hub/hps-plugin-payment-stripe

Support by

Hyperse

Support languages

TypeScript, JavaScript, Prolog, Shell, CSS

Integration type

Core

Category

Vendure Plugins

Compatible with

^3.0.0

Latest version

1.0.12

Downloads

0

Repository

ssh://git@github.com/hyperse-hub/hub-pay

Last published

July 13, 2026

Description
Changelog
loading...

On this page

  • @hyperse-hub/hps-plugin-payment-stripe
    • 1. Overview
    • 2. Requirements
    • 3. Install
    • 4. Vendure registration
      • 4.1 Required: vendureHost
      • 4.2 Subscriptions
      • 4.3 Optional: Stripe customer linking
      • 4.4 Optional: PaymentIntent and customer hooks
    • 5. Key concepts
      • 5.1 Payment method configuration (Admin)
      • 5.2 Raw body and middleware
      • 5.3 Handler behavior (high level)
      • 5.4 Shop GraphQL (non-exhaustive)
      • 5.5 Polling
    • 6. Mental model: one-off payment
    • 7. Related packages
    • 8. License

@hyperse-hub/hps-plugin-payment-stripe

Stripe payment integration for Vendure: one-off PaymentIntent flows, Stripe webhooks with raw-body verification, and optional subscription billing (separate handler, Admin and Shop GraphQL, dedicated webhook route).

1. Overview

  1. Two payment handlers — Standard card payments (stripe) and Stripe subscriptions (stripe-subscription handler) for recurring catalog items.
  2. Webhooks — HTTP routes under payment/stripe use raw body middleware so Stripe signature verification is correct. Subscription events use a separate path.
  3. Storefront — Creates a PaymentIntent via GraphQL and returns clientSecret + transactionId for the Stripe.js client; settlement is aligned with webhook processing and Vendure’s payment APIs.
  4. Payment core — Imports HpsPluginPaymentCore for shared helpers (PaymentHelperService, refreshPaymentStatus, quote fields).

2. Requirements

  • Vendure >= 3.0.0
  • Node.js >= 20
  • body-parser (peer) — Used with the raw-body middleware for Stripe webhooks.
  • @hyperse-hub/hps-plugin-payment-core (installed transitively with this package)

3. Install

yarn add @hyperse-hub/hps-plugin-payment-stripe

4. Vendure registration

4.1 Required: vendureHost

Set vendureHost to the public origin of your API (no trailing path), for example https://shop.example.com. It is used when building webhook URLs (including subscription webhooks documented in code).

4.2 Subscriptions

  • commerceRecurringStrategy — Controls how recurring prices are interpreted (defaults to DefaultCommerceRecurringStrategy from payment-core).
  • The plugin registers SubscriptionOrderItemCalculation as the order item price calculation strategy so subscription line items behave correctly.

4.3 Optional: Stripe customer linking

If stripe.storeCustomersInStripe is true, the plugin stores Stripe customer IDs on the Vendure Customer entity (custom fields). Requires a DB migration/sync.

4.4 Optional: PaymentIntent and customer hooks

  • stripe.metadata — Async function to attach metadata to PaymentIntent creation; merged with metadata from paymentIntentCreateParams if both exist.
  • stripe.paymentIntentCreateParams — Extra Stripe PaymentIntentCreateParams (amount/currency/customer are already set by the plugin).
  • stripe.customerCreateParams — Extra CustomerCreateParams when creating Stripe customers (email/name are already set).

5. Key concepts

5.1 Payment method configuration (Admin)

Create one or more PaymentMethod rows with the Stripe handler. Configure:

  • API key — Secret key from the Stripe Dashboard.
  • Publishable key (optional) — For Stripe.js; exposed on the quote for the storefront.
  • Webhook secret — Signing secret for the webhook endpoint you configure in Stripe.

Point Stripe webhooks to:

  • PaymentIntents / payment events — POST {vendureHost}/payment/stripe/webhook
  • Subscriptions — POST {vendureHost}/payment/stripe-subscriptions/webhook

Register the events your deployment uses (the plugin filters to supported event types in code).

5.2 Raw body and middleware

The plugin registers middleware before listen on the Stripe webhook routes so the request body remains raw for signature verification. Do not remove or double-parse that body in your app for the same routes.

5.3 Handler behavior (high level)

  • Standard Stripe handler — createPayment in admin context reconciles payment after the webhook has established the intent; storefront flows use createStripePaymentIntent + client SDK + webhook + addPaymentToOrder as implemented in the service layer.
  • Subscription handler — Separate code path for recurring products; uses Admin and Shop GraphQL extensions under this package.

5.4 Shop GraphQL (non-exhaustive)

  • createStripePaymentIntent — Returns { clientSecret, transactionId } for the active session order.
  • PaymentMethodQuote fields — e.g. publishable key resolvers for Stripe (and subscription-related fields from the extended schema).

5.5 Polling

Use refreshPaymentStatus from payment-core with orderId and transactionId when the client needs to sync settlement after redirect or SDK completion.

6. Mental model: one-off payment

  1. Authenticated customer has an active order.
  2. createStripePaymentIntent creates the PaymentIntent and returns secrets/ids for Stripe.js.
  3. Customer completes payment in the Stripe UI.
  4. Stripe calls /payment/stripe/webhook; the server validates the signature and updates order/payment state through Vendure.
  5. Storefront calls addPaymentToOrder as required by your integration; use refreshPaymentStatus if you need a poll-based fallback.

7. Related packages

  • @hyperse-hub/hps-plugin-payment-core — refreshPaymentStatus, PaymentMethodQuote.clientConfig, DefaultCommerceRecurringStrategy, subscription strategy types.

8. License

MIT

import { HpsPluginPaymentStripe } from '@hyperse-hub/hps-plugin-payment-stripe';
import { DefaultCommerceRecurringStrategy } from '@hyperse-hub/hps-plugin-payment-core';
// plugins: [
// HpsPluginPaymentStripe.init({
// vendureHost: 'https://your-domain.com',
// commerceRecurringStrategy: new DefaultCommerceRecurringStrategy(),
// stripe: {
// // optional: storeCustomersInStripe, metadata, paymentIntentCreateParams, customerCreateParams
// },
// }),
// ],