GET
/
refunds
/
{refund_id}
C#
using Gr4vy;
using Gr4vy.Models.Components;

var sdk = new Gr4vySDK(
    id: "example",
    server: SDKConfig.Server.Sandbox,
    bearerAuthSource: Auth.WithToken(privateKey),
    merchantAccountId: "default"
);

var res = await sdk.Refunds.GetAsync(refundId: "6a1d4e46-14ed-4fe1-a45f-eff4e025d211");

// handle response
{
  "type": "refund",
  "id": "6a1d4e46-14ed-4fe1-a45f-eff4e025d211",
  "transaction_id": "7099948d-7286-47e4-aad8-b68f7eb44591",
  "payment_service_refund_id": "refund_xYqd43gySMtori",
  "status": "succeeded",
  "currency": "EUR",
  "amount": 1299,
  "reason": "Refund due to user request.",
  "target_type": "payment-method",
  "target_id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d",
  "reconciliation_id": "7jZXl4gBUNl0CnaLEnfXbt",
  "external_identifier": "refund-12345",
  "transaction_reconciliation_id": "aLEnfXbt7jZXl4gBUNl0Cn",
  "transaction_external_identifier": "transaction-12345",
  "created_at": "2013-07-16T19:23:00.000+00:00",
  "updated_at": "2013-07-16T19:23:00.000+00:00",
  "creator": {
    "email_address": "jhon.doe@gr4vy.com",
    "id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d",
    "name": "Jhon Doe"
  },
  "error_code": "service_error",
  "raw_response_code": "E104",
  "raw_response_description": "Missing redirect URL"
}
This endpoint requires the transactions.read scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-gr4vy-merchant-account-id
string | null

The ID of the merchant account to use for this request.

Examples:

"default"

Path Parameters

refund_id
string<uuid>
required

The ID of the refund

Examples:

"6a1d4e46-14ed-4fe1-a45f-eff4e025d211"

Response

Successful Response

id
string<uuid>
required

The unique identifier for the refund.

Examples:

"6a1d4e46-14ed-4fe1-a45f-eff4e025d211"

transaction_id
string<uuid>
required

The ID of the transaction associated with this refund.

Examples:

"7099948d-7286-47e4-aad8-b68f7eb44591"

status
enum<string>
required

The status of the refund.

Available options:
processing,
succeeded,
failed,
declined,
voided
Examples:

"succeeded"

currency
string
required

The ISO 4217 currency code for this refund. Will always match that of the associated transaction.

Examples:

"EUR"

"GBP"

"USD"

amount
integer
required

The amount of this refund, in the smallest currency unit (for example, cents or pence).

Required range: 0 <= x <= 99999999
Examples:

1299

target_type
enum<string>
required

The type of the instrument that was refunded.

Available options:
payment-method,
gift-card-redemption
Examples:

"payment-method"

reconciliation_id
string
required

The base62 encoded refund ID. This represents a shorter version of this refund's id which is sent to payment services, anti-fraud services, and other connectors. You can use this ID to reconcile a payment service's refund against our system.

Examples:

"7jZXl4gBUNl0CnaLEnfXbt"

transaction_reconciliation_id
string
required

The base62 encoded transaction ID. This represents a shorter version of the related transaction's id which is sent to payment services, anti-fraud services, and other connectors. You can use this ID to reconcile a payment service's transaction against our system.

Examples:

"aLEnfXbt7jZXl4gBUNl0Cn"

created_at
string<date-time>
required

The date this refund was created at.

Examples:

"2013-07-16T19:23:00.000+00:00"

updated_at
string<date-time>
required

The date this refund was last updated at.

Examples:

"2013-07-16T19:23:00.000+00:00"

type
string
default:refund

Always refund.

Allowed value: "refund"
Examples:

"refund"

payment_service_refund_id
string | null

The payment service's unique ID for the refund.

Required string length: 1 - 300
Examples:

"refund_xYqd43gySMtori"

reason
string | null

The reason for this refund. Could be a multiline string.

Examples:

"Refund due to user request."

target_id
string<uuid> | null

The optional ID of the instrument that was refunded. This may be null if the instrument was not stored.

Examples:

"07e70d14-a0c0-4ff5-bd4a-509959af0e4d"

external_identifier
string | null

An external identifier that can be used to match the refund against your own records.

Examples:

"refund-12345"

transaction_external_identifier
string | null

An external identifier that can be used to match the transaction against your own records.

Examples:

"transaction-12345"

creator
object | null

The user that created this resource

Examples:
{
"email_address": "jhon.doe@gr4vy.com",
"id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d",
"name": "Jhon Doe"
}
error_code
string | null

The standardized error code set by Gr4vy.

Examples:

"service_error"

raw_response_code
string | null

This is the response code received from the payment service. This can be set to any value and is not standardized across different payment services.

Examples:

"E104"

raw_response_description
string | null

This is the response description received from the payment service. This can be set to any value and is not standardized across different payment services.

Examples:

"Missing redirect URL"