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

@proximuslabs/sdk-payments-web2

v0.2.0-alpha.5

Published

Proximus payments-web2 API integration SDK - alpha

Readme

Proximus Web2 payments SDK

Review card and bank payment requests before calling your payment provider. Create an API key in your PROXIMUS dashboard, install the SDK and connect to the hosted API.

Install

Install the SDK in your application:

npm install @proximuslabs/[email protected]

A direct public download is also available:

npm install https://www.proximus.sh/sdk/proximuslabs-sdk-payments-web2-0.2.0-alpha.5.tgz

Create an API key in your PROXIMUS dashboard and pass it to the client. The SDK connects to https://api.proximus.sh by default. Customers do not deploy the security engine.

Server quickstart

import { createPaymentsClient, requireAllow } from "@proximuslabs/sdk-payments-web2";

const client = createPaymentsClient({
  apiKey: process.env.PROXIMUS_API_KEY,
  baseUrl: process.env.PROXIMUS_BASE_URL,
});
const review = await client.reviewPayment({
  requestId: "order_123_review_1",
  origin: "https://merchant.example",
  kind: "card",
  amountMinor: "1000",
  currency: "USD",
  paymentReference: "provider_payment_reference",
  merchantReference: "your_merchant_reference",
});
requireAllow(review); // Throws on challenge/block. Errors also pause execution.
console.log(review.verdict);

Protected payment execution

Build the payment from an authenticated backend order and provider record. Amounts are exact integer strings in the currency's minor unit. The provider remains responsible for authorization, settlement, refunds and reconciliation. Use provider references, never PANs, CVVs, PINs or signing secrets.

import { paymentAction } from "@proximuslabs/sdk-payments-web2";
const action = paymentAction(payment);
const { result, claim } = await client.protectAndExecute(action, async (reviewed, claim) => {
  return yourPaymentProvider.confirm({
    reference: reviewed.payload.payment_reference,
    amountMinor: reviewed.payload.amount_minor,
    currency: reviewed.payload.currency,
    idempotencyKey: claim.execution_id,
  });
}, { executionId: order.executionId });
await client.reportExecution(claim.execution_id, "submitted", result.id);

payment, order and yourPaymentProvider are your backend records and adapter. The protected workflow requires security:execute in addition to review scopes. A reused claim never invokes the callback again. A timeout does not release the claim, reconcile with the provider before another attempt. The older reviewAndPay helper remains available for compatibility and does not provide server execution claims.

This guard does not automatically collect the security fee. Native-chain fee quotes and settlement verification use the separate explicit fee flow. PSP application fees require a provider adapter.

Protect an action

Use protectAndExecute in JavaScript or TypeScript, protect_and_execute in Python or Rust, or ProtectAndExecute in Go to review an action before calling your signer or payment provider. The SDK proceeds only when the action is allowed, its required checks completed and its execution authorization is current. Blocked, incomplete and expired reviews stop execution.

Use the returned execution ID for your provider's idempotency key. Retrieve the provider result before retrying an uncertain payment.

See the integration guide for setup, examples and supported checks. Each review shows which checks completed and whether the action can proceed.

