You can now access the official rust SDK from the docs
Unofficial rust sdk to interact with dodopayments REST API.
The REST API documentation can be found on docs.dodopayments.com.
cargo add dodopayments_rustuse 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(())
}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>