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

@neptune.fintech/astro-web

v1.0.0

Published

Drop-in checkout widget for OpenWave / Astro payments

Downloads

12

Readme

@neptune-astro/web-sdk

Drop-in checkout widget for OpenWave / Astro payments. Like Stripe.js — one function call opens a styled, mobile-responsive payment modal.

Usage

Via CDN (script tag)

<script src="https://cdn.neptune.ly/astro/v1/astro.umd.js"></script>
<script>
  Astro.checkout({
    sessionId: 'ops_01HZGV...',     // created by your backend
    gatewayUrl: 'https://astro.neptune.ly',
    onSuccess: (e) => {
      console.log('Paid!', e.session_id)
      window.location.href = '/orders/success'
    },
    onFailed: (e) => {
      alert('Payment failed: ' + e.message)
    },
    onDismiss: () => {
      console.log('Customer closed the widget')
    },
  })
</script>

Via npm

npm install @neptune-astro/web-sdk
import { checkout } from '@neptune-astro/web-sdk'

checkout({
  sessionId: 'ops_01HZGV...',
  gatewayUrl: 'https://astro.neptune.ly',
  theme: 'auto',          // 'light' | 'dark' | 'auto'
  locale: 'en',           // 'en' | 'ar'
  onSuccess: (e) => redirect(e.receipt_url!),
  onFailed: (e) => showError(e.message),
})

How It Works

  1. Your backend creates a payment session via POST /payments/sessions and returns the session_id to your frontend
  2. You call checkout({ sessionId }) — the widget opens
  3. Customer enters their NPT alias or IBAN — widget verifies it with the gateway
  4. Customer enters OTP — sent to their registered phone by their bank
  5. Payment completesonSuccess fires with the session details

Flow Diagram

Your page                  Widget                    Astro Gateway
    │                        │                             │
    │─ checkout({sessionId}) ┤                             │
    │                        │── POST /sessions/{id}/initiate ──►│
    │                        │◄── { amount, currency } ────│
    │                        │                             │
    │              [OTP input]│                             │
    │                        │── POST /sessions/{id}/confirm ───►│
    │                        │◄── { status: COMPLETED } ───│
    │◄── onSuccess(event) ───┤                             │

Options

| Option | Type | Required | Description | |---|---|:---:|---| | sessionId | string | ✅ | Payment session ID from your backend | | gatewayUrl | string | | Gateway base URL (default: empty — uses relative) | | theme | 'light' \| 'dark' \| 'auto' | | Widget theme (default: auto) | | locale | 'en' \| 'ar' | | Language (default: en) | | onSuccess | function | | Called when payment completes | | onFailed | function | | Called when payment fails or is rejected | | onDismiss | function | | Called when customer closes the widget |

Security

  • Never put API keys in the frontend — the widget uses only the session_id (not sensitive)
  • Session IDs are single-use and expire after 15 minutes
  • All gateway communication is HTTPS

License

UNLICENSED — Copyright © Neptune Fintech