using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "mattilda",
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": "jhon.doe@gr4vy.com",
"id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d",
"name": "Jhon Doe"
}
}Fetch a refund.
using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "mattilda",
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": "jhon.doe@gr4vy.com",
"id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d",
"name": "Jhon Doe"
}
}transactions.read scope.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the merchant account to use for this request.
"default"
The ID of the refund
"6a1d4e46-14ed-4fe1-a45f-eff4e025d211"
Successful Response
The unique identifier for the refund.
"6a1d4e46-14ed-4fe1-a45f-eff4e025d211"
The ID of the transaction associated with this refund.
"7099948d-7286-47e4-aad8-b68f7eb44591"
The status of the refund.
processing, succeeded, failed, declined, voided "succeeded"
The ISO 4217 currency code for this refund. Will always match that of the associated transaction.
^[A-Z]{3}$"EUR"
"GBP"
"MXN"
The amount of this refund, in the smallest currency unit (for example, cents or pence).
0 <= x <= 999999991299
The type of the instrument that was refunded.
payment-method "payment-method"
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.
"7jZXl4gBUNl0CnaLEnfXbt"
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.
"aLEnfXbt7jZXl4gBUNl0Cn"
The date this refund was created at.
"2013-07-16T19:23:00.000+00:00"
The date this refund was last updated at.
"2013-07-16T19:23:00.000+00:00"
Always refund.
"refund""refund"
The payment service's unique ID for the refund.
1 - 300"refund_xYqd43gySMtori"
The reason for this refund. Could be a multiline string.
"Refund due to user request."
The optional ID of the instrument that was refunded. This may be null if the instrument was not stored.
"07e70d14-a0c0-4ff5-bd4a-509959af0e4d"
An external identifier that can be used to match the refund against your own records.
"refund-12345"
An external identifier that can be used to match the transaction against your own records.
"transaction-12345"
The user that created this resource
Show child attributes
{
"email_address": "jhon.doe@gr4vy.com",
"id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d",
"name": "Jhon Doe"
}Was this page helpful?