import * as z from "zod/v3"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { GiftCardRedemption } from "./giftcardredemption.js"; import { GiftCardService } from "./giftcardservice.js"; import { InstrumentType } from "./instrumenttype.js"; import { Method } from "./method.js"; import { ShippingDetails } from "./shippingdetails.js"; import { TransactionBuyer } from "./transactionbuyer.js"; import { TransactionIntent } from "./transactionintent.js"; import { TransactionPaymentMethod } from "./transactionpaymentmethod.js"; import { TransactionPaymentService } from "./transactionpaymentservice.js"; import { TransactionStatus } from "./transactionstatus.js"; /** * A transaction, summarised */ export type TransactionSummary = { /** * Always `transaction`. */ type: "transaction"; /** * The ID for the transaction. */ id: string; /** * The base62 encoded transaction ID. This represents a shorter version of this 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. This ID is sent instead of the transaction ID because not all services support 36 digit identifiers. */ reconciliationId: string; /** * The ID of the merchant account this transaction belongs to. */ merchantAccountId: string; /** * The currency code for this transaction. */ currency: string; /** * The total amount for this transaction across all funding sources including gift cards. */ amount: number; status: TransactionStatus; /** * The amount for this transaction that has been authorized for the `payment_method`. This can be less than the `amount` if gift cards were used. */ authorizedAmount: number; /** * The total amount captured for this transaction, in the smallest currency unit (for example, cents or pence). This can be the full value of the `authorized_amount` or less. */ capturedAmount: number; /** * The total amount refunded for this transaction, in the smallest currency unit (for example, cents or pence). This can be the full value of the `captured_amount` or less. */ refundedAmount: number; /** * The ISO 4217 currency code of this transaction's settlement. */ settledCurrency?: string | null | undefined; /** * The net amount settled for this transaction, in the smallest currency unit (for example, cents or pence). */ settledAmount: number; /** * Indicates whether this transaction has been settled. */ settled: boolean; /** * The 2-letter ISO 3166-1 alpha-2 country code for the transaction. Used to filter payment services for processing. */ country?: string | null | undefined; /** * An external identifier that can be used to match the transaction against your own records. */ externalIdentifier?: string | null | undefined; intent: TransactionIntent; /** * The payment method used for this transaction. */ paymentMethod?: TransactionPaymentMethod | null | undefined; /** * The method used for the transaction. */ method?: Method | null | undefined; /** * The name of the instrument used to process the transaction. */ instrumentType?: InstrumentType | null | undefined; /** * The standardized error code set by Gr4vy. */ errorCode?: string | null | undefined; /** * The payment service used for this transaction. */ paymentService?: TransactionPaymentService | null | undefined; /** * Whether a manual anti fraud review is pending with an anti fraud service. */ pendingReview: boolean; /** * The buyer used for this transaction. */ buyer?: TransactionBuyer | 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 shipping details associated with the transaction. */ shippingDetails?: ShippingDetails | null | undefined; /** * The identifier for the checkout session this transaction is associated with. */ checkoutSessionId?: string | null | undefined; /** * The gift cards redeemed for this transaction. */ giftCardRedemptions: Array; /** * The gift card service used for this transaction. */ giftCardService?: GiftCardService | null | undefined; /** * The date and time when the transaction was created, in ISO 8601 format. */ createdAt: Date; /** * The date and time when the transaction was last updated, in ISO 8601 format. */ updatedAt: Date; /** * Indicates whether this transaction has been disputed. */ disputed: boolean; /** * The identifier of the transaction from which this transaction was reauthorized. */ reauthorizedFromTransactionId?: string | null | undefined; }; /** @internal */ export declare const TransactionSummary$inboundSchema: z.ZodType; export declare function transactionSummaryFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=transactionsummary.d.ts.map