> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # BulkUpdatePaymentStatuses # Package: orders # Namespace: Payments # Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-transactions/bulk-update-payment-statuses.md ## Permission Scopes: Manage Orders: SCOPE.DC-STORES.MANAGE-ORDERS ## Introduction Updates multiple order payments with a specified status. --- ## REST API ### Schema ``` Method: bulkUpdatePaymentStatuses Description: Updates multiple order payments with a specified status. URL: https://www.wixapis.com/ecom/v1/bulk/payments/update-payment-transaction-status Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: paymentAndOrderIds Method parameters: param name: paymentAndOrderIds | type: array | description: Order and payment GUIDs for which to update payment status. | required: true - name: orderId | type: string | description: Order GUID. - name: paymentId | type: string | description: Payment GUID. todo: remove comment once UI will use BulkMarkOrderAsPaid param name: returnFullEntity | type: returnFullEntity | description: Whether to return the full payment entity (`results.item`) in the response. param name: status | type: TransactionStatus - enum: UNDEFINED - APPROVED - PENDING - PENDING_MERCHANT - CANCELED - DECLINED - REFUNDED - PARTIALLY_REFUNDED - AUTHORIZED - VOIDED - Return type: BulkUpdatePaymentStatusesResponse - name: results | type: array | description: Bulk operation results. - name: itemMetadata | type: ItemMetadata | description: Item metadata. - name: id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item). - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: item | type: Payment | description: Updated payment. Returned if `return_full_entity` set to `true`. - ONE-OF: - name: regularPaymentDetails | type: RegularPaymentDetails | description: Regular payment details. - ONE-OF: - name: creditCardDetails | type: CreditCardPaymentMethodDetails | description: Credit card details. - name: lastFourDigits | type: string | description: The last 4 digits of the card number. - name: brand | type: string | description: Card issuer's brand. - name: paymentOrderId | type: string | description: Wix Payments order GUID. - name: gatewayTransactionId | type: string | description: Payment gateway's transaction GUID. This field is only returned when the value of `offline_payment` is `false`. - name: providerTransactionId | type: string | description: Transaction GUID in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for offline payments. - name: offlinePayment | type: boolean | description: Whether the payment was made offline. For example, when using cash or when marked as paid in the Business Manager. - name: status | type: TransactionStatus | description: Payment status. - enum: UNDEFINED, APPROVED, PENDING, PENDING_MERCHANT, CANCELED, DECLINED, REFUNDED, PARTIALLY_REFUNDED, AUTHORIZED, VOIDED - name: savedPaymentMethod | type: boolean | description: Whether there is a payment agreement that allows for future charges. - name: authorizationDetails | type: AuthorizationDetails | description: Authorization details. - name: delayedCapture | type: boolean | description: Whether the authorized payment is of a delayed capture. - name: authorizedDate | type: string | description: Date and time the payment was authorized in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. - name: captures | type: array | description: List of captures associated with payment In case of failed it can be replaced with new one with PENDING or SUCCESS statuses - name: id | type: string | description: Capture GUID. - name: status | type: AuthorizationCaptureStatus | description: Status of this capture action - enum: - PENDING: Capture operation still in progress. - SUCCEEDED: Capture operation succeeded. - FAILED: Capture operation failed. - name: amount | type: Price | description: Amount of this capture - name: amount | type: string | description: Amount. - name: formattedAmount | type: string | description: Amount formatted with currency symbol. - name: createdDate | type: string | description: Date and time the capture was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. - name: failureDetails | type: AuthorizationActionFailureDetails | description: In case of status is FAILED may contain failure details - name: failureCode | type: string | description: - name: void | type: AuthorizationVoid | description: Void associated with payment - name: status | type: AuthorizationVoidStatus | description: Status of this void action - enum: - PENDING: Void operation still in progress. - SUCCEEDED: Void operation succeeded. - FAILED: Void operation failed. - name: voidedDate | type: string | description: Date and time the void was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. - name: failureDetails | type: AuthorizationActionFailureDetails | description: In case of status is FAILED may contain failure details - name: reason | type: Reason | description: Reason of void action - enum: - MANUAL: Authorization was voided by user. - SCHEDULED: Authorization passed execution date. - name: scheduledAction | type: ScheduledAction | description: Scheduled action for this transaction - name: actionType | type: ActionType | description: Type of the action. - enum: VOID, CAPTURE - name: executionDate | type: string | description: The date and time of the action. - name: chargebacks | type: array | description: Record of chargebacks made by the buyer. - name: id | type: string | description: Chargeback GUID. - name: createdDate | type: string | description: Date and time the chargeback was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. - name: updatedDate | type: string | description: Date and time the chargeback was updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. - name: amount | type: Price | description: Amount. - name: reversalAmount | type: Price | description: Reversal amount. Present only when status is REVERSED. - name: status | type: ChargebackStatus | description: Status. Default: `"APPROVED"`. - enum: - APPROVED: Chargeback was approved. - REVERSED: Chargeback was reversed. - name: externalId | type: string | description: External chargeback GUID. - name: platformFee | type: Price | description: Platform fee amount associated with this payment. - name: paymentMethodName | type: PaymentMethodName | description: Payment method with buyer and optional owner translations. Non-exhaustive list of supported values: + `CreditCard`, `Alipay`, `AstropayCash`, `AstropayDBT`, `AstropayMBT`, `Bitcoin`, `BitPay`, `Cash`, `ConvenienceStore`, `EPay`, `Fake`, `Giropay`, `IDeal`, `InPerson`, `Klarna`, `MercadoPago`, `Netpay`, `NordeaSolo`, `Offline`, `PagSeguro`, `PayEasy`, `PayPal`, `Paysafecard`, `Paysafecash`, `PointOfSale`, `Poli`, `Privat24`, `Przelewy24`, `RapidTransfer`, `Sepa`, `Skrill`, `Sofort`, `Trustly`, `Neteller`, `Unionpay`, `UniPay`, `Yandex` - name: buyerLanguageName | type: string | description: Translated payment method name in buyer language. - name: siteLanguageName | type: string | description: Translated payment method name in site owner language. - name: userDefinedName | type: UserDefinedPaymentMethodName | description: User-provided payment method name. When set, takes precedence over `buyerLanguageName` and `siteLanguageName`. - ONE-OF: - name: predefined | type: PredefinedPaymentMethod | description: Predefined payment method. - enum: - CASH: Cash payment. - BANK_TRANSFER: Bank transfer. - CHECK: Payment by check. - name: custom | type: string | description: Custom payment method name provided by user. For example, `"Wire transfer"`, `"Money order"`, `"Venmo"` or any other custom name. - name: giftcardPaymentDetails | type: GiftCardPaymentDetails | description: Gift card payment details. - name: giftCardPaymentId | type: string | description: Gift card payment GUID. - name: appId | type: string | description: GUID of the app that created the gift card. - name: voided | type: boolean | description: Whether the gift card is voided. - name: id | type: string | description: Payment GUID. - name: createdDate | type: string | description: Date and time the payment was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. - name: updatedDate | type: string | description: Date and time the payment was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. - name: amount | type: Price | description: Payment amount. - name: refundDisabled | type: boolean | description: Whether refunds for this payment are disabled. + `true`: This payment is not refundable. + `false`: This payment may be refunded. However, this ultimately depends on the payment provider. - name: bulkActionMetadata | type: BulkActionMetadata | description: Bulk operation metadata. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. ``` ### Examples ### Bulk Update Payment Statuses Update the statuses of multiple orders to APPROVED. Request full entity in response. ```curl curl -X POST \ 'https://www.wixapis.com/ecom/v1/bulk/payments/update-payment-transaction-status' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "paymentAndOrderIds": [ { "orderId": "69c598e5-987f-4429-9b61-76aaf47efedc", "paymentId": "770f8669-6ae7-47ed-a3fc-815ada5d86f9" }, { "orderId": "4f0cc39e-bb17-44be-bdbd-8331a5138987", "paymentId": "00000000-0000-0000-0000-000000000000" } ], "status": "APPROVED", "returnFullEntity": true }' ``` ### Bulk Update Payment Statuses from multiple orders to CANCELED ```curl curl -X POST \ 'https://www.wixapis.com/ecom/v1/bulk/payments/update-payment-transaction-status' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "paymentAndOrderIds": [ { "orderId": "69c598e5-987f-4429-9b61-76aaf47efedc", "paymentId": "770f8669-6ae7-47ed-a3fc-815ada5d86f9" }, { "orderId": "4f0cc39e-bb17-44be-bdbd-8331a5138987", "paymentId": "21cc0ff7-7ff5-4931-9ef8-1ee3d84a2215" } ], "status": "CANCELED", "returnFullEntity": false }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.orders.Payments.bulkUpdatePaymentStatuses(paymentAndOrderIds, options) Description: Updates multiple order payments with a specified status. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: paymentAndOrderIds Method parameters: param name: options | type: BulkUpdatePaymentStatusesOptions none - name: returnFullEntity | type: boolean | description: Whether to return the full payment entity (`results.item`) in the response. - name: status | type: TransactionStatus | description: Payment status. - enum: UNDEFINED, APPROVED, PENDING, PENDING_MERCHANT, CANCELED, DECLINED, REFUNDED, PARTIALLY_REFUNDED, AUTHORIZED, VOIDED param name: paymentAndOrderIds | type: array | description: Order and payment GUIDs for which to update payment status. | required: true - name: orderId | type: string | description: Order GUID. - name: paymentId | type: string | description: Payment GUID. todo: remove comment once UI will use BulkMarkOrderAsPaid Return type: PROMISE - name: results | type: array | description: Bulk operation results. - name: itemMetadata | type: ItemMetadata | description: Item metadata. - name: _id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item). - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: item | type: Payment | description: Updated payment. Returned if `return_full_entity` set to `true`. - ONE-OF: - name: regularPaymentDetails | type: RegularPaymentDetails | description: Regular payment details. - ONE-OF: - name: creditCardDetails | type: CreditCardPaymentMethodDetails | description: Credit card details. - name: lastFourDigits | type: string | description: The last 4 digits of the card number. - name: brand | type: string | description: Card issuer's brand. - name: paymentOrderId | type: string | description: Wix Payments order GUID. - name: gatewayTransactionId | type: string | description: Payment gateway's transaction GUID. This field is only returned when the value of `offline_payment` is `false`. - name: providerTransactionId | type: string | description: Transaction GUID in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for offline payments. - name: offlinePayment | type: boolean | description: Whether the payment was made offline. For example, when using cash or when marked as paid in the Business Manager. - name: status | type: TransactionStatus | description: Payment status. - enum: UNDEFINED, APPROVED, PENDING, PENDING_MERCHANT, CANCELED, DECLINED, REFUNDED, PARTIALLY_REFUNDED, AUTHORIZED, VOIDED - name: savedPaymentMethod | type: boolean | description: Whether there is a payment agreement that allows for future charges. - name: authorizationDetails | type: AuthorizationDetails | description: Authorization details. - name: delayedCapture | type: boolean | description: Whether the authorized payment is of a delayed capture. - name: authorizedDate | type: Date | description: Date and time the payment was authorized in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. - name: captures | type: array | description: List of captures associated with payment In case of failed it can be replaced with new one with PENDING or SUCCESS statuses - name: _id | type: string | description: Capture GUID. - name: status | type: AuthorizationCaptureStatus | description: Status of this capture action - enum: - PENDING: Capture operation still in progress. - SUCCEEDED: Capture operation succeeded. - FAILED: Capture operation failed. - name: amount | type: Price | description: Amount of this capture - name: amount | type: string | description: Amount. - name: formattedAmount | type: string | description: Amount formatted with currency symbol. - name: _createdDate | type: Date | description: Date and time the capture was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. - name: failureDetails | type: AuthorizationActionFailureDetails | description: In case of status is FAILED may contain failure details - name: failureCode | type: string | description: - name: void | type: AuthorizationVoid | description: Void associated with payment - name: status | type: AuthorizationVoidStatus | description: Status of this void action - enum: - PENDING: Void operation still in progress. - SUCCEEDED: Void operation succeeded. - FAILED: Void operation failed. - name: voidedDate | type: Date | description: Date and time the void was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. - name: failureDetails | type: AuthorizationActionFailureDetails | description: In case of status is FAILED may contain failure details - name: reason | type: Reason | description: Reason of void action - enum: - MANUAL: Authorization was voided by user. - SCHEDULED: Authorization passed execution date. - name: scheduledAction | type: ScheduledAction | description: Scheduled action for this transaction - name: actionType | type: ActionType | description: Type of the action. - enum: VOID, CAPTURE - name: executionDate | type: Date | description: The date and time of the action. - name: chargebacks | type: array | description: Record of chargebacks made by the buyer. - name: _id | type: string | description: Chargeback GUID. - name: _createdDate | type: Date | description: Date and time the chargeback was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. - name: _updatedDate | type: Date | description: Date and time the chargeback was updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. - name: amount | type: Price | description: Amount. - name: reversalAmount | type: Price | description: Reversal amount. Present only when status is REVERSED. - name: status | type: ChargebackStatus | description: Status. Default: `"APPROVED"`. - enum: - APPROVED: Chargeback was approved. - REVERSED: Chargeback was reversed. - name: externalId | type: string | description: External chargeback GUID. - name: platformFee | type: Price | description: Platform fee amount associated with this payment. - name: paymentMethodName | type: PaymentMethodName | description: Payment method with buyer and optional owner translations. Non-exhaustive list of supported values: + `CreditCard`, `Alipay`, `AstropayCash`, `AstropayDBT`, `AstropayMBT`, `Bitcoin`, `BitPay`, `Cash`, `ConvenienceStore`, `EPay`, `Fake`, `Giropay`, `IDeal`, `InPerson`, `Klarna`, `MercadoPago`, `Netpay`, `NordeaSolo`, `Offline`, `PagSeguro`, `PayEasy`, `PayPal`, `Paysafecard`, `Paysafecash`, `PointOfSale`, `Poli`, `Privat24`, `Przelewy24`, `RapidTransfer`, `Sepa`, `Skrill`, `Sofort`, `Trustly`, `Neteller`, `Unionpay`, `UniPay`, `Yandex` - name: buyerLanguageName | type: string | description: Translated payment method name in buyer language. - name: siteLanguageName | type: string | description: Translated payment method name in site owner language. - name: userDefinedName | type: UserDefinedPaymentMethodName | description: User-provided payment method name. When set, takes precedence over `buyerLanguageName` and `siteLanguageName`. - ONE-OF: - name: predefined | type: PredefinedPaymentMethod | description: Predefined payment method. - enum: - CASH: Cash payment. - BANK_TRANSFER: Bank transfer. - CHECK: Payment by check. - name: custom | type: string | description: Custom payment method name provided by user. For example, `"Wire transfer"`, `"Money order"`, `"Venmo"` or any other custom name. - name: giftcardPaymentDetails | type: GiftCardPaymentDetails | description: Gift card payment details. - name: giftCardPaymentId | type: string | description: Gift card payment GUID. - name: appId | type: string | description: GUID of the app that created the gift card. - name: voided | type: boolean | description: Whether the gift card is voided. - name: _id | type: string | description: Payment GUID. - name: _createdDate | type: Date | description: Date and time the payment was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. - name: _updatedDate | type: Date | description: Date and time the payment was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. - name: amount | type: Price | description: Payment amount. - name: refundDisabled | type: boolean | description: Whether refunds for this payment are disabled. + `true`: This payment is not refundable. + `false`: This payment may be refunded. However, this ultimately depends on the payment provider. - name: bulkActionMetadata | type: BulkActionMetadata | description: Bulk operation metadata. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. ``` ### Examples ### bulkUpdatePaymentStatuses ```javascript import { orderTransactions } from '@wix/ecom'; async function bulkUpdatePaymentStatuses(paymentAndOrderIds,options) { const response = await orderTransactions.bulkUpdatePaymentStatuses(paymentAndOrderIds,options); }; ``` ### bulkUpdatePaymentStatuses (with elevated permissions) ```javascript import { orderTransactions } from '@wix/ecom'; import { auth } from '@wix/essentials'; async function myBulkUpdatePaymentStatusesMethod(paymentAndOrderIds,options) { const elevatedBulkUpdatePaymentStatuses = auth.elevate(orderTransactions.bulkUpdatePaymentStatuses); const response = await elevatedBulkUpdatePaymentStatuses(paymentAndOrderIds,options); } ``` ### bulkUpdatePaymentStatuses (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { orderTransactions } from '@wix/ecom'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { orderTransactions }, // Include the auth strategy and host as relevant }); async function bulkUpdatePaymentStatuses(paymentAndOrderIds,options) { const response = await myWixClient.orderTransactions.bulkUpdatePaymentStatuses(paymentAndOrderIds,options); }; ``` ---