Skip to main content
GET
/
refunds
/
{refund_id}
JavaScript
import DodoPayments from 'dodopayments';

const client = new DodoPayments({
  bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});

const refund = await client.refunds.retrieve('ref_F0gZetLvTxxBrMU2CZcmy');

console.log(refund.brand_id);
import os
from dodopayments import DodoPayments

client = DodoPayments(
    bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"),  # This is the default and can be omitted
)
refund = client.refunds.retrieve(
    "ref_F0gZetLvTxxBrMU2CZcmy",
)
print(refund.brand_id)
package main

import (
	"context"
	"fmt"

	"github.com/dodopayments/dodopayments-go"
	"github.com/dodopayments/dodopayments-go/option"
)

func main() {
	client := dodopayments.NewClient(
		option.WithBearerToken("My Bearer Token"),
	)
	refund, err := client.Refunds.Get(context.TODO(), "ref_F0gZetLvTxxBrMU2CZcmy")
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", refund.BrandID)
}
package com.dodopayments.api.example;

import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.refunds.Refund;
import com.dodopayments.api.models.refunds.RefundRetrieveParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

        Refund refund = client.refunds().retrieve("ref_F0gZetLvTxxBrMU2CZcmy");
    }
}
package com.dodopayments.api.example

import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.refunds.Refund
import com.dodopayments.api.models.refunds.RefundRetrieveParams

fun main() {
    val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

    val refund: Refund = client.refunds().retrieve("ref_F0gZetLvTxxBrMU2CZcmy")
}
require "dodopayments"

dodo_payments = Dodopayments::Client.new(
  bearer_token: "My Bearer Token",
  environment: "test_mode" # defaults to "live_mode"
)

refund = dodo_payments.refunds.retrieve("ref_F0gZetLvTxxBrMU2CZcmy")

puts(refund)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;

$client = new Client(
  bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
  environment: 'test_mode',
);

try {
  $refund = $client->refunds->retrieve('ref_F0gZetLvTxxBrMU2CZcmy');

  var_dump($refund);
} catch (APIException $e) {
  echo $e->getMessage();
}
using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Refunds;

DodoPaymentsClient client = new();

RefundRetrieveParams parameters = new()
{
    RefundID = "ref_F0gZetLvTxxBrMU2CZcmy"
};

var refund = await client.Refunds.Retrieve(parameters);

Console.WriteLine(refund);
use dodopayments::Client;

#[tokio::main]
async fn main() -> dodopayments::Result<()> {
    let client = Client::from_env()?;
    let refund_id = "refund_id";
    let result = client
        .refunds()
        .retrieve()
        .refund_id(refund_id)
        .await?;
    println!("{result:?}");
    Ok(())
}
curl --request GET \
  --url https://test.dodopayments.com/refunds/{refund_id} \
  --header 'Authorization: Bearer <token>'
{
  "brand_id": "<string>",
  "business_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "customer": {
    "customer_id": "<string>",
    "email": "<string>",
    "name": "<string>",
    "metadata": {},
    "phone_number": "<string>"
  },
  "is_partial": true,
  "metadata": {},
  "payment_id": "<string>",
  "refund_id": "<string>",
  "amount": 123,
  "reason": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

refund_id
string
required

Refund Id

Response

brand_id
string
required

Brand id this refund belongs to

business_id
string
required

The unique identifier of the business issuing the refund.

created_at
string<date-time>
required

The timestamp of when the refund was created in UTC.

customer
object
required

Details about the customer for this refund (from the associated payment)

is_partial
boolean
required

If true the refund is a partial refund

metadata
Metadata · object
required

Additional metadata stored with the refund.

payment_id
string
required

The unique identifier of the payment associated with the refund.

refund_id
string
required

The unique identifier of the refund.

status
enum<string>
required

The current status of the refund.

Available options:
succeeded,
failed,
pending,
review
amount
integer<int32> | null

The refunded amount.

currency
null | enum<string>

The currency of the refund, represented as an ISO 4217 currency code.

Available options:
AED,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BWP,
BYN,
BZD,
CAD,
CHF,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SEK,
SGD,
SHP,
SLE,
SLL,
SOS,
SRD,
SSP,
STN,
SVC,
SZL,
THB,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VES,
VND,
VUV,
WST,
XAF,
XCD,
XOF,
XPF,
YER,
ZAR,
ZMW
reason
string | null

The reason provided for the refund, if any. Optional.

Last modified on March 25, 2026