Search...
bulkUpdatePaymentStatuses( )
Developer Preview
Updates multiple order payments with a specified status.
Description
The bulkUpdatePaymentStatus()
function returns a Promise that resolves when the payment statuses are updated.
Admin Method
This function requires elevated permissions to run. This function is not universal and runs only on the backend.
Syntax
function bulkUpdatePaymentStatuses(paymentAndOrderIds: Array<PaymentAndOrderId>, options: BulkUpdatePaymentStatusesOptions): Promise<BulkUpdatePaymentStatusesResponse>
bulkUpdatePaymentStatuses Parameters
NAME
TYPE
DESCRIPTION
paymentAndOrderIds
Array<
PaymentAndOrderId
>Order and payment IDs for which to update payment status.
options
Optional
BulkUpdatePaymentStatusesOptions
Returns
Return Type:
Promise<
BulkUpdatePaymentStatusesResponse
>NAME
TYPE
DESCRIPTION
bulkActionMetadata
BulkActionMetadata
Bulk operation metadata.
results
Array<
BulkPaymentResult
>Bulk operation results.
Was this helpful?
bulkUpdatePaymentStatuses example
Copy Code
1import { orderTransactions } from 'wix-ecom-backend';23 async function bulkUpdatePaymentStatuses(paymentAndOrderIds, options) {4 try {5 const result = await orderTransactions.bulkUpdatePaymentStatuses(paymentAndOrderIds, options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13