> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# UpdatePaymentStatus

# Package: orders

# Namespace: Payments

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-transactions/update-payment-status?apiView=SDK.md

## Permission Scopes:
Manage Orders: SCOPE.DC-STORES.MANAGE-ORDERS

## Introduction

Updates the status of an order's payment.

This method only updates the payment record. It doesn't interact with the payment provider or move any funds.

> **Notes:**
> + To issue a refund and update the payment status to refunded, use [Refund Payments](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-billing/refund-payments.md) in the Order Billing API instead.
> + Gift card and membership payments only support the `APPROVED` and `VOIDED` statuses.
> + The order's `paymentStatus` is recalculated asynchronously after the call.

---

## REST API

### Schema

```
 Method: updatePaymentStatus
 Description: Updates the status of an order's payment.  This method only updates the payment record. It doesn't interact with the payment provider or move any funds.  > **Notes:** > + To issue a refund and update the payment status to refunded, use [Refund Payments](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-billing/refund-payments.md) in the Order Billing API instead. > + Gift card and membership payments only support the `APPROVED` and `VOIDED` statuses. > + The order's `paymentStatus` is recalculated asynchronously after the call.
 URL: https://www.wixapis.com/ecom/v1/payments/{paymentId}/orders/{orderId}/update-payment-transaction-status
 Method: POST
 Method parameters:
   param name: status | type: TransactionStatus    
      - enum:
           UNDEFINED - 
           APPROVED - 
           PENDING - 
           PENDING_MERCHANT - 
           CANCELED - 
           DECLINED - 
           REFUNDED - 
           PARTIALLY_REFUNDED - 
           AUTHORIZED - 
           VOIDED - 
 Return type: UpdatePaymentStatusResponse
  - name: orderTransactions | type: OrderTransactions | description: Order GUID and its associated transactions after update.  
     - name: orderId | type: string | description: Order GUID.  | validation: format GUID
     - name: payments | type: array<Payment> | description: Record of payments made to the merchant.  | validation: maxItems 100
        - 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.  | validation: maxLength 4
                    - name: brand | type: string | description: Card issuer's brand.  | validation: maxLength 100
              - name: paymentOrderId | type: string | description: Wix Payments order GUID.  | validation: maxLength 100
              - name: gatewayTransactionId | type: string | description: Payment gateway's transaction GUID. This field is only returned when the value of `offline_payment` is `false`.  | validation: maxLength 100
              - 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.  | validation: maxLength 100
              - 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: 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.  | read-only: true 
                 - 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.  | validation: format date-time
                 - name: captures | type: array<AuthorizationCapture> | description: List of captures associated with payment In case of failed it can be replaced with new one with PENDING or SUCCESS statuses  | validation: maxItems 1
                    - name: id | type: string | description: Capture GUID.  | read-only: true | validation: format 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  | validation: immutable
                       - name: amount | type: string | description: Amount.  | validation: decimalValue {"gte":"0","lte":"1000000000000000"}
                       - name: formattedAmount | type: string | description: Amount formatted with currency symbol.  | read-only: true 
                    - 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.  | validation: format date-time
                    - name: failureDetails | type: AuthorizationActionFailureDetails | description: In case of status is FAILED may contain failure details  
                       - name: failureCode | type: string | description:   | validation: maxLength 100
                 - 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.  | validation: format date-time
                    - 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.  | validation: format date-time
              - name: chargebacks | type: array<Chargeback> | description: Record of chargebacks made by the buyer.  | validation: maxItems 6
                 - name: id | type: string | description: Chargeback GUID.  | read-only: true | validation: format GUID, immutable
                 - 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.  | read-only: true | validation: format date-time, immutable
                 - 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.  | read-only: true | validation: format date-time
                 - name: amount | type: Price | description: Amount.  | read-only: true | validation: immutable
                 - name: reversalAmount | type: Price | description: Reversal amount. Present only when status is REVERSED.  | read-only: true 
                 - 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.  | read-only: true | validation: format GUID, immutable
              - 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: Payment method name in the buyer's language. For example, `"Credit/Debit Cards"`.  | validation: maxLength 150
                 - name: siteLanguageName | type: string | description: Payment method name in the site's language. For example, `"Credit/Debit Cards"`.  When no site-language name is stored, holds the same value as `buyerLanguageName`.  | validation: maxLength 150
                 - 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.  | validation: minLength 1, maxLength 150
           - name: giftcardPaymentDetails | type: GiftCardPaymentDetails | description: Gift card payment details.  
              - name: giftCardPaymentId | type: string | description: Gift card payment GUID.  | validation: maxLength 100
              - name: appId | type: string | description: GUID of the app that created the gift card.  | validation: format GUID
              - name: obfuscatedCode | type: string | description: Gift card code with all but the last four characters masked. For example, `************QXY1`.  | validation: maxLength 30, immutable
           - name: membershipPaymentDetails | type: MembershipPaymentDetails | description: Membership payment details.  
              - name: membershipId | type: string | description: Membership GUID.  | validation: maxLength 200
              - name: lineItemId | type: string | description: GUID of the line item this membership applies to.  | validation: minLength 1, maxLength 100
              - name: name | type: MembershipName | description: Membership name.  
                 - name: original | type: string | description: Membership name in the site's original language.  | validation: maxLength 100
                 - name: translated | type: string | description: Membership name translated into the buyer's language.  Default: The value of `original`  | validation: maxLength 100
              - name: externalTransactionId | type: string | description: The transaction GUID in the membership system. Can be used to void the transaction.  | validation: minLength 1, maxLength 100
              - name: providerAppId | type: string | description: GUID of the application providing this payment option.  | validation: format GUID
              - name: futureMembership | type: FutureMembershipDetails | description: Details of a membership that does not yet exist, allowing the payment to be held before the membership is created.  
                 - name: lineItemId | type: string | description: GUID of the plan line item in the order from which the membership will be created.  | validation: format GUID
                 - name: benefitId | type: string | description: GUID of the benefit the future membership will grant.  | validation: maxLength 200
        - name: id | type: string | description: Payment GUID.  | read-only: true | validation: format 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.  | validation: format date-time
        - 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.  | read-only: true | validation: format date-time
        - 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: supportReceiptGeneration | type: boolean | description: Whether receipt generation is allowed for this payment. + `true`: This payment supports receipt generation. + `false`: This payment doesn't support receipt generation, or a receipt was already generated.  | read-only: true 
        - name: cashRounding | type: CashRoundingDetails | description: Details about cash rounding applied to this payment, when relevant.  
           - name: unroundedAmount | type: Price | description: Payment amount before cash rounding was applied. When provided, balance and status calculations use this value instead of `amount` to prevent false overpayment or underpayment due to rounding.  
           - name: roundingAdjustment | type: CashRounding | description: The difference between 'amount' and 'unroundedAmount' (amount minus unroundedAmount). A positive value indicates the price was rounded up; a negative value indicates a round-down.  | read-only: true 
              - name: amount | type: string | description: Amount, can be negative or positive.  | validation: decimalValue {"gte":"-1000000000000000","lte":"1000000000000000"}
              - name: formattedAmount | type: string | description: Amount formatted with currency symbol.  | read-only: true 
        - name: status | type: PaymentStatus | description: Overall payment status.  Gift card and membership payments support only `APPROVED`, `PENDING`, `CANCELED`, `DECLINED`, and `VOIDED`. The remaining values apply to regular payments.  
             - enum:
             -     APPROVED: Payment was charged successfully.
             -     PENDING: Payment is being processed and hasn't been confirmed yet.
             -     PENDING_MERCHANT: Payment is awaiting confirmation. For an offline payment, the merchant must confirm they received it. For an online payment, the payment provider hasn't confirmed it, which typically means the merchant's provider account setup isn't complete.
             -     CANCELED: Payment was canceled before it was charged.
             -     DECLINED: Payment was declined by the payment provider.
             -     REFUNDED: Payment was fully refunded.
             -     PARTIALLY_REFUNDED: Part of the payment amount was refunded.
             -     AUTHORIZED: Funds are held on the buyer's payment method but haven't been captured. Capture them with [Capture Authorized Payments](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-billing/capture-authorized-payments.md) or release them with [Void Authorized Payments](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-billing/void-authorized-payments.md). An authorized payment can't be refunded until it's captured.
             -     VOIDED: Payment was voided, releasing whatever it held or consumed: an authorization on the buyer's payment method, a gift card balance, or membership credits.  Gift card and membership payments don't support partial refunds, so a full refund of one is reported as `VOIDED` rather than `REFUNDED`.
        - name: chargeCorrelationId | type: string | description: GUID linking this payment to the charge request that created it. Matches the `idempotencyKey` sent in the Charge Order request.  | validation: format GUID
     - name: refunds | type: array<Refund> | description: Record of refunds made to the buyer.  | validation: maxItems 300
        - name: id | type: string | description: Refund GUID.  | read-only: true | validation: format GUID
        - name: transactions | type: array<RefundTransaction> | description: List of transactions.  | validation: minItems 0, maxItems 50
           - name: paymentId | type: string | description: GUID of the payment associated with this refund.  | validation: format GUID, immutable
           - name: amount | type: Price | description: Refund amount.  | validation: immutable
           - name: refundStatus | type: RefundStatus | description: Refund status.  
                 - enum:
                 -     PENDING: Refund was initiated on payment provider side. PENDING status was assigned by provider.
                 -     SUCCEEDED: Refund transaction succeeded.
                 -     FAILED: Refund transaction failed.
                 -     SCHEDULED: Refund request acknowledged, and will be executed soon.
                 -     STARTED: Refund was initiated on payment provider side.
           - name: refundStatusInfo | type: RefundStatusInfo | description: Optional details of current refund status.  
              - name: paymentGatewayReasonCode | type: string | description: Reason code for the refund's current status.  Learn more about [reason codes](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes.md).  | validation: minLength 1, maxLength 10
              - name: description | type: string | description: Free text explanation of current refund status.  | validation: minLength 1, maxLength 1000
           - name: gatewayRefundId | type: string | description: Payment gateway's refund GUID. This field is only returned when the value of `external_refund` is `false`.  | validation: format GUID
           - name: providerRefundId | type: string | description: GUID of the refund in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for external refunds.  
           - name: externalRefund | type: boolean | description: Whether refund was made externally and manually on the payment provider's side.  | validation: immutable
        - name: details | type: RefundDetails | description: Refund business details.  
           - name: items | type: array<RefundItem> | description: Order line item GUIDs and quantities that were refunded.  | validation: minItems 0, maxItems 300
              - name: lineItemId | type: string | description: Line item GUID the refunded line item.  | validation: format GUID
              - name: quantity | type: integer | description: Line item quantity refunded.  | validation: minimum 1, maximum 100000
           - name: shippingIncluded | type: boolean | description: Whether the shipping fee was also refunded.  
           - name: reason | type: string | description: Reason for the refund, provided by customer (optional).  | validation: maxLength 200
           - name: lineItems | type: array<LineItemRefund> | description: Line items that were refunded.  | validation: minItems 0, maxItems 300
              - name: lineItemId | type: string | description: Line item GUID.  | validation: format GUID, immutable
              - name: quantity | type: integer | description: Refund quantity.  | validation: minimum 1, maximum 100000, immutable
           - name: additionalFees | type: array<AdditionalFeeRefund> | description: Additional fees that were refunded.  | validation: minItems 0, maxItems 100
              - name: additionalFeeId | type: string | description: Additional fee GUID.  | validation: format GUID, immutable
              - name: amount | type: Price | description: Refund amount.  | validation: immutable
           - name: shipping | type: ShippingRefund | description: Shipping amount that was refunded.  
              - name: amount | type: Price | description: Refund amount.  | validation: immutable
        - name: createdDate | type: string | description: Date and time the refund 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.  | read-only: true | validation: format date-time, immutable
        - name: summary | type: AggregatedRefundSummary | description: Aggregated refund summary.  The refunded amount of this refund is in `summary.refunded`. To get the total refunded across the whole order, use `balanceSummary.refunded` on the order instead.  | read-only: true 
           - name: requestedRefund | type: Price | description: Total amount requested for refund.  
           - name: pendingRefund | type: Price | description: Pending refund amount - the portion of `requestedRefund` that is still pending.  
           - name: refunded | type: Price | description: Refunded amount - the portion of `requestedRefund` that refunded successfully.  
           - name: failedRefundAmount | type: Price | description: Failed refund amount - the portion of `requestedRefund` that failed.  
           - name: pending | type: boolean | description: Whether at least one refund transaction is still in `"PENDING"` status.  
           - name: breakdown | type: RefundItemsBreakdown | description: Breakdown of refunded items. Available only after refund is complete.  
              - name: lineItems | type: array<LineItemRefundSummary> | description: Refunded line items and the amount refunded for each.  | validation: minItems 0, maxItems 300
                 - name: lineItemId | type: string | description: GUID of the refunded line item.  | validation: format GUID
                 - name: totalRefundedAmount | type: Price | description: Total refunded amount for the line item.  
        - name: requestingServiceAppId | type: string | description: GUID of the app that initiated this refund.  | read-only: true | validation: format GUID, immutable

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: STATUS_NOT_ALLOWED | Description: Invalid status for update.


```

