Create Brand

Create a new brand.

Request

use dodopayments_rust::{models::CreateBrandRequest, 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
        .brands()
        .create()
        .body(CreateBrandRequest {
            name: Some("My Brand".to_string()),
            ..Default::default()
        })
        .send()
        .await?;

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

    Ok(())
}

Body

FieldTypeDescription
descriptionobject
nameobject
statement_descriptorobject
support_emailobject
urlobject

Responses

200 Status

FieldTypeDescription
brand_idstring
business_idstring
descriptionobject
enabledboolean
imageobject
nameobject
reason_for_holdobjectIncase the brand verification fails or is put on hold
statement_descriptorstring
support_emailobject
urlobject
verification_enabledboolean
verification_statusBrandVerificationStatus

Created Brand