Get Customer Detail

Get detailed information about a specific customer.

Request

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 customer_id = "cus_xxxxxxxxxx";

    let resp = client.customers().id(customer_id).retrieve().send().await?;

    println!("{}", to_pretty_json(&resp)?);

    Ok(())
}

Path Parameters

ParameterTypeDescription
customer_idstringCustomer Id

Responses

200 Status

FieldTypeDescription
business_idstring
created_atstring
customer_idstring
emailstring
metadataMetadataAdditional metadata for the customer
namestring
phone_numberobject

500 Status

Something went wrong :(