GitHunt
MU

Muhammad-Owais-Warsi/dodpayments_rust_sdk

Unofficial rust sdk to interact with dodopayments api.

Dodo Payments Rust SDK

Unofficial rust sdk to interact with dodopayments REST API.

The REST API documentation can be found on docs.dodopayments.com.

Installation

cargo add dodopayments_rust

Usage

use dodopayments_rust::{to_pretty_json, DodoPaymentsClientBuilder};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let api_key = std::env::var("DODO_API_KEY")?;

    let client = DodoPaymentsClientBuilder::new()
        .bearer_token(&api_key)
        .enviroment("test_mode")
        .build()?;

    let resp = client.payments().list().send().await?;
    println!("{}", to_pretty_json(&resp)?);

    Ok(())
}

Examples

You can checkout examples folder to view the usage of all the endpoints.
To run any example run the following command in your root

  cargo run --example <file_name>

Languages

Rust100.0%

Contributors

Created August 21, 2025
Updated March 10, 2026
Muhammad-Owais-Warsi/dodpayments_rust_sdk | GitHunt