Get Refund Detail

Get detailed information about a specific refund.

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 refund_id = "ref_xxxxxxxxxx";

    let resp = client.refunds().id(refund_id).retrieve().send().await?;

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

    Ok(())
}

Path Parameters

ParameterTypeDescription
refund_idstringRefund Id

Responses

200 Status

FieldTypeDescription
amountobjectThe refunded amount.
business_idstringThe unique identifier of the business issuing the refund.
created_atstringThe timestamp of when the refund was created in UTC.
currencyobject
customerCustomerLimitedDetailsResponseDetails about the customer for this refund (from the associated payment)
is_partialbooleanIf true the refund is a partial refund
metadataMetadataAdditional metadata stored with the refund.
payment_idstringThe unique identifier of the payment associated with the refund.
reasonobjectThe reason provided for the refund, if any. Optional.
refund_idstringThe unique identifier of the refund.
statusRefundStatusThe current status of the refund.

500 Status

Something went wrong :(