Setup

To use the OrderTransactions API, install the @wix/ecom package using npm or Yarn:

Copy
1
npm install @wix/ecom

or

Copy
1
yarn add @wix/ecom

Then import { orderTransactions } from @wix/ecom:

Copy
1
import { orderTransactions } from '@wix/ecom'
Was this helpful?
Yes
No

addPayments( )

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Adds up to 50 payment records to an order.

The addPayments() function returns a Promise that resolves when the payment records are added to an order.

Note: This does NOT perform the actual charging - the order is only updated with records of the payments.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Stores - all permissions
Manage eCommerce - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function addPayments(orderId: string, payments: Array<Payment>): Promise<AddPaymentsResponse>
Method Parameters
orderIdstringRequired

Order ID.


paymentsArray<Payment>Required

Payments to be added to order.

Returns
Return Type:Promise<AddPaymentsResponse>
Was this helpful?
Yes
No

bulkUpdatePaymentStatuses( )

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Updates multiple order payments with a specified status.

The bulkUpdatePaymentStatus() function returns a Promise that resolves when the payment statuses are updated.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Stores - all permissions
Manage eCommerce - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function bulkUpdatePaymentStatuses(paymentAndOrderIds: Array<PaymentAndOrderId>, options: BulkUpdatePaymentStatusesOptions): Promise<BulkUpdatePaymentStatusesResponse>
Method Parameters
paymentAndOrderIdsArray<PaymentAndOrderId>Required

Order and payment IDs for which to update payment status.


optionsBulkUpdatePaymentStatusesOptions
Returns
Return Type:Promise<BulkUpdatePaymentStatusesResponse>
Was this helpful?
Yes
No

listTransactionsForMultipleOrders( )

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves information about payments and refunds associated with all specified orders.

The listTransactionsForMultipleOrders() function returns a Promise that resolves when the specified orders' transaction records are retrieved.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Stores - all permissions
Read eCommerce - all read permissions
Read Orders
Read Stores - all read permissions
Manage eCommerce - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function listTransactionsForMultipleOrders(orderIds: Array<string>): Promise<ListTransactionsForMultipleOrdersResponse>
Method Parameters
orderIdsArray<string>Required

Order IDs for which to retrieve transactions.

Returns
Return Type:Promise<ListTransactionsForMultipleOrdersResponse>
Was this helpful?
Yes
No

listTransactionsForSingleOrder( )

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves information about payments and refunds associated with a specified order.

The listTransactionsForSingleOrder() function returns a Promise that resolves when the specified order's transaction records are retrieved.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Stores - all permissions
Read eCommerce - all read permissions
Read Orders
Read Stores - all read permissions
Manage eCommerce - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function listTransactionsForSingleOrder(orderId: string): Promise<ListTransactionsForSingleOrderResponse>
Method Parameters
orderIdstringRequired

Order ID.

Returns
Return Type:Promise<ListTransactionsForSingleOrderResponse>
Was this helpful?
Yes
No

updatePaymentStatus( )

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Updates the status of an order's payment.

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

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Stores - all permissions
Manage eCommerce - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function updatePaymentStatus(identifiers: UpdatePaymentStatusIdentifiers, options: UpdatePaymentStatusOptions): Promise<UpdatePaymentStatusResponse>
Method Parameters
identifiersUpdatePaymentStatusIdentifiersRequired

optionsUpdatePaymentStatusOptions
Returns
Return Type:Promise<UpdatePaymentStatusResponse>
Was this helpful?
Yes
No