List refunds
using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/transactions/{transaction_id}/refunds");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.{id}.gr4vy.app/transactions/{transaction_id}/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://api.sandbox.{id}.gr4vy.app/transactions/{transaction_id}/refunds")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/transactions/{transaction_id}/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;
}import requests
url = "https://api.sandbox.{id}.gr4vy.app/transactions/{transaction_id}/refunds"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.{id}.gr4vy.app/transactions/{transaction_id}/refunds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.sandbox.{id}.gr4vy.app/transactions/{transaction_id}/refunds \
--header 'Authorization: Bearer <token>'{
"items": [
{
"type": "refund",
"id": "8724fd24-5489-4a5d-90fd-0604df7d3b83",
"transaction_id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"payment_service_refund_id": "refund_xYqd43gySMtori",
"status": "processing",
"currency": "USD",
"amount": 1299,
"reason": "Refund due to user request",
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00",
"target_type": "payment-method",
"target_id": "c23ea83f-1b1c-4584-a0e8-78ef8c041949",
"external_identifier": "refund-789123",
"reconciliation_id": "7jZXl4gBUNl0CnaLEnfXbt",
"transaction_external_identifier": "transaction-789123",
"transaction_reconciliation_id": "7jZXl4gBUNl0CnaLEnfXbt"
}
],
"limit": 1,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": null
}{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}{
"type": "error",
"code": "not_found",
"status": 404,
"message": "The resource could not be found",
"details": []
}List transaction refunds
GET
/
transactions
/
{transaction_id}
/
refunds
List refunds
using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/transactions/{transaction_id}/refunds");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.{id}.gr4vy.app/transactions/{transaction_id}/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://api.sandbox.{id}.gr4vy.app/transactions/{transaction_id}/refunds")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/transactions/{transaction_id}/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;
}import requests
url = "https://api.sandbox.{id}.gr4vy.app/transactions/{transaction_id}/refunds"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.{id}.gr4vy.app/transactions/{transaction_id}/refunds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.sandbox.{id}.gr4vy.app/transactions/{transaction_id}/refunds \
--header 'Authorization: Bearer <token>'{
"items": [
{
"type": "refund",
"id": "8724fd24-5489-4a5d-90fd-0604df7d3b83",
"transaction_id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"payment_service_refund_id": "refund_xYqd43gySMtori",
"status": "processing",
"currency": "USD",
"amount": 1299,
"reason": "Refund due to user request",
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00",
"target_type": "payment-method",
"target_id": "c23ea83f-1b1c-4584-a0e8-78ef8c041949",
"external_identifier": "refund-789123",
"reconciliation_id": "7jZXl4gBUNl0CnaLEnfXbt",
"transaction_external_identifier": "transaction-789123",
"transaction_reconciliation_id": "7jZXl4gBUNl0CnaLEnfXbt"
}
],
"limit": 1,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": null
}{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}{
"type": "error",
"code": "not_found",
"status": 404,
"message": "The resource could not be found",
"details": []
}This endpoint requires the
transactions.read scope.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID for the transaction to get the information for.
Example:
"fe26475d-ec3e-4884-9553-f7356683f7f9"
Response
Returns a list of refunds.
A list of refunds.
A list of refunds.
Show child attributes
Show child attributes
The limit applied to request. This represents the number of items that are at maximum returned by this request.
Required range:
1 <= x <= 100Example:
1
The cursor that represents the next page of results. Use the cursor query
parameter to fetch this page of items.
Required string length:
1 - 1000Example:
"ZXhhbXBsZTE"
The cursor that represents the next page of results. Use the cursor query
parameter to fetch this page of items.
Required string length:
1 - 1000Example:
null
⌘I