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 method | Node.js | Rust | Go | Java |
|---|---|---|---|---|
One-time payment · exact | ✅ | ✅ | ✅ | ✅ |
One-time payment · charge | ✅ | ✅ | ✅ | Coming soon |
Batch payment · aggr_deferred | ✅ | ✅ | ✅ | ✅ |
Pay-as-you-go · session | ✅ | ✅ | ✅ | Coming 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#
Innehållsförteckning