Skip to main content

updatePaymentStatus

Update the payment status of an order.

Import​

import { updatePaymentStatus } from "@evershop/evershop/oms/services";

Syntax​

updatePaymentStatus(orderId: number, status: string, conn?: PoolClient): Promise<void>

Parameters​

orderId

Type: number

Order ID (not UUID).

status

Type: string

New payment status.

conn (optional)

Type: PoolClient

Database connection. If not provided, creates new connection.

Return Value​

Returns Promise<void>.

Examples​

Basic Update​

import { updatePaymentStatus } from "@evershop/evershop/oms/services";

await updatePaymentStatus(123, 'paid');

See Also​