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 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;
}
-
Extends:
VendureEntity
-
Implements:
HasCustomFields