Expand description
§Platega Rust SDK
Unofficial SDK. Independent, community-maintained port of platega-sdk-python; not affiliated with or endorsed by Platega.io.
Client for creating payments, querying statuses and validating callbacks of the Platega.io payment system.
Authentication uses the X-MerchantId / X-Secret headers (issued by the
manager or available in the dashboard). The only external dependency is
reqwest (plus hmac/sha2/base64/hex for the HMAC-signed
get_cards endpoint).
§Payment methods
| Constant | Value | Description |
|---|---|---|
PaymentMethod::SberQR | 2 | SBP (QR) + Sberpay |
PaymentMethod::Erip | 3 | ERIP |
PaymentMethod::CardAcquiring | 11 | Card acquiring |
PaymentMethod::International | 12 | International payments |
PaymentMethod::Crypto | 13 | Cryptocurrency |
Without a payment method the payment is created via
/v2/transaction/process (the method is chosen on the Platega side).
See docs/index.md for the full
usage guide.
Structs§
- Balance
- A merchant balance returned by
GET /balance/all. - Callback
Payload - Platega webhook body for a transaction status change.
- Card
- A saved card returned by the HMAC-signed
GET /api/v1/cards. - Charge
Metrics - Charge counters of a subscription.
- Create
Payment - Payment creation parameters. All string fields are borrowed — no ownership is required, so there are no extra allocations.
- Create
Payment Builder - Fluent builder for
CreatePayment. - Create
Payment Response - Response of
POST /v2/transaction/process(payment creation). - Metadata
- Payment metadata (
metadata): payer identifier used by the anti-fraud system. - Platega
- Platega API client. Reuse one instance per process — the inner
reqwest::Clientpools connections. - Platega
Callback - Platega callback validator.
- Subscription
- A recurring SBP subscription returned by
GET /subscription/{id}. - Subscription
Page - Paginated response of
GET /subscription. - Subscription
Summary - A subscription entry returned inside
SubscriptionPage. - Transaction
Status - Response of
GET /transaction/{id}(transaction status).
Enums§
- Payment
Method - Payment method (
paymentMethod). Without a method,/v2/transaction/processis used. - Payment
Status - Transaction status.
- Platega
Error - Subscription
Interval - Recurring SBP subscription interval.