Payment Method

Payment method with card details, type, and billing address.

Report an issue
ecommerce

Install

$ npx shadcn@latest add @open-types/payment-method

Dependencies

Source

import type { Address } from "./address";

export interface PaymentCard {
  brand: string;
  last4: string;
  exp_month: number;
  exp_year: number;
}

export type PaymentMethodType = "card" | "bank_account" | "paypal";

export interface PaymentMethodBillingDetails {
  name?: string;
  email?: string;
  phone?: string;
  address?: Address;
}

export interface PaymentMethod {
  id: string;
  type: PaymentMethodType;
  card?: PaymentCard;
  billing_details?: PaymentMethodBillingDetails;
}
import type { Address } from "./address";

export interface PaymentCard {
  brand: string;
  last4: string;
  exp_month: number;
  exp_year: number;
}

export type PaymentMethodType = "card" | "bank_account" | "paypal";

export interface PaymentMethodBillingDetails {
  name?: string;
  email?: string;
  phone?: string;
  address?: Address;
}

export interface PaymentMethod {
  id: string;
  type: PaymentMethodType;
  card?: PaymentCard;
  billing_details?: PaymentMethodBillingDetails;
}