import * as z from "zod/v3"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ApiCommonSchemasCreator } from "./apicommonschemascreator.js"; import { RefundStatus } from "./refundstatus.js"; import { RefundTargetType } from "./refundtargettype.js"; export type Refund = { /** * Always `refund`. */ type: "refund"; /** * The unique identifier for the refund. */ id: string; /** * The ID of the transaction associated with this refund. */ transactionId: string; /** * The payment service's unique ID for the refund. */ paymentServiceRefundId?: string | null | undefined; status: RefundStatus; /** * The ISO 4217 currency code for this refund. Will always match that of the associated transaction. */ currency: string; /** * The amount of this refund, in the smallest currency unit (for example, cents or pence). */ amount: number; /** * The reason for this refund. Could be a multiline string. */ reason?: string | null | undefined; targetType: RefundTargetType; /** * The optional ID of the instrument that was refunded. This may be `null` if the instrument was not stored. */ targetId?: string | null | undefined; /** * 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. */ reconciliationId: string; /** * An external identifier that can be used to match the refund against your own records. */ externalIdentifier?: string | null | undefined; /** * 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. */ transactionReconciliationId: string; /** * An external identifier that can be used to match the transaction against your own records. */ transactionExternalIdentifier?: string | null | undefined; /** * The date this refund was created at. */ createdAt: Date; /** * The date this refund was last updated at. */ updatedAt: Date; /** * The user that created this resource */ creator?: ApiCommonSchemasCreator | null | undefined; /** * The standardized error code set by Gr4vy. */ errorCode?: string | null | undefined; /** * 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. */ rawResponseCode?: string | null | undefined; /** * 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. */ rawResponseDescription?: string | null | undefined; /** * The ISO 4217 currency code of this refund's settlement. */ settledCurrency?: string | null | undefined; /** * The net amount settled for this refund, in the smallest currency unit (for example, cents or pence). */ settledAmount: number; /** * Indicates whether this refund has been settled. */ settled: boolean; }; /** @internal */ export declare const Refund$inboundSchema: z.ZodType; export declare function refundFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=refund.d.ts.map