curl --request GET \
--url https://int-prodtest.m1amdocs.io/partnersub/v2/transaction/{transactionId}/refund/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://int-prodtest.m1amdocs.io/partnersub/v2/transaction/{transactionId}/refund/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://int-prodtest.m1amdocs.io/partnersub/v2/transaction/{transactionId}/refund/{id}', 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://int-prodtest.m1amdocs.io/partnersub/v2/transaction/{transactionId}/refund/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://int-prodtest.m1amdocs.io/partnersub/v2/transaction/{transactionId}/refund/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://int-prodtest.m1amdocs.io/partnersub/v2/transaction/{transactionId}/refund/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://int-prodtest.m1amdocs.io/partnersub/v2/transaction/{transactionId}/refund/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created": "2023-11-07T05:31:56Z",
"amount": 123,
"currency": "<string>",
"note": "<string>",
"refund_distribution_strategy": "SpecifiedItems",
"refund_items": [
{
"code": "<string>",
"amount": 123,
"metadata": {}
}
],
"metadata": {}
}{
"code": "invalid-request",
"message": "<string>"
}{
"code": "authentication-required",
"message": "<string>"
}{
"code": "refund-transaction-not-found",
"message": "refund transaction not found"
}{
"code": "server-error",
"message": "<string>"
}Retrieve details of a refund transaction
curl --request GET \
--url https://int-prodtest.m1amdocs.io/partnersub/v2/transaction/{transactionId}/refund/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://int-prodtest.m1amdocs.io/partnersub/v2/transaction/{transactionId}/refund/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://int-prodtest.m1amdocs.io/partnersub/v2/transaction/{transactionId}/refund/{id}', 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://int-prodtest.m1amdocs.io/partnersub/v2/transaction/{transactionId}/refund/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://int-prodtest.m1amdocs.io/partnersub/v2/transaction/{transactionId}/refund/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://int-prodtest.m1amdocs.io/partnersub/v2/transaction/{transactionId}/refund/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://int-prodtest.m1amdocs.io/partnersub/v2/transaction/{transactionId}/refund/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created": "2023-11-07T05:31:56Z",
"amount": 123,
"currency": "<string>",
"note": "<string>",
"refund_distribution_strategy": "SpecifiedItems",
"refund_items": [
{
"code": "<string>",
"amount": 123,
"metadata": {}
}
],
"metadata": {}
}{
"code": "invalid-request",
"message": "<string>"
}{
"code": "authentication-required",
"message": "<string>"
}{
"code": "refund-transaction-not-found",
"message": "refund transaction not found"
}{
"code": "server-error",
"message": "<string>"
}Authorizations
The authorization key obtained from MarketONE.
Path Parameters
The extTransactionID parameter is the transaction ID on which the original transaction was processed.
36The extTransactionID parameter is the transaction ID on which the original refund was processed.
36Response
OK - Refund details successfully retrieved
The Refund object provides a way to reverse a charge, refunding money to the customer. You can create, and retrieve individual Refunds; as well as list all existing Refunds. Refunds require a transaction – a refund can only be executed against an existing, successfully captured transaction. Refunds can be issued for any valid amount (in the currency of the original transaction) up to the as-yet un-refunded balance of the original transaction. You can issue any number of refunds on a given transaction (until it has been fully refunded).
A unique identifier.
128The date/time at which the refund was requested.
Amount of the refund. Must be positive (non-zero) and less than or equal to the as-yet-un-refunded balance of the specified transaction. Ignored if refundItems are specified.
Free-form specified note about refund.
Defines strategy for distributing refund amount across the original TransactionItems. Default is None.
SpecifiedItems, None For item-level refunds, specifies the transaction items to refund with details.
Show child attributes
Show child attributes
A set of key/value pairs that you can attach to an object. Useful for storing additional information.
Show child attributes
Show child attributes
Was this page helpful?

