cURL
curl --request POST \
--url 'https://{globale_api_domain}/Order/CreateOrderRefund?orderRefund={"OrderId":"GE95135467GB","FullRefund":false,"TotalRefundAmount":"320","RefundReason":{"OrderRefundReasonCode":null,"Name":"Undefined"}}' \
--header 'Content-Type: application/json' \
--data '[{"CartItemId":"1381109","RefundQuantity":null,"RefundAmount":"320"}]'import requests
url = "https://{globale_api_domain}/Order/CreateOrderRefund"
payload = [
{
"CartItemId": "1381109",
"RefundQuantity": None,
"RefundAmount": "320"
}
]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([{CartItemId: '1381109', RefundQuantity: null, RefundAmount: '320'}])
};
fetch('https://{globale_api_domain}/Order/CreateOrderRefund', 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}/Order/CreateOrderRefund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'CartItemId' => '1381109',
'RefundQuantity' => null,
'RefundAmount' => '320'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{globale_api_domain}/Order/CreateOrderRefund"
payload := strings.NewReader("[\n {\n \"CartItemId\": \"1381109\",\n \"RefundQuantity\": null,\n \"RefundAmount\": \"320\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{globale_api_domain}/Order/CreateOrderRefund")
.header("Content-Type", "application/json")
.body("[\n {\n \"CartItemId\": \"1381109\",\n \"RefundQuantity\": null,\n \"RefundAmount\": \"320\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://{globale_api_domain}/Order/CreateOrderRefund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"CartItemId\": \"1381109\",\n \"RefundQuantity\": null,\n \"RefundAmount\": \"320\"\n }\n]"
response = http.request(request)
puts response.read_body{
"Success": true,
"Reason": "Refund generated with id 67961",
"NotifyOrderRefund": {
"MerchantOrderId": "orderid123",
"RefundId": "67961",
"MerchantGUID": "39a4ffdsfds-f6324b-41ce-afdsfa-c8ef18234132",
"Products": [
{
"CartItemId": "2",
"RefundQuantity": "1",
"OriginalRefundAmount": "31.2707",
"RefundAmount": "60.9500",
"RefundReason": {
"OrderRefundReasonCode": null,
"Name": "Undefined"
},
"RefundComments": "Damaged shipment but the customer kept it"
}
],
"Components": [
{
"Amount": "60.95",
"OriginalAmount": "31.27",
"IsChargedToMerchant": "TRUE",
"ComponentType": "Products"
}
],
"OrderId": "GE95135467GB",
"TotalRefundAmount": "60.95",
"RefundReason": {
"OrderRefundReasonCode": null,
"Name": "Undefined"
},
"RefundComments": "Damaged shipment but the customer kept it",
"OriginalTotalRefundAmount": "31.27",
"ServiceGestureAmount": "0",
"WebStoreCode": null,
"WebStoreInstanceCode": "GlobalEDefaultStoreInstance",
"FullRefund": false,
"TotalGiftCardsRefundAmount": "100.0000",
"GiftCardsData": {
"CardId": "1234",
"BalanceInGiftCardCurrency": 18.39,
"BalanceInCustomerCurrency": 290.21,
"GiftCardCurrencyCode": "EUR",
"CustomerCurrencyMode": "EUR",
"BalanceUsedInCardCurrency": 39,
"BalanceUsedInCustomerCurrency": 387.8,
"RedeemTransactionId": "1987489732938",
"CardIdFields": {
"CardId": "498784937",
"giftCardBalanceToUse": "100"
}
}
}
}Create order refund (Merchant to Global-e)
Issues a refund for the specified order, optionally including a product list and/or components (service gesture, shipping, Duties & Taxes).
POST
/
Order
/
CreateOrderRefund
cURL
curl --request POST \
--url 'https://{globale_api_domain}/Order/CreateOrderRefund?orderRefund={"OrderId":"GE95135467GB","FullRefund":false,"TotalRefundAmount":"320","RefundReason":{"OrderRefundReasonCode":null,"Name":"Undefined"}}' \
--header 'Content-Type: application/json' \
--data '[{"CartItemId":"1381109","RefundQuantity":null,"RefundAmount":"320"}]'import requests
url = "https://{globale_api_domain}/Order/CreateOrderRefund"
payload = [
{
"CartItemId": "1381109",
"RefundQuantity": None,
"RefundAmount": "320"
}
]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([{CartItemId: '1381109', RefundQuantity: null, RefundAmount: '320'}])
};
fetch('https://{globale_api_domain}/Order/CreateOrderRefund', 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}/Order/CreateOrderRefund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'CartItemId' => '1381109',
'RefundQuantity' => null,
'RefundAmount' => '320'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{globale_api_domain}/Order/CreateOrderRefund"
payload := strings.NewReader("[\n {\n \"CartItemId\": \"1381109\",\n \"RefundQuantity\": null,\n \"RefundAmount\": \"320\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{globale_api_domain}/Order/CreateOrderRefund")
.header("Content-Type", "application/json")
.body("[\n {\n \"CartItemId\": \"1381109\",\n \"RefundQuantity\": null,\n \"RefundAmount\": \"320\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://{globale_api_domain}/Order/CreateOrderRefund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"CartItemId\": \"1381109\",\n \"RefundQuantity\": null,\n \"RefundAmount\": \"320\"\n }\n]"
response = http.request(request)
puts response.read_body{
"Success": true,
"Reason": "Refund generated with id 67961",
"NotifyOrderRefund": {
"MerchantOrderId": "orderid123",
"RefundId": "67961",
"MerchantGUID": "39a4ffdsfds-f6324b-41ce-afdsfa-c8ef18234132",
"Products": [
{
"CartItemId": "2",
"RefundQuantity": "1",
"OriginalRefundAmount": "31.2707",
"RefundAmount": "60.9500",
"RefundReason": {
"OrderRefundReasonCode": null,
"Name": "Undefined"
},
"RefundComments": "Damaged shipment but the customer kept it"
}
],
"Components": [
{
"Amount": "60.95",
"OriginalAmount": "31.27",
"IsChargedToMerchant": "TRUE",
"ComponentType": "Products"
}
],
"OrderId": "GE95135467GB",
"TotalRefundAmount": "60.95",
"RefundReason": {
"OrderRefundReasonCode": null,
"Name": "Undefined"
},
"RefundComments": "Damaged shipment but the customer kept it",
"OriginalTotalRefundAmount": "31.27",
"ServiceGestureAmount": "0",
"WebStoreCode": null,
"WebStoreInstanceCode": "GlobalEDefaultStoreInstance",
"FullRefund": false,
"TotalGiftCardsRefundAmount": "100.0000",
"GiftCardsData": {
"CardId": "1234",
"BalanceInGiftCardCurrency": 18.39,
"BalanceInCustomerCurrency": 290.21,
"GiftCardCurrencyCode": "EUR",
"CustomerCurrencyMode": "EUR",
"BalanceUsedInCardCurrency": 39,
"BalanceUsedInCustomerCurrency": 387.8,
"RedeemTransactionId": "1987489732938",
"CardIdFields": {
"CardId": "498784937",
"giftCardBalanceToUse": "100"
}
}
}
}Make sure your integration follows the latest authentication and IP whitelisting guidelines.
Part of the Refunds integration guide — see it for when and how to use this endpoint.
Query Parameters
The order-level refund details, as a URL-encoded, JSON-serialized OrderRefundDetails object — passed in the query string, not in the request body. Only OrderId is required. See the integration guide for the object's fields.
Example:
"{\"OrderId\":\"GE95135467GB\",\"FullRefund\":false,\"TotalRefundAmount\":\"320\",\"RefundReason\":{\"OrderRefundReasonCode\":null,\"Name\":\"Undefined\"}}"
Body
application/json
Response
Refund processed. The same envelope carries both successful and processing-error outcomes — distinguished by Success. On a processing error, Success is false and NotifyOrderRefund is null.
Refund response envelope.