### Examples

### Update Payment Status to VOIDED
Updates a payment's status to `VOIDED`.

```curl
curl -X POST \
  'https://www.wixapis.com/ecom/v1/payments/da08a874-c8d8-4041-ad85-48fbd5284a7a/orders/b4247531-bb4e-44b2-b935-8e4dfabd91a0/update-payment-transaction-status' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: <AUTH>' \
  -d '{
  	"status": "VOIDED"
  }'
```

### Update Payment Status to APPROVED
Updates a payment's status to `APPROVED`.

```curl
curl -X POST \
  'https://www.wixapis.com/ecom/v1/payments/6ac204b6-d1df-44c7-ae84-aa08197380d8/orders/c7689f97-304f-425e-bbda-2451a32596c9/update-payment-transaction-status' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: <AUTH>' \
  -d '{
  	"status": "APPROVED"
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.ecom.orderTransactions.updatePaymentStatus(identifiers, options)
 Description: Updates the status of an order's payment.  This method only updates the payment record. It doesn't interact with the payment provider or move any funds.  > **Notes:** > + To issue a refund and update the payment status to refunded, use [Refund Payments](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-billing/refund-payments.md) in the Order Billing API instead. > + Gift card and membership payments only support the `APPROVED` and `VOIDED` statuses. > + The order's `paymentStatus` is recalculated asynchronously after the call.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  identifiers.orderId, identifiers.paymentId, identifiers
 Method parameters: 
   param name: identifiers | type: UpdatePaymentStatusIdentifiers  none | required: true 
        - name: paymentId | type: string | description: Payment GUID. | required: true | validation: format GUID
        - name: orderId | type: string | description: Order GUID. | required: true | validation: format GUID
   param name: options | type: UpdatePaymentStatusOptions  none  
        - name: status | type: TransactionStatus | description: Payment status.  
             - enum: UNDEFINED, APPROVED, PENDING, PENDING_MERCHANT, CANCELED, DECLINED, REFUNDED, PARTIALLY_REFUNDED, AUTHORIZED, VOIDED
 Return type: PROMISE<UpdatePaymentStatusResponse>
  - name: orderTransactions | type: OrderTransactions | description: Order GUID and its associated transactions after update.  
     - name: orderId | type: string | description: Order GUID.  | validation: format GUID
     - name: payments | type: array<Payment> | description: Record of payments made to the merchant.  | validation: maxItems 100
        - 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.  | validation: maxLength 4
                    - name: brand | type: string | description: Card issuer's brand.  | validation: maxLength 100
              - name: paymentOrderId | type: string | description: Wix Payments order GUID.  | validation: maxLength 100
              - name: gatewayTransactionId | type: string | description: Payment gateway's transaction GUID. This field is only returned when the value of `offline_payment` is `false`.  | validation: maxLength 100
              - 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.  | validation: maxLength 100
              - 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: 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.  | read-only: true 
                 - 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<AuthorizationCapture> | description: List of captures associated with payment In case of failed it can be replaced with new one with PENDING or SUCCESS statuses  | validation: maxItems 1
                    - name: _id | type: string | description: Capture GUID.  | read-only: true | validation: format 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  | validation: immutable
                       - name: amount | type: string | description: Amount.  | validation: decimalValue {"gte":"0","lte":"1000000000000000"}
                       - name: formattedAmount | type: string | description: Amount formatted with currency symbol.  | read-only: true 
                    - 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:   | validation: maxLength 100
                 - 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<Chargeback> | description: Record of chargebacks made by the buyer.  | validation: maxItems 6
                 - name: _id | type: string | description: Chargeback GUID.  | read-only: true | validation: format GUID, immutable
                 - 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.  | read-only: true | validation: immutable
                 - 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.  | read-only: true 
                 - name: amount | type: Price | description: Amount.  | read-only: true | validation: immutable
                 - name: reversalAmount | type: Price | description: Reversal amount. Present only when status is REVERSED.  | read-only: true 
                 - 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.  | read-only: true | validation: format GUID, immutable
              - 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: Payment method name in the buyer's language. For example, `"Credit/Debit Cards"`.  | validation: maxLength 150
                 - name: siteLanguageName | type: string | description: Payment method name in the site's language. For example, `"Credit/Debit Cards"`.  When no site-language name is stored, holds the same value as `buyerLanguageName`.  | validation: maxLength 150
                 - 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.  | validation: minLength 1, maxLength 150
           - name: giftcardPaymentDetails | type: GiftCardPaymentDetails | description: Gift card payment details.  
              - name: giftCardPaymentId | type: string | description: Gift card payment GUID.  | validation: maxLength 100
              - name: appId | type: string | description: GUID of the app that created the gift card.  | validation: format GUID
              - name: obfuscatedCode | type: string | description: Gift card code with all but the last four characters masked. For example, `************QXY1`.  | validation: maxLength 30, immutable
           - name: membershipPaymentDetails | type: MembershipPaymentDetails | description: Membership payment details.  
              - name: membershipId | type: string | description: Membership GUID.  | validation: maxLength 200
              - name: lineItemId | type: string | description: GUID of the line item this membership applies to.  | validation: minLength 1, maxLength 100
              - name: name | type: MembershipName | description: Membership name.  
                 - name: original | type: string | description: Membership name in the site's original language.  | validation: maxLength 100
                 - name: translated | type: string | description: Membership name translated into the buyer's language.  Default: The value of `original`  | validation: maxLength 100
              - name: externalTransactionId | type: string | description: The transaction GUID in the membership system. Can be used to void the transaction.  | validation: minLength 1, maxLength 100
              - name: providerAppId | type: string | description: GUID of the application providing this payment option.  | validation: format GUID
              - name: futureMembership | type: FutureMembershipDetails | description: Details of a membership that does not yet exist, allowing the payment to be held before the membership is created.  
                 - name: lineItemId | type: string | description: GUID of the plan line item in the order from which the membership will be created.  | validation: format GUID
                 - name: benefitId | type: string | description: GUID of the benefit the future membership will grant.  | validation: maxLength 200
        - name: _id | type: string | description: Payment GUID.  | read-only: true | validation: format 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.  | read-only: true 
        - 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: supportReceiptGeneration | type: boolean | description: Whether receipt generation is allowed for this payment. + `true`: This payment supports receipt generation. + `false`: This payment doesn't support receipt generation, or a receipt was already generated.  | read-only: true 
        - name: cashRounding | type: CashRoundingDetails | description: Details about cash rounding applied to this payment, when relevant.  
           - name: unroundedAmount | type: Price | description: Payment amount before cash rounding was applied. When provided, balance and status calculations use this value instead of `amount` to prevent false overpayment or underpayment due to rounding.  
           - name: roundingAdjustment | type: CashRounding | description: The difference between 'amount' and 'unroundedAmount' (amount minus unroundedAmount). A positive value indicates the price was rounded up; a negative value indicates a round-down.  | read-only: true 
              - name: amount | type: string | description: Amount, can be negative or positive.  | validation: decimalValue {"gte":"-1000000000000000","lte":"1000000000000000"}
              - name: formattedAmount | type: string | description: Amount formatted with currency symbol.  | read-only: true 
        - name: status | type: PaymentStatus | description: Overall payment status.  Gift card and membership payments support only `APPROVED`, `PENDING`, `CANCELED`, `DECLINED`, and `VOIDED`. The remaining values apply to regular payments.  
             - enum:
             -     APPROVED: Payment was charged successfully.
             -     PENDING: Payment is being processed and hasn't been confirmed yet.
             -     PENDING_MERCHANT: Payment is awaiting confirmation. For an offline payment, the merchant must confirm they received it. For an online payment, the payment provider hasn't confirmed it, which typically means the merchant's provider account setup isn't complete.
             -     CANCELED: Payment was canceled before it was charged.
             -     DECLINED: Payment was declined by the payment provider.
             -     REFUNDED: Payment was fully refunded.
             -     PARTIALLY_REFUNDED: Part of the payment amount was refunded.
             -     AUTHORIZED: Funds are held on the buyer's payment method but haven't been captured. Capture them with [Capture Authorized Payments](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-billing/capture-authorized-payments.md) or release them with [Void Authorized Payments](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-billing/void-authorized-payments.md). An authorized payment can't be refunded until it's captured.
             -     VOIDED: Payment was voided, releasing whatever it held or consumed: an authorization on the buyer's payment method, a gift card balance, or membership credits.  Gift card and membership payments don't support partial refunds, so a full refund of one is reported as `VOIDED` rather than `REFUNDED`.
        - name: chargeCorrelationId | type: string | description: GUID linking this payment to the charge request that created it. Matches the `idempotencyKey` sent in the Charge Order request.  | validation: format GUID
     - name: refunds | type: array<Refund> | description: Record of refunds made to the buyer.  | validation: maxItems 300
        - name: _id | type: string | description: Refund GUID.  | read-only: true | validation: format GUID
        - name: transactions | type: array<RefundTransaction> | description: List of transactions.  | validation: minItems 0, maxItems 50
           - name: paymentId | type: string | description: GUID of the payment associated with this refund.  | validation: format GUID, immutable
           - name: amount | type: Price | description: Refund amount.  | validation: immutable
           - name: refundStatus | type: RefundStatus | description: Refund status.  
                 - enum:
                 -     PENDING: Refund was initiated on payment provider side. PENDING status was assigned by provider.
                 -     SUCCEEDED: Refund transaction succeeded.
                 -     FAILED: Refund transaction failed.
                 -     SCHEDULED: Refund request acknowledged, and will be executed soon.
                 -     STARTED: Refund was initiated on payment provider side.
           - name: refundStatusInfo | type: RefundStatusInfo | description: Optional details of current refund status.  
              - name: paymentGatewayReasonCode | type: string | description: Reason code for the refund's current status.  Learn more about [reason codes](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/reason-codes.md).  | validation: minLength 1, maxLength 10
              - name: description | type: string | description: Free text explanation of current refund status.  | validation: minLength 1, maxLength 1000
           - name: gatewayRefundId | type: string | description: Payment gateway's refund GUID. This field is only returned when the value of `external_refund` is `false`.  | validation: format GUID
           - name: providerRefundId | type: string | description: GUID of the refund in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for external refunds.  
           - name: externalRefund | type: boolean | description: Whether refund was made externally and manually on the payment provider's side.  | validation: immutable
        - name: details | type: RefundDetails | description: Refund business details.  
           - name: items | type: array<RefundItem> | description: Order line item GUIDs and quantities that were refunded.  | validation: minItems 0, maxItems 300
              - name: lineItemId | type: string | description: Line item GUID the refunded line item.  | validation: format GUID
              - name: quantity | type: integer | description: Line item quantity refunded.  | validation: minimum 1, maximum 100000
           - name: shippingIncluded | type: boolean | description: Whether the shipping fee was also refunded.  
           - name: reason | type: string | description: Reason for the refund, provided by customer (optional).  | validation: maxLength 200
           - name: lineItems | type: array<LineItemRefund> | description: Line items that were refunded.  | validation: minItems 0, maxItems 300
              - name: lineItemId | type: string | description: Line item GUID.  | validation: format GUID, immutable
              - name: quantity | type: integer | description: Refund quantity.  | validation: minimum 1, maximum 100000, immutable
           - name: additionalFees | type: array<AdditionalFeeRefund> | description: Additional fees that were refunded.  | validation: minItems 0, maxItems 100
              - name: additionalFeeId | type: string | description: Additional fee GUID.  | validation: format GUID, immutable
              - name: amount | type: Price | description: Refund amount.  | validation: immutable
           - name: shipping | type: ShippingRefund | description: Shipping amount that was refunded.  
              - name: amount | type: Price | description: Refund amount.  | validation: immutable
        - name: _createdDate | type: Date | description: Date and time the refund 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.  | read-only: true | validation: immutable
        - name: summary | type: AggregatedRefundSummary | description: Aggregated refund summary.  The refunded amount of this refund is in `summary.refunded`. To get the total refunded across the whole order, use `balanceSummary.refunded` on the order instead.  | read-only: true 
           - name: requestedRefund | type: Price | description: Total amount requested for refund.  
           - name: pendingRefund | type: Price | description: Pending refund amount - the portion of `requestedRefund` that is still pending.  
           - name: refunded | type: Price | description: Refunded amount - the portion of `requestedRefund` that refunded successfully.  
           - name: failedRefundAmount | type: Price | description: Failed refund amount - the portion of `requestedRefund` that failed.  
           - name: pending | type: boolean | description: Whether at least one refund transaction is still in `"PENDING"` status.  
           - name: breakdown | type: RefundItemsBreakdown | description: Breakdown of refunded items. Available only after refund is complete.  
              - name: lineItems | type: array<LineItemRefundSummary> | description: Refunded line items and the amount refunded for each.  | validation: minItems 0, maxItems 300
                 - name: lineItemId | type: string | description: GUID of the refunded line item.  | validation: format GUID
                 - name: totalRefundedAmount | type: Price | description: Total refunded amount for the line item.  
        - name: requestingServiceAppId | type: string | description: GUID of the app that initiated this refund.  | read-only: true | validation: format GUID, immutable

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: STATUS_NOT_ALLOWED | Description: Invalid status for update.


```

