Skip to main content
GET
/
refunds
/
{RefundId}
cURL
curl https://api.goshippo.com/refunds/d7c811cff9e24e4387418876f1ffd371 \
-H "Authorization: ShippoToken <API_TOKEN>"
import shippo

s = shippo.Shippo(
api_key_header='ShippoToken <API_TOKEN>',
shippo_api_version='2018-02-08',
)


res = s.refunds.get(refund_id='<id>')

if res is not None:
# handle response
pass
import { Shippo } from "shippo";

const shippo = new Shippo({
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08",
});

async function run() {
const result = await shippo.refunds.get("<id>");

// Handle the result
console.log(result);
}

run();
declare(strict_types=1);

require 'vendor/autoload.php';

use Shippo\API;

$sdk = API\Shippo::builder()
->setSecurity(
'ShippoToken <API_TOKEN>'
)
->setShippoApiVersion('2018-02-08')
->build();



$response = $sdk->refunds->get(
refundId: '<id>',
shippoApiVersion: '2018-02-08'

);

if ($response->refund !== null) {
// handle response
}
using Shippo;
using Shippo.Models.Components;

var sdk = new ShippoSDK(
apiKeyHeader: "ShippoToken <API_TOKEN>",
shippoApiVersion: "2018-02-08"
);

var res = await sdk.Refunds.GetAsync(
refundId: "<id>",
shippoApiVersion: "2018-02-08"
);

// handle response
package hello.world;

import com.goshippo.shippo_sdk.Shippo;
import com.goshippo.shippo_sdk.models.operations.GetRefundResponse;
import java.lang.Exception;

public class Application {

public static void main(String[] args) throws Exception {

Shippo sdk = Shippo.builder()
.apiKeyHeader("ShippoToken <API_TOKEN>")
.shippoApiVersion("2018-02-08")
.build();

GetRefundResponse res = sdk.refunds().get()
.refundId("<id>")
.shippoApiVersion("2018-02-08")
.call();

if (res.refund().isPresent()) {
// handle response
}
}
}
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('https://api.goshippo.com/refunds/{RefundId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.goshippo.com/refunds/{RefundId}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://api.goshippo.com/refunds/{RefundId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "object_created": "2023-11-07T05:31:56Z",
  "object_id": "adcfdddf8ec64b84ad22772bce3ea37a",
  "object_owner": "shippotle@shippo.com",
  "object_updated": "2023-11-07T05:31:56Z",
  "status": "SUCCESS",
  "test": true,
  "transaction": "915d94940ea54c3a80cbfa328722f5a1"
}
{}

Authorizations

Authorization
string
header
default:ShippoToken
required

API key authentication using the ShippoToken scheme. Format: Authorization: ShippoToken <API_TOKEN> Example: Authorization: ShippoToken shippo_live_abc123

Headers

SHIPPO-API-VERSION
string
default:2018-02-08

Optional string used to pick a non-default API version to use. See our API version guide.

Example:

"2018-02-08"

Path Parameters

RefundId
string
required

Object ID of the refund to update

Response

Refund

object_created
string<date-time>

Date and time of object creation.

object_id
string

Unique identifier of the given object.

Example:

"adcfdddf8ec64b84ad22772bce3ea37a"

object_owner
string

Username of the user who created the object.

Example:

"shippotle@shippo.com"

object_updated
string<date-time>

Date and time of last object update.

status
enum<string>

Indicates the status of the Refund.

Available options:
QUEUED,
PENDING,
SUCCESS,
ERROR
Example:

"SUCCESS"

test
boolean

Indicates whether the object has been created in test mode.

transaction
string

Object ID of the Transaction to be refunded.

Example:

"915d94940ea54c3a80cbfa328722f5a1"