Skip to main content

Crate bkash_rs

Crate bkash_rs 

Source
Expand description

§bkash-rs

Idiomatic async-first Rust client for the bKash Payment Gateway API.

bkash-rs provides a strongly-typed, ergonomic interface to the bKash Payment Gateway. It supports tokenized checkout, classic checkout, payment authentication & capture, subscriptions, and webhook verification.

§Quickstart

use bkash_rs::prelude::*;
let bkash = Bkash::builder()
    .environment(Environment::Sandbox)
    .app_key("your_app_key")
    .app_secret("your_app_secret")
    .username("your_username")
    .password("your_password")
    .build()?;
let bkash = Bkash::new(bkash).await?;

§Features

  • rustls-tls (default): Use rustls for TLS.
  • native-tls: Use the platform’s native TLS implementation.
  • tokenized-checkout (default): Enable tokenized checkout endpoints.
  • checkout (default): Enable classic checkout endpoints.
  • auth-capture: Enable authorization & capture endpoints.
  • subscriptions: Enable subscription endpoints.
  • webhooks: Enable webhook signature verification.

Re-exports§

pub use crate::client::Bkash;
pub use crate::config::Config;
pub use crate::config::ConfigBuilder;
pub use crate::config::Environment;
pub use crate::config::Product;
pub use crate::error::Error;
pub use crate::error::ErrorCode;

Modules§

auth_capture
Authorization & Capture product accessor.
checkout
Classic (URL-based) Checkout product accessor.
client
High-level client for interacting with the bKash Payment Gateway.
config
Client configuration: environment, credentials, timeouts, and policy knobs.
error
Error types returned by the bKash client.
models
Data models for the bKash Payment Gateway API.
prelude
Re-exports for the most common types.
subscriptions
Subscriptions product accessor.
token
OAuth token grant, refresh, and cache.
tokenized
Tokenized Checkout product accessor.
transport
HTTP transport layer built on reqwest.
webhooks
bKash webhook verification.