SDK Reference#

Onchain OS Payment provides four SDKs — Node.js / Rust / Go / Java — covering middleware mounting, configuration management, and on-chain settlement reconciliation for HTTP Seller scenarios.

For Agent Seller scenarios, use OnchainOS Skill; no SDK required.


Payment-method coverage#

Payment methodNode.jsRustGoJava
One-time payment · exact
One-time payment · chargeComing soon
Batch payment · aggr_deferred
Pay-as-you-go · sessionComing soon

Escrow payment is Agent-Seller only; use OnchainOS Skill; SDKs don't cover it.


Pick your SDK#


Don't plan to use the SDK?#

The payment protocol is fully open. You can also call the Broker REST API directly per the API Reference and handle 402 response construction, signature verification, and Settle submission yourself.

But that means you'll need to handle:

  • HTTP 402 response spec (Challenge field structure)
  • Multi-scheme declaration + Buyer wallet capability detection
  • KYT error handling
  • Channel state reconciliation (when using session)
  • Aggregated-settle event listening (when using aggr_deferred)

The SDK encapsulates all of the above. Unless you have strong custom needs, or need a payment method the SDK doesn't yet cover, prefer the SDK.


Next#