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-core
hps-plugin-payment-core

hps-plugin-payment-core

By Hyperse

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

CoreVendure Plugins

Specifications

Technical details and package information for this product.

Package

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

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...

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

Shared payment infrastructure for Vendure: shop GraphQL extensions, reusable services, and conventions that provider-specific plugins (PayPal, Stripe, and others) build on.

1. Role in the stack

  1. Foundation layer — Provider plugins import HpsPluginPaymentCore and extend the same patterns (payment handlers, webhooks, storefront config).
  2. Cross-cutting Shop API — Adds fields and mutations that are not tied to a single PSP, so the storefront can poll settlement and read normalized client configuration.
  3. Optional integrations — Exports hooks such as reward-points payment integration for other hub-pay packages.

2. Requirements

  • Vendure >= 3.0.0
  • Node.js >= 20

3. Install

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

4. Vendure registration

Register the plugin like any other Vendure plugin. Provider packages already import it; you only add this explicitly if you consume the API or services without a provider plugin, or when building a custom payment plugin.

import { HpsPluginPaymentCore } from '@hyperse-hub/hps-plugin-payment-core'; // plugins: [ // HpsPluginPaymentCore.init({}), // // ... payment provider plugins that depend on it // ],

5. Key concepts

5.1 Shop GraphQL extensions

  • PaymentMethodQuote.clientConfig — Resolved from PaymentMethod.customFields.clientConfig (JSON). Lets the Admin UI store a structured blob (for example publishable keys or SDK options) and exposes it to the storefront as parsed JSON. Keys depend on each provider.
  • refreshPaymentStatus — Mutation for post-checkout polling. After redirect or hosted UI, the client sends the active order id and the transactionId from addPaymentToOrder. The server finds that payment by both orderId and transactionId, then runs settlePayment so multiple pending payments on one order stay unambiguous. Returns true if the payment is already or becomes Settled.

5.2 Custom fields

  • PaymentMethod.clientConfig — Text field (JSON in Admin) used to pass storefront-safe configuration; often combined with PaymentMethodQuote.clientConfig resolution.
  • Order — Additional custom fields used by the payment stack (see package source for the exact list).

5.3 Built-in payment handler (development)

The plugin registers a dummy payment method handler and an admin-only eligibility checker so local development and tests can exercise the payment pipeline without a real PSP.

5.4 Exported utilities

  • PaymentHelperService — Resolves PaymentMethod by handler code, builds channel/order metadata for webhooks, loads orders. Used by provider controllers (PayPal, Stripe).
  • orderPaidStates — Order states treated as “paid” for webhook/settlement logic (e.g. PaymentSettled, shipped states, cancelled as appropriate for your flows).

5.5 Subscription helpers

The package exports subscription-related types and strategies (for example DefaultCommerceRecurringStrategy) consumed by the Stripe subscription integration.

6. Typical usage

  1. As a dependency of a provider plugin — You normally do not install this package alone; install @hyperse-hub/hps-plugin-payment-paypal or @hyperse-hub/hps-plugin-payment-stripe, which already import the core.
  2. Storefront — After addPaymentToOrder, call refreshPaymentStatus when the customer returns from a redirect or when the SDK completes, until the payment settles or you handle failure in UI.
  3. Custom provider plugins — Import HpsPluginPaymentCore, reuse PaymentHelperService, extend PaymentMethodQuote / refreshPaymentStatus patterns, and store public config in PaymentMethod.customFields.clientConfig where it fits your design.

7. License

MIT

On this page

  • @hyperse-hub/hps-plugin-payment-core
    • 1. Role in the stack
    • 2. Requirements
    • 3. Install
    • 4. Vendure registration
    • 5. Key concepts
      • 5.1 Shop GraphQL extensions
      • 5.2 Custom fields
      • 5.3 Built-in payment handler (development)
      • 5.4 Exported utilities
      • 5.5 Subscription helpers
    • 6. Typical usage
    • 7. License