import { Refund } from "@gr4vy/sdk/models/components";
let value: Refund = {
id: "6a1d4e46-14ed-4fe1-a45f-eff4e025d211",
transactionId: "7099948d-7286-47e4-aad8-b68f7eb44591",
status: "voided",
currency: "EUR",
amount: 1299,
targetType: "payment-method",
reconciliationId: "7jZXl4gBUNl0CnaLEnfXbt",
transactionReconciliationId: "aLEnfXbt7jZXl4gBUNl0Cn",
createdAt: new Date("2013-07-16T19:23:00.000+00:00"),
updatedAt: new Date("2013-07-16T19:23:00.000+00:00"),
};| Field | Type | Required | Description | Example |
|---|---|---|---|---|
type |
"refund" | ➖ | Always refund. |
refund |
id |
string | ✔️ | The unique identifier for the refund. | 6a1d4e46-14ed-4fe1-a45f-eff4e025d211 |
transactionId |
string | ✔️ | The ID of the transaction associated with this refund. | 7099948d-7286-47e4-aad8-b68f7eb44591 |
paymentServiceRefundId |
string | ➖ | The payment service's unique ID for the refund. | refund_xYqd43gySMtori |
status |
components.RefundStatus | ✔️ | N/A | |
currency |
string | ✔️ | The ISO 4217 currency code for this refund. Will always match that of the associated transaction. | Example 1: EUR Example 2: GBP Example 3: USD |
amount |
number | ✔️ | The amount of this refund, in the smallest currency unit (for example, cents or pence). | 1299 |
reason |
string | ➖ | The reason for this refund. Could be a multiline string. | Refund due to user request. |
targetType |
components.RefundTargetType | ✔️ | N/A | |
targetId |
string | ➖ | The optional ID of the instrument that was refunded. This may be null if the instrument was not stored. |
07e70d14-a0c0-4ff5-bd4a-509959af0e4d |
reconciliationId |
string | ✔️ | 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 |
externalIdentifier |
string | ➖ | An external identifier that can be used to match the refund against your own records. | refund-12345 |
transactionReconciliationId |
string | ✔️ | 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 |
transactionExternalIdentifier |
string | ➖ | An external identifier that can be used to match the transaction against your own records. | transaction-12345 |
createdAt |
Date | ✔️ | The date this refund was created at. | 2013-07-16T19:23:00.000+00:00 |
updatedAt |
Date | ✔️ | The date this refund was last updated at. | 2013-07-16T19:23:00.000+00:00 |
creator |
components.Creator | ➖ | The user that created this resource | { "email_address": "jhon.doe@gr4vy.com", "id": "07e70d14-a0c0-4ff5-bd4a-509959af0e4d", "name": "Jhon Doe" } |
errorCode |
string | ➖ | The standardized error code set by Gr4vy. | service_error |
rawResponseCode |
string | ➖ | 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. | E104 |
rawResponseDescription |
string | ➖ | 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. | Missing redirect URL |