Skip to content

Feature: optional Nano (XNO) settlement for metered billing (sub-cent remainder) #21

Open

Description

@dhyabi2

Polar's usage-based billing is a first-class feature — meter API calls, tokens, compute time. But every settlement rail Polar drives today (Stripe cards, MoR) has a minimum-collection floor. A single AI agent call priced at $0.0005 cannot be collected as a standalone card charge.

Adding an optional Nano (XNO) settlement helper to the SDK would close this gap. Nano is a feeless commit-chain that needs no merchant account, no card scheme, and has no minimum-collection floor — every price settles standalone.

Concretely: two pure functions — microUsdToRaw(micro_dollars) (ceil-rounded, lossless) and buildNanoPayUri(address, raw) — that convert Polar's metered micro-dollar amounts into a standard nano: URI an agent can settle in seconds with no onboarding. A tested reference of the exact arithmetic is at https://gist.github.com/dhyabi2/5dba8548b29ad7b0a8ebca72948e25eb (7/7, Node built-in test runner).

This stays a pure optional helper, never touches Polar's API or webhook verification, and adds no dependency. Happy to shape it as a PR if the direction is welcome.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions