cURL
curl -X GET "$EXSITED_BASE_URL/api/v4/refunds/REF-0001" \
-H "Authorization: Bearer $ACCESS_TOKEN"from exsited import build_client
client = build_client()
response = client.refunds.get_refund("REF-0001")
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.refunds.getRefund('REF-0001');
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->refunds->getRefund('REF-0001');
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.refunds.refunds_dto.RefundsDto.Refund;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<Refund> response = client.refunds().getRefund("REF-0001");
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Refunds.GetRefundAsync("REF-0001");
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.refunds.getRefund('REF-0001');
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Refunds().GetRefund(context.Background(), "REF-0001", nil, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"refund": {
"account": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"amount": "<string>",
"created_by": "<string>",
"created_on": "<string>",
"credit_note": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"custom_attributes": [
"<unknown>"
],
"gateway_response": "<unknown>",
"id": "<string>",
"issue_date": "<string>",
"last_updated_by": "<string>",
"last_updated_on": "<string>",
"note": "<unknown>",
"object": "<string>",
"payment_method": "<string>",
"payment_processor": "<string>",
"reconcile_status": "<string>",
"reference": "<string>",
"status": "<string>",
"uuid": "<string>",
"version": 123
}
}{
"object": "<string>",
"request_id": "<string>",
"status": 123,
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>"
}
]
}Refunds
Retrieve a refund
Returns one refund by its code.
GET
/
refunds
/
{refund_id}
cURL
curl -X GET "$EXSITED_BASE_URL/api/v4/refunds/REF-0001" \
-H "Authorization: Bearer $ACCESS_TOKEN"from exsited import build_client
client = build_client()
response = client.refunds.get_refund("REF-0001")
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.refunds.getRefund('REF-0001');
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->refunds->getRefund('REF-0001');
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.refunds.refunds_dto.RefundsDto.Refund;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<Refund> response = client.refunds().getRefund("REF-0001");
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Refunds.GetRefundAsync("REF-0001");
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.refunds.getRefund('REF-0001');
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Refunds().GetRefund(context.Background(), "REF-0001", nil, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"refund": {
"account": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"amount": "<string>",
"created_by": "<string>",
"created_on": "<string>",
"credit_note": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"custom_attributes": [
"<unknown>"
],
"gateway_response": "<unknown>",
"id": "<string>",
"issue_date": "<string>",
"last_updated_by": "<string>",
"last_updated_on": "<string>",
"note": "<unknown>",
"object": "<string>",
"payment_method": "<string>",
"payment_processor": "<string>",
"reconcile_status": "<string>",
"reference": "<string>",
"status": "<string>",
"uuid": "<string>",
"version": 123
}
}{
"object": "<string>",
"request_id": "<string>",
"status": 123,
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>"
}
]
}Fetches a single refund with its amount, payment method, reference, note, account and credit note.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set
host to your Exsited API host name and paste an access token from Get an access token.