Reevit Rust SDK
The official async Rust client for the Reevit payments API.
Installation
[]
= "0.1"
= { = "1", = ["macros", "rt-multi-thread"] }
Quick start
Amounts use the smallest currency unit. For example, 5000 means GHS 50.00.
use ;
async
The client sends X-Reevit-Key and X-Org-Id on every request, defaults to
https://api.reevit.io, and uses a 30-second timeout. Override the URL or timeout
through Client::builder for tests and specialized deployments.
Server-created checkout sessions
Create a session on your server and pass only its session_secret to a Reevit
React, Vue, or Svelte checkout SDK.
# use ;
# async
Webhook verification
Verify the exact bytes received from Reevit. Parsing and re-serializing JSON can change whitespace or key order and invalidate a correct signature.
use verify_webhook_signature;
let raw_body = br#"{"id":"evt_123","type":"payment.succeeded"}"#;
let signature = "sha256=2f70e6b9d3f5f7dd-placeholder";
if verify_webhook_signature
Resource modules
client.payments()client.checkout_sessions()client.connections()client.subscriptions()client.fraud()client.customers()client.payment_links()client.webhooks()client.routing_rules()client.invoices()
All mutating methods accept RequestOptions. Reuse the same idempotency key when
retrying the same logical mutation. The SDK does not automatically retry payment
mutations.
Errors
reevit::Error::Api preserves the HTTP status, Reevit error code, details, and
request ID. is_recoverable() identifies transport failures and HTTP statuses
that may succeed when retried; callers still decide whether retrying a specific
operation is safe.
Development
License
MIT