Skip to main content

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 implements HasCustomFields {    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[];    @Column(type => CustomPaymentFields)    customFields: CustomPaymentFields;}

constructor

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

method

propertystring

amount

propertynumber

state

propertyPaymentState

errorMessage

propertystring | undefined

transactionId

propertystring

metadata

propertyPaymentMetadata

order

propertyOrder

refunds

propertyRefund[]

customFields

propertyCustomPaymentFields
Was this chapter helpful?
Report Issue
Edited Feb 4, 2026·Edit this page