### Examples

### Update payment status to voided
Void an offline payment for an order

```javascript
import { orderTransactions } from "@wix/ecom";

async function updatePaymentStatus() {
  const response = await orderTransactions.updatePaymentStatus(
    {
      paymentId: "a884cdb3-01a8-4c7e-8b58-aac5d6b7e8f2",
      orderId: "4451b4c6-42b3-4d8e-edad-10a7b8c9d5e3",
    },
    {
      status: "VOIDED",
    },
  );
  return response;
}

/* Promise resolves to:
 * {
 *   "orderTransactions": {
 *     "orderId": "4451b4c6-42b3-4d8e-edad-10a7b8c9d5e3",
 *     "payments": [
 *       {
 *         "_id": "a884cdb3-01a8-4c7e-8b58-aac5d6b7e8f2",
 *         "regularPaymentDetails": {
 *           "offlinePayment": true,
 *           "status": "VOIDED",
 *           "savedPaymentMethod": false,
 *           "paymentMethodName": {
 *             "buyerLanguageName": "Cash",
 *             "siteLanguageName": "Cash"
 *           }
 *         },
 *         "_createdDate": "2026-07-26T13:11:45.312Z",
 *         "_updatedDate": "2026-07-26T13:16:33.941Z",
 *         "amount": {
 *           "amount": "25.00",
 *           "formattedAmount": "$25.00"
 *         },
 *         "refundDisabled": false
 *       }
 *     ]
 *   }
 * }
 */

```

