Skip to main content

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;
@Money() amount: number;
@Column('varchar') state: PaymentState;
@Column({ type: 'varchar', nullable: true })
errorMessage: string | undefined;
@Column({ nullable: true })
transactionId: string;
@Column('simple-json') metadata: PaymentMetadata;
@Index()
@ManyToOne(type => Order, order => order.payments)
order: Order;
@OneToMany(type => Refund, refund => refund.payment)
refunds: Refund[];
}

constructor

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

method

property
string

amount

property
number

state

property

errorMessage

property
string | undefined

transactionId

property
string

metadata

property
PaymentMetadata

order

property

refunds

property