import * as z from "zod/v3"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Buyer } from "./buyer.js"; import { CardScheme } from "./cardscheme.js"; import { Method } from "./method.js"; import { Mode } from "./mode.js"; import { PaymentMethodDetailsCard } from "./paymentmethoddetailscard.js"; import { PaymentMethodStatus } from "./paymentmethodstatus.js"; /** * Payment Method * * @remarks * * A stored payment method. */ export type PaymentMethod = { /** * Always `payment-method`. */ type: "payment-method"; /** * The optional URL that the buyer needs to be redirected to to further authorize their payment. */ approvalUrl?: string | null | undefined; /** * The 2-letter ISO code of the country this payment method can be used for. If this value is null the payment method may be used in multiple countries. */ country?: string | null | undefined; /** * The ISO-4217 currency code that this payment method can be used for. If this value is null the payment method may be used for multiple currencies. */ currency?: string | null | undefined; /** * Details for credit or debit card payment method. */ details?: PaymentMethodDetailsCard | null | undefined; /** * The expiration date for the payment method. */ expirationDate?: string | null | undefined; /** * The unique hash derived from the payment method identifier (e.g. card number). */ fingerprint?: string | null | undefined; /** * A label for the card or the account. For a paypal payment method this is the user's email address. For a card it is the last 4 digits of the card. */ label?: string | null | undefined; /** * The date and time when this card was last replaced by the account updater. */ lastReplacedAt?: Date | null | undefined; method: Method; /** * The mode to use with this payment method. */ mode?: Mode | null | undefined; /** * The scheme of the card. Only applies to card payments. */ scheme?: CardScheme | null | undefined; /** * The ID for the payment method. */ id: string; /** * The ID of the merchant account this buyer belongs to. */ merchantAccountId: string; /** * Additional schemes of the card besides the primary scheme. Only applies to card payment methods. */ additionalSchemes?: Array | null | undefined; /** * The timestamp when this payment method was last used in a transaction for client initiated transactions. */ citLastUsedAt?: Date | null | undefined; /** * The number of times this payment method has been used in transactions for client initiated transactions. */ citUsageCount: number; /** * Whether this card has a pending replacement that hasn't been applied yet. */ hasReplacement: boolean; /** * The timestamp when this payment method was last used in a transaction. */ lastUsedAt?: Date | null | undefined; /** * The number of times this payment method has been used in transactions. */ usageCount: number; /** * The scheme transaction identifier stored against this payment method. */ schemeTransactionId: string | null; /** * The scheme associated with scheme_transaction_id. Only applies to card payments. */ schemeTransactionIdScheme: CardScheme | null; /** * The transaction link identifier stored against this payment method. */ transactionLinkId?: string | null | undefined; /** * The optional buyer for which this payment method has been stored. */ buyer?: Buyer | null | undefined; /** * The merchant reference that can be used to match the payment method against your own records. */ externalIdentifier?: string | null | undefined; status: PaymentMethodStatus; /** * The date and time when this payment method was first created in our system. */ createdAt: Date; /** * The date and time when this payment method was last updated in our system. */ updatedAt: Date; }; /** @internal */ export declare const PaymentMethod$inboundSchema: z.ZodType; export declare function paymentMethodFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=paymentmethod.d.ts.map