Skip to main content
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
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "processing",
  "currency": "<string>",
  "amount": 49999999,
  "target_type": "payment-method",
  "reconciliation_id": "<string>",
  "transaction_reconciliation_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "type": "refund",
  "payment_service_refund_id": "refund_xYqd43gySMtori",
  "reason": "Refund due to user request.",
  "target_id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d",
  "external_identifier": "refund-12345",
  "transaction_external_identifier": "transaction-12345",
  "creator": {
    "email_address": "[email protected]",
    "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

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

Path Parameters

refund_id
string<uuid>
required

The ID of the refund The ID of the refund

Response

Successful Response

id
string<uuid>
required

The unique identifier for the refund.

transaction_id
string<uuid>
required

The ID of the transaction associated with this refund.

status
enum<string>
required

The status of the refund.

Available options:
processing,
succeeded,
failed,
declined,
voided
currency
string
required

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

amount
integer
required

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

Required range: 0 <= x <= 99999999
target_type
enum<string>
required

The type of the instrument that was refunded.

Available options:
payment-method,
gift-card-redemption
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.

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.

created_at
string<date-time>
required

The date this refund was created at.

updated_at
string<date-time>
required

The date this refund was last updated at.

type
string
default:refund

Always refund.

Allowed value: "refund"
payment_service_refund_id
string | null

The payment service's unique ID for the refund.

Required string length: 1 - 300
Example:

"refund_xYqd43gySMtori"

reason
string | null

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

Example:

"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.

Example:

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

external_identifier
string | null

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

Example:

"refund-12345"

transaction_external_identifier
string | null

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

Example:

"transaction-12345"

creator
Creator · object

The user that created this resource

Example:
{
"email_address": "[email protected]",
"id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d",
"name": "Jhon Doe"
}
error_code
string | null

The standardized error code set by Gr4vy.

Example:

"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.

Example:

"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.

Example:

"Missing redirect URL"