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

@antelopejs/stripe

v1.2.2

Published

A flexible payment module that implements the Stripe, payment and subscriptions interfaces of antelopejs

Readme

@antelopejs/stripe

The AntelopeJS Stripe provider implements portable payments and Stripe-native subscriptions with the official stripe SDK. It also implements the Stripe-specific API of @antelopejs/interface-stripe, with payment watchers and optional Redis fan-out.

Part of AntelopeJS, the TypeScript framework where modules depend on contracts and the application chooses the provider. Built by the team behind AntelopeJS DMS.

Choose an interface

| Consumer dependency | Use it for | | ------------------------------------- | --------------------------------------------------------------------------------------------------------- | | @antelopejs/interface-payment | Hosted checkout, direct payments, capture, refunds, customers, saved methods and normalized webhooks. | | @antelopejs/interface-subscriptions | Recurring billing scheduled by Stripe. This is the recommended subscription implementation for Stripe. | | @antelopejs/interface-stripe | Stripe SDK integrations and payment watchers. See the Stripe-specific guide. |

The generic payment-subscriptions scheduler is an alternative to Stripe-native subscriptions. Run one of the two, never both. The subscriptions guide shows how to switch.

Install and configure

Add the provider to the project and the payment interface to the consumer module:

ajs project modules add @antelopejs/stripe
ajs project modules install
pnpm add @antelopejs/interface-payment

The configuration guide has a complete package-source example with environment overrides, several accounts, and the optional API and Redis modules.

Portable checkout

Call this function from a consumer module that runs in AntelopeJS with this provider configured. The amount is an integer in minor units, so 2500 EUR means €25.00. Persist one idempotency key per logical checkout attempt, and reuse it only to retry that attempt.

import { CreateCheckoutSession } from "@antelopejs/interface-payment";

export async function checkoutOrder42() {
  const session = await CreateCheckoutSession(
    {
      reference: "order-42",
      amount: { value: 2500, currency: "EUR" },
      description: "Order 42",
      successUrl: "https://shop.example/orders/42/return",
      cancelUrl: "https://shop.example/orders/42/cancel",
    },
    "order-42:checkout:attempt-1",
  );
  return { sessionId: session.id, redirectUrl: session.redirectUrl };
}

Store the session ID and redirect the payer to redirectUrl. A browser return does not prove the payment. Read GetCheckoutSession when the payer returns, and fulfill the order from verified, deduplicated webhook events.

Documentation

Compatibility

| Package | Supported | Tested with | | ------------------------------------- | ----------------- | ----------- | | @antelopejs/interface-api | >=0.0.15 <1.0.0 | 0.0.15 | | @antelopejs/interface-core | >=0.4.0 <1.0.0 | 0.4.0 | | @antelopejs/interface-payment | >=0.2.0 <0.3.0 | 0.2.0 | | @antelopejs/interface-redis | >=0.0.9 <1.0.0 | 0.0.9 | | @antelopejs/interface-stripe | >=0.0.6 <0.1.0 | 0.0.6 | | @antelopejs/interface-subscriptions | >=0.1.0 <0.2.0 | 0.1.0 |

The table lists the interface ranges from package.json. .nvmrc sets the Node.js version for development, and dependencies in package.json sets the stripe SDK range.

Contributing and verification

Read CONTRIBUTING.md before opening a pull request. Run the local checks with pnpm:

pnpm install --frozen-lockfile
pnpm test
pnpm typecheck
pnpm lint
pnpm format:check
pnpm knip

pnpm test builds, then runs ajs module test . on four offline files: dist/test/provider-regressions.test.js, dist/test/webhook-events.test.js, dist/test/interface-stripe.test.js, and dist/test/redis-relay.test.js. They use a mocked Stripe transport, signed fixtures, and a mock Redis, not a real Stripe account.

pnpm test:stripe builds, then runs ANTELOPE_STRIPE_TEST_MODE=live ajs module test .. It needs a local STRIPE_KEY that starts with sk_test_. It refuses to run when CI is set, and it can create test-mode resources in your Stripe account. Run it before a release. A green offline run does not prove that the live Stripe API accepts the calls.

License

Apache-2.0