GetRefundDetails (Merchant to Global-e)
curl --request GET \
--url https://{globale_api_domain}/v1/orders/{orderId}/refundsimport requests
url = "https://{globale_api_domain}/v1/orders/{orderId}/refunds"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{globale_api_domain}/v1/orders/{orderId}/refunds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{globale_api_domain}/v1/orders/{orderId}/refunds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{globale_api_domain}/v1/orders/{orderId}/refunds"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{globale_api_domain}/v1/orders/{orderId}/refunds")
.asString();require 'uri'
require 'net/http'
url = URI("https://{globale_api_domain}/v1/orders/{orderId}/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"OrderId": "string",
"MerchantOrderId": "string",
"MerchantInternalOrderId": "string",
"WebStoreCode": "string",
"WebStoreInstanceCode": "string",
"Refunds": [
{
"RefundID": "string",
"RMANumber": "string",
"MerchantRMANumber": "string",
"FullRefund": true,
"ProductsDutiesRefund": true,
"ShippingRefund": true,
"RefundAsGiftCard": null,
"TotalRefundAmount": "string",
"OriginalTotalRefundAmount": "string",
"ServiceGestureAmount": "string",
"TotalMoneyRefundAmount": "string",
"DutiesAmount": "string",
"ShippingAmount": "string",
"CustomerPrepaidRefundAmount": "string",
"OriginalCustomerPrepaidRefundAmount": "string",
"TotalGiftCardsRefundAmount": "string",
"TotalGiftCardsRefundAmountinMerchantCurrency": 0,
"TotalLoyaltyPointsRefunded": 0,
"TotalLoyaltyPointsRefundAmount": 0,
"GiftCardsData": [
{
"CardId": 0,
"OtherFields": "..."
}
],
"ExternalReference": "string",
"InitiatedBy": "string",
"CurrencyCode": "string",
"OriginalCurrencyCode": "string",
"RefundReason": {
"OrderRefundReasonCode": "string",
"Name": "string"
},
"RefundProducts": [
{
"CartItemId": "string",
"RefundQuantity": "string",
"RefundAmount": "string",
"OriginalRefundAmount": "string",
"RefundAmountPercent": "string",
"RefundReason": "string",
"RefundComments": "string",
"Sku": "string",
"ProductCode": "string",
"productGroupCode": "string",
"ProductCodeSecondary": "string",
"productGroupCodeSecondary": "string"
}
],
"RefundComponents": [
{
"Amount": "string",
"OriginalAmount": "string",
"IsChargedToMerchant": "string",
"ComponentType": "string"
}
],
"RefundComments": "string",
"RefundDocument": [
{
"DocumentData": "string",
"CreditNoteUrl": "string",
"DocumentTypeCode": "string",
"DocumentTypeName": "string",
"DocumentExtension": "string"
}
]
}
],
"RefundableAmount": {
"CurrencyCode": "string",
"TotalCreditAmount": 0,
"RefundableShippingAmount": 0,
"RefundableDutiesAmount": 0,
"ProductRefundableAmount": [
{
"CartItemId": "string",
"Sku": "string",
"ProductCode": "string",
"productGroupCode": "string",
"ProductCodeSecondary": "string",
"productGroupCodeSecondary": "string",
"RefundableTotalAmount": 0,
"RefundableQuantity": 1
}
]
}
}{
"error": {
"code": "String",
"message": "String",
"description": "String"
}
}{
"error": {
"code": "String",
"message": "String",
"description": "String"
}
}Get refund details
This API provides information about refunds associated with an order.
GET
/
v1
/
orders
/
{orderId}
/
refunds
GetRefundDetails (Merchant to Global-e)
curl --request GET \
--url https://{globale_api_domain}/v1/orders/{orderId}/refundsimport requests
url = "https://{globale_api_domain}/v1/orders/{orderId}/refunds"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{globale_api_domain}/v1/orders/{orderId}/refunds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{globale_api_domain}/v1/orders/{orderId}/refunds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{globale_api_domain}/v1/orders/{orderId}/refunds"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{globale_api_domain}/v1/orders/{orderId}/refunds")
.asString();require 'uri'
require 'net/http'
url = URI("https://{globale_api_domain}/v1/orders/{orderId}/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"OrderId": "string",
"MerchantOrderId": "string",
"MerchantInternalOrderId": "string",
"WebStoreCode": "string",
"WebStoreInstanceCode": "string",
"Refunds": [
{
"RefundID": "string",
"RMANumber": "string",
"MerchantRMANumber": "string",
"FullRefund": true,
"ProductsDutiesRefund": true,
"ShippingRefund": true,
"RefundAsGiftCard": null,
"TotalRefundAmount": "string",
"OriginalTotalRefundAmount": "string",
"ServiceGestureAmount": "string",
"TotalMoneyRefundAmount": "string",
"DutiesAmount": "string",
"ShippingAmount": "string",
"CustomerPrepaidRefundAmount": "string",
"OriginalCustomerPrepaidRefundAmount": "string",
"TotalGiftCardsRefundAmount": "string",
"TotalGiftCardsRefundAmountinMerchantCurrency": 0,
"TotalLoyaltyPointsRefunded": 0,
"TotalLoyaltyPointsRefundAmount": 0,
"GiftCardsData": [
{
"CardId": 0,
"OtherFields": "..."
}
],
"ExternalReference": "string",
"InitiatedBy": "string",
"CurrencyCode": "string",
"OriginalCurrencyCode": "string",
"RefundReason": {
"OrderRefundReasonCode": "string",
"Name": "string"
},
"RefundProducts": [
{
"CartItemId": "string",
"RefundQuantity": "string",
"RefundAmount": "string",
"OriginalRefundAmount": "string",
"RefundAmountPercent": "string",
"RefundReason": "string",
"RefundComments": "string",
"Sku": "string",
"ProductCode": "string",
"productGroupCode": "string",
"ProductCodeSecondary": "string",
"productGroupCodeSecondary": "string"
}
],
"RefundComponents": [
{
"Amount": "string",
"OriginalAmount": "string",
"IsChargedToMerchant": "string",
"ComponentType": "string"
}
],
"RefundComments": "string",
"RefundDocument": [
{
"DocumentData": "string",
"CreditNoteUrl": "string",
"DocumentTypeCode": "string",
"DocumentTypeName": "string",
"DocumentExtension": "string"
}
]
}
],
"RefundableAmount": {
"CurrencyCode": "string",
"TotalCreditAmount": 0,
"RefundableShippingAmount": 0,
"RefundableDutiesAmount": 0,
"ProductRefundableAmount": [
{
"CartItemId": "string",
"Sku": "string",
"ProductCode": "string",
"productGroupCode": "string",
"ProductCodeSecondary": "string",
"productGroupCodeSecondary": "string",
"RefundableTotalAmount": 0,
"RefundableQuantity": 1
}
]
}
}{
"error": {
"code": "String",
"message": "String",
"description": "String"
}
}{
"error": {
"code": "String",
"message": "String",
"description": "String"
}
}The information includes all the refund details and the refundable amount for each product in the order.
The API returns:
MerchantOrderRefund- Credit note URL
⌘I

