Search.../

updatePaymentStatus( )

Developer Preview

Updates the status of an order's payment.

Description

The updatePaymentStatus() function returns a Promise that resolves when the payment status is updated.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function updatePaymentStatus(identifiers: UpdatePaymentStatusIdentifiers, options: UpdatePaymentStatusOptions): Promise<UpdatePaymentStatusResponse>

updatePaymentStatus Parameters

NAME
TYPE
DESCRIPTION
identifiers
UpdatePaymentStatusIdentifiers
options
Optional
UpdatePaymentStatusOptions

Returns

Return Type:

Promise<
UpdatePaymentStatusResponse
>
NAME
TYPE
DESCRIPTION
orderTransactions
OrderTransactions

Order ID and its associated transactions after update.

Was this helpful?

updatePaymentStatus example

Copy Code
1import { orderTransactions } from 'wix-ecom-backend';
2
3 async function updatePaymentStatus(identifiers, options) {
4 try {
5 const result = await orderTransactions.updatePaymentStatus(identifiers, options);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13