Payment

Payment

Payment

A Payment represents a single payment transaction and exists in a well-defined state defined by the PaymentState type.

Signature

class Payment extends VendureEntity {
  constructor(input?: DeepPartial<Payment>)
  @Column() method: string;
  @Column() amount: number;
  @Column('varchar') state: PaymentState;
  @Column({ nullable: true })
    errorMessage: string;
  @Column({ nullable: true })
    transactionId: string;
  @Column('simple-json') metadata: PaymentMetadata;
  @ManyToOne(type => Order, order => order.payments)
    order: Order;
  @OneToMany(type => Refund, refund => refund.payment)
    refunds: Refund[];
}

Members

constructor

method
type:
(input?: DeepPartial<Payment>) => Payment

method

property
type:
string

amount

property
type:
number

state

property
type:
PaymentState

errorMessage

property
type:
string

transactionId

property
type:
string

metadata

property
type:
PaymentMetadata

order

property
type:
Order

refunds

property
type:
Refund[]