Paymos Rust SDK
Official async Rust client for the Paymos Merchant API. It provides typed invoices, withdrawals, balances, cursor pagination, structured errors, automatic request signing, safe retries, and raw-body webhook verification.
Requirements
- Rust 1.86 or newer;
- Tokio runtime;
- a server-side Paymos Payment or Payout API key.
Never expose an API secret in browser JavaScript, a mobile binary, a URL, or a log.
Installation
Create an invoice
use ;
async
Money is always passed and returned as a dot-decimal String; do not convert it
through binary floating point.
Cursor pagination
# use ;
# async
The pager stops at its configured page bound and rejects any cursor returned more than once.
Errors and retries
# use ;
# async
The client retries transport errors and 5xx responses only for idempotent methods.
HTTP 429 may also retry a POST because the API rejected it before processing.
Retry-After is honored. A mutating request is never repeated after an ambiguous
transport or generic server failure.
Verify a webhook
# use ;
#
Pass the exact request bytes before JSON parsing. API request signatures use
base64 HMAC-SHA256 over the canonical request; webhook signatures use lowercase
hex HMAC-SHA256 over {timestamp}.{raw_body}. They are intentionally different.
Release integrity
Every release is built from an immutable vMAJOR.MINOR.PATCH tag in
Paymos-labs/rust-sdk. The crate version
and paymos-rust/<version> user agent are stamped from the same release plan.
The full language-neutral conformance contract is shipped in
conformance/contract.json and executed by the test suite.
- Documentation: paymos.io/docs/server-sdks
- API reference: docs.rs/paymos
- Security reports: security@paymos.io