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

@acountpay/pis-sdk

v1.0.5

Published

A simple payment integration for your website that allows secure bank payments through Open Banking.

Readme

AcountPay SDK

A simple payment integration for your website that allows secure bank payments through Open Banking.

5-Minute Integration Guide

Step 1: Add the SDK to your website

Option A: Script tag (quickest)

<script src="https://cdn.acountpay.com/sdk/acount.umd.js"></script>

Option B: npm (React, Next.js, Vue, etc.)

npm i @acountpay/pis-sdk

Step 2: Create a payment button

<button id="pay-button">Pay with AcountPay</button>

<script>
  document.getElementById('pay-button').addEventListener('click', async function() {
    const acount = new Acount({
      clientId: "YOUR_CLIENT_ID" // Replace with your client ID from AcountPay dashboard
    });

    try {
      const { redirectUrl } = await acount.createPaymentLink({
        amount: 99.99,
        referenceNumber: "ORDER-123",
        redirectUrl: window.location.origin + "/payment-callback",
      });

      // Customer is taken to AcountPay's payment page to select bank and authenticate
      window.location.href = redirectUrl;
    } catch (error) {
      console.error("Payment failed:", error);
      alert("Could not start payment. Please try again.");
    }
  });
</script>

Step 3: Handle the return

After payment, the customer is returned to your redirectUrl with a ?status=success|failed|pending query parameter.

// On your callback page
const params = new URLSearchParams(window.location.search);
const status = params.get('status');

if (status === 'success') {
  // Show order confirmation
} else if (status === 'failed') {
  // Offer retry
} else {
  // Payment is processing
}

React / Next.js Integration

'use client';
import { useState } from 'react';
import AcountPay from '@acountpay/pis-sdk';

export function PaymentButton({ amount, orderId }: { amount: number; orderId: string }) {
  const [loading, setLoading] = useState(false);

  const handlePayment = async () => {
    setLoading(true);
    try {
      const acount = new AcountPay({
        clientId: process.env.NEXT_PUBLIC_ACOUNTPAY_CLIENT_ID!
      });

      const { redirectUrl } = await acount.createPaymentLink({
        amount,
        referenceNumber: orderId,
        redirectUrl: `${window.location.origin}/payment-callback?orderId=${orderId}`,
      });

      window.location.href = redirectUrl;
    } catch (error) {
      console.error('Payment failed:', error);
      setLoading(false);
    }
  };

  return (
    <button onClick={handlePayment} disabled={loading}>
      {loading ? 'Processing...' : 'Pay with AcountPay'}
    </button>
  );
}

Payment Methods

| Method | Description | |--------|-------------| | createPaymentLink() | Recommended. Creates a payment and returns a hosted payment page URL. Customer selects bank on AcountPay's page and is returned to your redirectUrl. | | initiateUserPaymentByEmail() | For registered AcountPay users. Redirects to AcountPay portal. | | initiatePayment() | Direct Token.io redirect for bank authentication. | | initiateCrossBorderPayment() | Converts currency to EUR and initiates a SEPA payment. |

createPaymentLink Parameters

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | amount | number | Yes | Payment amount (e.g., 10.50) | | referenceNumber | string | Yes | Your unique order reference | | redirectUrl | string | Yes | URL to return customer to after payment | | description | string | No | Description shown during payment | | currency | string | No | Currency code (default: DKK) | | webhookUrl | string | No | Server-side URL for status updates |

Important Implementation Notes

Client ID

Replace "YOUR_CLIENT_ID" with your actual client ID from the AcountPay dashboard.

Amount

Use major currency units (e.g., 10.50 for $10.50). Use your actual cart total or product price.

Reference Number

Use your unique order ID or invoice number so you can match payments back to orders.

Need Help?