| Crates.io | tinkoff-acquiring |
| lib.rs | tinkoff-acquiring |
| version | 0.2.0 |
| created_at | 2025-09-01 16:38:55.612614+00 |
| updated_at | 2025-09-01 16:38:55.612614+00 |
| description | Rust-клиент к API Tinkoff (T-Банк) Acquiring: Init/GetState/Confirm/Cancel/Charge, карты, клиенты, FinishAuthorize, QR; retry, идемпотентность, webhook-валидация. |
| homepage | https://github.com/andysay1/tinkoff-acquiring |
| repository | https://github.com/andysay1/tinkoff-acquiring |
| max_upload_size | |
| id | 1819890 |
| size | 126,426 |
Rust-клиент к Tinkoff (T-Банк) Acquiring REST API v2.
Init, GetState, Confirm, Cancel, ChargeAddCustomer, GetCustomer, RemoveCustomerGetCardList, RemoveCardBindCard, FinishAuthorizeGetQrblocking-режим (опция через feature)use tinkoff_acquiring::{Config, TinkoffClient, Receipt, Item, Taxation, Tax};
use serde_json::json;
# #[tokio::main]
# async fn main() -> anyhow::Result<()> {
let cfg = Config::new("YOUR_TERMINAL_KEY", "YOUR_PASSWORD");
let client = TinkoffClient::new(cfg);
let receipt = Receipt {
email: Some("buyer@example.com".into()),
phone: None,
taxation: Taxation::Osn,
items: vec![Item {
name: "Hoodie".into(),
price: 199_900,
quantity: 1.0,
amount: 199_900,
tax: Tax::Vat20,
}],
currency: None,
};
let init = client.init(
199_900,
"ORDER-123",
Some("Оплата худи"),
Some("O"),
Some(receipt),
Some(json!({"meta":"abc"})),
Some("https://your.site/success"),
Some("https://your.site/fail"),
None,
Some("order-123-key"), // идемпотентность
).await?;
println!("Payment URL: {:?}", init.payment_url);
# Ok(()) }