### Update payment status to approved
Approve a pending payment for an order

```javascript
import { orderTransactions } from "@wix/ecom";

async function updatePaymentStatus() {
  const response = await orderTransactions.updatePaymentStatus(
    {
      paymentId: "a246dd7c-47a8-4b3e-a893-08c5d4a3b2e1",
      orderId: "78f734b5-2ebd-4c6a-4135-69c8d7a6b5e4",
    },
    {
      status: "APPROVED",
    },
  );
  return response;
}

/* Promise resolves to:
 * {
 *   "orderTransactions": {
 *     "orderId": "78f734b5-2ebd-4c6a-4135-69c8d7a6b5e4",
 *     "payments": [
 *       {
 *         "_id": "a246dd7c-47a8-4b3e-a893-08c5d4a3b2e1",
 *         "regularPaymentDetails": {
 *           "gatewayTransactionId": "b7f3a1c9-2e84-4d17-9c5a-8e2f6b4d1a30",
 *           "offlinePayment": false,
 *           "status": "APPROVED",
 *           "savedPaymentMethod": false,
 *           "paymentMethodName": {
 *             "buyerLanguageName": "CreditCard",
 *             "siteLanguageName": "CreditCard"
 *           }
 *         },
 *         "_createdDate": "2026-07-26T13:11:45.312Z",
 *         "_updatedDate": "2026-07-26T13:14:02.187Z",
 *         "amount": {
 *           "amount": "25.00",
 *           "formattedAmount": "$25.00"
 *         },
 *         "refundDisabled": false
 *       }
 *     ]
 *   }
 * }
 */

```

### updatePaymentStatus (self-managed)
Self-managed 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 updatePaymentStatus(identifiers,options) {
  const response = await myWixClient.orderTransactions.updatePaymentStatus(identifiers,options);
};
```

---