curl --request GET \
--url https://virtserver.swaggerhub.com/Amdocs_Media/Retain_API/2024.06/retain/refunds \
--header 'Authorization: Bearer <token>'import requests
url = "https://virtserver.swaggerhub.com/Amdocs_Media/Retain_API/2024.06/retain/refunds"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://virtserver.swaggerhub.com/Amdocs_Media/Retain_API/2024.06/retain/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://virtserver.swaggerhub.com/Amdocs_Media/Retain_API/2024.06/retain/refunds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://virtserver.swaggerhub.com/Amdocs_Media/Retain_API/2024.06/retain/refunds"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://virtserver.swaggerhub.com/Amdocs_Media/Retain_API/2024.06/retain/refunds")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://virtserver.swaggerhub.com/Amdocs_Media/Retain_API/2024.06/retain/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "List",
"data": [
{
"vid": "659649a98f9b2c688b6217b3c642e1f3262a3427",
"id": "TX12345678",
"timestamp": "2020-05-18T20:39:03.000Z",
"amount": 21.64,
"partial_amount": null,
"currency": "USD",
"status": "Authorized",
"division_number": "349641",
"retain_transaction_id": "<string>",
"refunds": [
{
"id": "C12345678",
"vid": "f147870b2c86a00fb1264fb64c0a8b58fcd95b4d",
"amount": 21.64,
"status": "Completed",
"timestamp": "2023-02-16T20:39:03.000Z"
}
],
"refundable_amount": 21.64,
"processor_transaction_id": "<string>",
"account": {
"id": "Cust-2125551212",
"vid": "659649a98f9b2c688b6217b3c642e1f3262a3427",
"external_id": "asdf1234",
"email": "foo@example.com"
},
"subscription": {
"id": "Sub-2125551212",
"starts": "2022-05-15T18:24:05.000Z",
"affiliate": "Sub-2125551212",
"sub_affiliate": "Sub-2125551212"
},
"previous_billing_count": 123,
"payment_method": {
"id": "XY-0266667018640",
"credit_card": {
"account": "-----BEGIN PGP MESSAGE-----\nVersion: Crypt::OpenPGP 1.12\n\nhIwDSPki6gFMdzcBBACbOQMTtfNXNwzzbNGb2qRCYEuGZ4PQP8+MIdHb7+v56O9R\n9q0nTczets0IBnxktypGLR/yoy7MDVvZ1xBK7pCEM3PDxvqWzg4YxZ0pri9NZwYi\nHYNxjurmU2jeL9vcgl96w1pbeBcSXxa6xgpfFidLADVaADn7+1nprR8LblUZsKQi\n4FfULminxVaqlr/yLXO2qjSHxvhb62JXqS9RnjDq3Zxf+A==\n=X7h1\n-----END PGP MESSAGE-----\n",
"account_hash": "c8958779c12837ffec0520eac5c1f61db88bb5f4",
"expiration_date": "202204",
"account_updated": true
},
"vid": "659649a98f9b2c688b6217b3c642e1f3262a3427",
"account": {
"id": "Cust-2125551212",
"vid": "659649a98f9b2c688b6217b3c642e1f3262a3427",
"external_id": "asdf1234",
"email": "foo@example.com"
},
"account_holder": "Lily Munster",
"billing_address": {
"line1": "1313 Mockingbird Ln.",
"line2": "Floor 13",
"line3": "Suite 13",
"city": "Mockingbird Heights",
"county": "San Bernardino",
"district": "CA",
"postal_code": "92415",
"country": "US"
},
"is_tokenized": false,
"type": "CreditCard",
"primary": 1
},
"metadata": {},
"next_activity": "2022-10-08T00:00:00.000Z",
"billing_descriptor": "<string>",
"auth_code": "530",
"avs_code": "Y:2341234234",
"cvn_code": "M:2341234234",
"auth_code_description": "Soft Failure",
"payment_network_transaction_id": "<string>",
"retry_number": 1,
"forced_deposit": false
}
],
"url": "<string>",
"next": "<string>",
"previous": "<string>",
"total_records": 123
}{
"code": "RET400",
"message": "Invalid parameter: <bad_parm>"
}{
"code": "RET0404",
"message": "No matching results found"
}List Retain Refunds
Returns an array of Transactions that have been refunded based on parameters.
Accepts
None
Returns
JSON - A list array with a data property that contains an array of up to limit number of Transactions, starting after the specified starting_after Transaction (or ending before the specified ending_before Transaction). Each entry in the array is a full Transaction object. If no more Transactions are available, the resulting array will be empty. This request should never throw an error.
Available query parameters are listed below.
If you specify no parameters:
-
end_timestampdefault is the current Retain system time (UTC). -
start_timestampdefault is theend_timestampminus one day (that is, the last one day). -
You can specify
statusand/orlimitparameters to further filter results.
If only the start_timestamp is specified, the end_timestamp default is the start_timestamp plus one day.
If only the end_timestamp is specified, the start_timestamp default is the end_timestamp minus one day.
If transaction_id, subscription_id, or account_id, are specified:
-
start_timestampandend_timestampare ignored. -
Only those Transactions that have been refunded AND are associated with the specified Transaction, Subscription, or Account identifier are returned
If multiple parameters are specified, only the highest precedence filter is applied. The order followed is:
start_timestamp,end_timestamptransaction_idsubscription_idaccount_id
status is a secondary filter applied to status of refunds that can be used with any of the above parameters and their respective defaults (if any).
curl --request GET \
--url https://virtserver.swaggerhub.com/Amdocs_Media/Retain_API/2024.06/retain/refunds \
--header 'Authorization: Bearer <token>'import requests
url = "https://virtserver.swaggerhub.com/Amdocs_Media/Retain_API/2024.06/retain/refunds"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://virtserver.swaggerhub.com/Amdocs_Media/Retain_API/2024.06/retain/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://virtserver.swaggerhub.com/Amdocs_Media/Retain_API/2024.06/retain/refunds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://virtserver.swaggerhub.com/Amdocs_Media/Retain_API/2024.06/retain/refunds"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://virtserver.swaggerhub.com/Amdocs_Media/Retain_API/2024.06/retain/refunds")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://virtserver.swaggerhub.com/Amdocs_Media/Retain_API/2024.06/retain/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "List",
"data": [
{
"vid": "659649a98f9b2c688b6217b3c642e1f3262a3427",
"id": "TX12345678",
"timestamp": "2020-05-18T20:39:03.000Z",
"amount": 21.64,
"partial_amount": null,
"currency": "USD",
"status": "Authorized",
"division_number": "349641",
"retain_transaction_id": "<string>",
"refunds": [
{
"id": "C12345678",
"vid": "f147870b2c86a00fb1264fb64c0a8b58fcd95b4d",
"amount": 21.64,
"status": "Completed",
"timestamp": "2023-02-16T20:39:03.000Z"
}
],
"refundable_amount": 21.64,
"processor_transaction_id": "<string>",
"account": {
"id": "Cust-2125551212",
"vid": "659649a98f9b2c688b6217b3c642e1f3262a3427",
"external_id": "asdf1234",
"email": "foo@example.com"
},
"subscription": {
"id": "Sub-2125551212",
"starts": "2022-05-15T18:24:05.000Z",
"affiliate": "Sub-2125551212",
"sub_affiliate": "Sub-2125551212"
},
"previous_billing_count": 123,
"payment_method": {
"id": "XY-0266667018640",
"credit_card": {
"account": "-----BEGIN PGP MESSAGE-----\nVersion: Crypt::OpenPGP 1.12\n\nhIwDSPki6gFMdzcBBACbOQMTtfNXNwzzbNGb2qRCYEuGZ4PQP8+MIdHb7+v56O9R\n9q0nTczets0IBnxktypGLR/yoy7MDVvZ1xBK7pCEM3PDxvqWzg4YxZ0pri9NZwYi\nHYNxjurmU2jeL9vcgl96w1pbeBcSXxa6xgpfFidLADVaADn7+1nprR8LblUZsKQi\n4FfULminxVaqlr/yLXO2qjSHxvhb62JXqS9RnjDq3Zxf+A==\n=X7h1\n-----END PGP MESSAGE-----\n",
"account_hash": "c8958779c12837ffec0520eac5c1f61db88bb5f4",
"expiration_date": "202204",
"account_updated": true
},
"vid": "659649a98f9b2c688b6217b3c642e1f3262a3427",
"account": {
"id": "Cust-2125551212",
"vid": "659649a98f9b2c688b6217b3c642e1f3262a3427",
"external_id": "asdf1234",
"email": "foo@example.com"
},
"account_holder": "Lily Munster",
"billing_address": {
"line1": "1313 Mockingbird Ln.",
"line2": "Floor 13",
"line3": "Suite 13",
"city": "Mockingbird Heights",
"county": "San Bernardino",
"district": "CA",
"postal_code": "92415",
"country": "US"
},
"is_tokenized": false,
"type": "CreditCard",
"primary": 1
},
"metadata": {},
"next_activity": "2022-10-08T00:00:00.000Z",
"billing_descriptor": "<string>",
"auth_code": "530",
"avs_code": "Y:2341234234",
"cvn_code": "M:2341234234",
"auth_code_description": "Soft Failure",
"payment_network_transaction_id": "<string>",
"retry_number": 1,
"forced_deposit": false
}
],
"url": "<string>",
"next": "<string>",
"previous": "<string>",
"total_records": 123
}{
"code": "RET400",
"message": "Invalid parameter: <bad_parm>"
}{
"code": "RET0404",
"message": "No matching results found"
}Query Parameters
A date-time parameter (as defined by RFC 3339), allowing to filter for a time range. Enter the time of the Transaction submission to Retain that you'd like to see.
Defaults to Retain system current date and time minus 1 day. Range with end_timestamp cannot exceed 31 days.
The date-time parameter, (as defined by RFC 3339, section 5.6) allowing to filter for a time range. Enter the date range closing time until which Transactions were submitted to Retain.
Defaults to timestamp + 1 day. Range with start_timestamp cannot exceed 31 days.
Merchant's unique identifier for Account/customer related to a submitted Transaction.
Merchant's unique identifier for Subscription related to a submitted Transaction.
Identifier of Transaction to retrieve.
{transaction_id} can be either:
- The Merchant supplied identifier of a transaction that failed billing in the Merchant's billing system (aka a 'Failed' transaction identifier)
- The Retain generated identifier of a retry transaction (either successful or declined)
Filters the list of transactions fetched by refund status. Can be:
- Error
- Complete
- Processing
Error, Complete, Processing A limit on the number of objects to be returned, between 1 and 100.
If set to greater than 100, the value is set to 100.
1 <= x <= 100A cursor for use in pagination. starting_after is an object id that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.
A cursor for use in pagination. ending_before is an object id that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.
Response
List of Transactions with pagination links
List Show child attributes
Show child attributes
The query string provided in the request
The route (partial URL) to the next Transaction object (string to select the “next”); included id should match that of the last object returned here.
The route (partial URL) to the previous Transaction object (string to select the “previous”); included id should match that of the first object returned here.
Integer count of the number of items in the returned list.