Shared configuration and errors

  • apiKey: scoped server-side API key. review:write for review submission, security:execute for execution authorization, reviews:read for retrieval and capabilities. monitoring additionally needs monitor:write and a linked integration.
  • baseUrl: defaults to https://api.proximus.sh. Set your own HTTPS gateway URL for self-hosting. Loopback HTTP is allowed locally. A base path such as https://app.example/security is supported when your proxy mounts the contract there. The SDK does not follow redirects or send browser cookies.
  • fetch: optional compatible implementation for your runtime. timeoutMs: default 15000, maximum 120000. Pass { signal } to each request.
  • Supply an immutable requestId. Reuse it with the identical body for retries. The SDK never retries or charges automatically. requestId() generates a secure UUID where crypto.randomUUID is available.
  • ProximusError exposes code, status and retryAfter; it never includes your secret key or raw error response. 401/403 require configuration fixes, 402 is a hosted credit limit, 409 is a conflict/in-progress request, 429 is a rate limit and 503 is unavailable analysis. First retrieve uncertain reviews before deciding to submit another ID.
  • client.getReview(requestId) returns the backend's stored review record. Hosted and reference-gateway storage shapes may differ; use the submitted review response for immediate execution gating.
  • reviewAndExecute and wallet/payment guards require an exact, unexpired action binding and a fresh execution claim. On your backend, call client.authorize(action) to produce this response. Use a durable execution ID and wallet or payment-provider idempotency. A claimed attempt must be reconciled before retrying.
  • No telemetry, private-key custody, background scanning or direct database access is performed by these SDKs.

Use client.capabilities() to read the current supported networks, checks and behavior-model availability. Solana protection includes external_state by default, so unavailable chain simulation pauses execution.

Platforms

The transport and action builders are TypeScript with ESM/CommonJS outputs. Payment fee calculations use decimal.js for decimal arithmetic. Node 22+ is the tested server target. Browser, React Native and Electron frontends use the action builders/guards with a reviewer calling their own authenticated backend; createClient rejects known browser/React Native environments to reduce accidental secret exposure. This runtime check is a guardrail, not a substitute for secure application architecture.

examples/browser-reviewer.ts, examples/BackendReviewer.swift and examples/BackendReviewer.kt demonstrate that backend boundary. Swift and Kotlin examples are not published native SDKs. React Native may need fetch, AbortController, TextEncoder and secure UUID polyfills; compatibility depends on runtime version. Do not put long-lived API keys in mobile or desktop binaries.

Your backend must authenticate the app user, verify their ownership/permissions, derive the exact action, validate origin/CSRF where applicable, enforce quotas and apply decisions. A client can bypass its own UI guard.

Language packages

All six SDK products are available in TypeScript, Go, Python and Rust under Apache 2.0. The TypeScript package stays at the repository root. Each language has typed feature inputs, guarded execution, exact amounts, hosted/self-hosted URLs, examples and loopback HTTP tests.

| Language | Package and setup | | --- | --- | | TypeScript | This directory - ESM, CommonJS and declarations | | Go | go/README.md - standard library, context cancellation | | Python | python/README.md - Python 3.10+, standard library, typed inputs | | Rust | rust/README.md - blocking reqwest, serde types |

Public release packages are available through the installation guide. Python uses the equivalent version 0.2.0a5. The guide selects a verified registry release or a direct PROXIMUS package URL for each language.

Platform APIs

Use the platform SDK for chat, agents, testing and workspace APIs. This specialized package retains its review contract and execution guards. See the API reference for current public operations and required scopes.

Contributing

Bug reports, examples and pull requests are welcome. Read CONTRIBUTING.md to get started and SECURITY.md to report a vulnerability.

License

Copyright 2026 PROXIMUS Research Labs Foundation. The SDK is licensed under Apache 2.0, which permits integration, modification and commercial use subject to its terms. The license grants permission to use the code, it does not transfer copyright or grant rights to PROXIMUS trademarks. Hosted services have separate access and pricing terms. See LICENSE and NOTICE.

Payment fee estimates

Use estimatePaymentFees to calculate the PROXIMUS curve, partner fees and a network-cost reserve in exact atomic units. prepareAndExecutePayment calls your existing provider to prepare the complete unsigned payment, reviews that final action and invokes execution once after authorization. Include every fee recipient and amount before review.

The same workflow is available as estimate_payment_fees and prepare_and_execute_payment in Python and Rust, and EstimatePaymentFees and PrepareAndExecutePayment in Go. Amounts use integer strings. The estimate does not sign a transaction or collect a payment.

See payment integration for arguments, return values, examples and supported execution responsibilities.