# Pakasir Rust SDK (Unofficial)
[](#license)
[](https://codecov.io/gh/H0llyW00dzZ/pakasir-rust-sdk)
[](https://crates.io/crates/pakasir-sdk)
[](https://docs.rs/pakasir-sdk)
[](https://deepwiki.com/H0llyW00dzZ/pakasir-rust-sdk)
Unofficial Rust port of the [Pakasir Go SDK](https://github.com/H0llyW00dzZ/pakasir-go-sdk) in this repository.
## Status
This crate currently ports the core REST SDK surface:
- HTTP client with retries and `Retry-After` support
- Transaction service (`create`, `cancel`, `detail`)
- Simulation service (`pay`)
- Webhook parsing
- Payment URL builder
- QR PNG generation
- English and Indonesian localized SDK errors
The [Go repository's](https://github.com/H0llyW00dzZ/pakasir-go-sdk) gRPC server layer is not ported yet in this crate.
## Quick Start
```rust
use pakasir_sdk::{Client, PaymentMethod, TransactionService};
#[tokio::main]
async fn main() -> Result<(), pakasir_sdk::Error> {
let client = Client::builder("your-project-slug", "your-api-key").build();
let transactions = TransactionService::new(client);
let response = transactions
.create(
PaymentMethod::Qris,
&pakasir_sdk::transaction::CreateRequest {
order_id: "INV123456".into(),
amount: 99_000,
},
)
.await?;
println!("payment number: {}", response.payment.payment_number);
println!("total payment: {}", response.payment.total_payment);
Ok(())
}
```
## Layout
```text
pakasir-rust-sdk/
├── .github/
│ ├── dependabot.yml
│ └── workflows/
│ └── test.yml
├── Cargo.toml
├── LICENSE
├── Makefile
├── README.md
├── src/
│ ├── client.rs
│ ├── constants.rs
│ ├── error.rs
│ ├── i18n.rs
│ ├── lib.rs
│ ├── payment_url.rs
│ ├── qr.rs
│ ├── simulation.rs
│ ├── timefmt.rs
│ ├── transaction.rs
│ └── webhook.rs
└── tests/
└── sdk.rs
```