Setup
To use the OrderTransactions API, install the @wix/ecom
package using npm or Yarn:
1npm install @wix/ecom
or
1yarn add @wix/ecom
Then import { orderTransactions }
from @wix/ecom
:
1import { orderTransactions } from '@wix/ecom'
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:function addPayments(orderId: string, payments: Array<Payment>): Promise<AddPaymentsResponse>
Order ID.
Payments to be added to order.
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:function bulkUpdatePaymentStatuses(paymentAndOrderIds: Array<PaymentAndOrderId>, options: BulkUpdatePaymentStatusesOptions): Promise<BulkUpdatePaymentStatusesResponse>
Order and payment IDs for which to update payment status.
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:function listTransactionsForMultipleOrders(orderIds: Array<string>): Promise<ListTransactionsForMultipleOrdersResponse>
Order IDs for which to retrieve transactions.
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:function listTransactionsForSingleOrder(orderId: string): Promise<ListTransactionsForSingleOrderResponse>
Order ID.
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:function updatePaymentStatus(identifiers: UpdatePaymentStatusIdentifiers, options: UpdatePaymentStatusOptions): Promise<UpdatePaymentStatusResponse>