> 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 # GetOrderRefundability # Package: orders # Namespace: OrderBillingService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/order-billing/get-order-refundability.md ## Permission Scopes: Manage Orders: SCOPE.DC-STORES.MANAGE-ORDERS ## Introduction Retrieves refund information about an order's payments, line items, shipping, and additional fees. Returns detailed refundability status for each payment: - `refundable`: Automatic refund is available. - `manuallyRefundable`: Refund is expected to be processed externally. Can be manually marked as refunded. - `nonRefundable`: Refund cannot be performed. Use this method before processing refunds to understand what can be refunded and through which method (automatic vs manual). --- ## REST API ### Schema ``` Method: getOrderRefundability Description: Retrieves refund information about an order's payments, line items, shipping, and additional fees. Returns detailed refundability status for each payment: - `refundable`: Automatic refund is available. - `manuallyRefundable`: Refund is expected to be processed externally. Can be manually marked as refunded. - `nonRefundable`: Refund cannot be performed. Use this method before processing refunds to understand what can be refunded and through which method (automatic vs manual). URL: https://www.wixapis.com/ecom/v1/order-billing/get-order-refundability Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: orderId Method parameters: param name: orderId | type: orderId | description: Order GUID. | required: true Return type: GetOrderRefundabilityResponse - name: payments | type: array | description: Payment refundability status and amounts for each payment method used in the order. Shows whether payments can be refunded automatically, manually, or not at all. - ONE-OF: - name: refundable | type: boolean | description: Whether the payment supports automatic API-based refunds. Choose automatic refunds for faster processing when possible. - name: manuallyRefundable | type: ManuallyRefundablePaymentStatus | description: Payment requires manual/external refund processing. Can be manually marked as refunded. Use the provided `providerLink` to access the provider's refund interface. - name: reason | type: ManuallyRefundableReason | description: Specific reason why this payment requires manual refund processing. - enum: - UNKNOWN_REASON: Unknown manual refund reason. - EXPIRED: Payment authorization or refund window has expired with the payment provider. Refunds must be processed manually through the provider's dashboard. - NOT_SUPPORTED: Payment provider does not support automatic refunds for this payment method. Manual refund through provider dashboard is required. - OFFLINE: Payment was processed offline (cash, check, or manually marked as paid). Refund must be handled manually outside the payment system. - REQUIRES_CARD_READER: Payment requires a physical card reader device to process the refund. Typically applies to in-person credit card transactions. - name: nonRefundable | type: NonRefundablePaymentStatus | description: Payment cannot be refunded due to business rules, provider restrictions, or payment state. Check the specific reason to understand why refunding is not possible. - name: reason | type: NonRefundableReason | description: Specific reason why this payment cannot be refunded through any method. - enum: - UNKNOWN_REASON: Unknown non-refundable reason. - ALREADY_REFUNDED: Payment has already been fully refunded. No additional refund amount is available. - PROVIDER_IS_DOWN: Payment provider's system is currently unavailable for refund processing. Try again later or contact the provider directly. - NOT_PAID: Payment has not been successfully completed. Only paid transactions can be refunded. - ZERO_PRICE: Payment amount is zero, so there is nothing to refund. - DISABLED_BY_PROVIDER: Payment provider has disabled refunds for this payment method or account. - PENDING_REFUND: A refund is already in progress for this payment. Wait for completion before initiating another refund. - FORBIDDEN: Refund is not allowed due to business rules, compliance restrictions, or account limitations. - TRANSACTION_NOT_FOUND: Payment transaction cannot be found in the provider's system, preventing refund processing. - ORDER_IS_PENDING: Order is still pending confirmation and has not been finalized for refund processing. - ORDER_IS_REJECTED: Order was rejected or cancelled before payment completion, making refunds unnecessary. - AMOUNT_OFFSET_BY_CHARGEBACK: Payment amount has been offset by chargeback claims, preventing standard refund processing. - name: payment | type: PaymentInfo | description: Payment details including method, amounts, and transaction information. - ONE-OF: - name: monetary | type: MonetaryPaymentSummary | description: Monetary payment details with amounts for cash-based payments. - name: paid | type: Price | description: Amount paid. - name: amount | type: string | description: Amount. - name: formattedAmount | type: string | description: Amount formatted with currency symbol. - name: refunded | type: Price | description: Total amount already refunded from this payment method. - name: refundPending | type: Price | description: Amount currently being processed for refund but not yet completed. - name: maxRefund | type: Price | description: Maximum amount available for additional refunds if the payment is refundable. Calculated as: `paid` - `refunded` - `refundPending` - name: membership | type: MembershipPaymentSummary | description: Membership payment details for payments made using membership credits or plans. - name: paidLineItemIds | type: array | description: Line item GUIDs that were originally paid using membership credits or benefits. - name: refundedLineItemIds | type: array | description: Line item GUIDs that were previously refunded and had been paid with membership benefits. These items have already been processed for membership credit restoration. - name: refundableLineItemIds | type: array | description: Line item GUIDs paid with membership benefits that can still be refunded. Refunding these items may restore membership credits to the customer's account. - ONE-OF: - name: creditCardDetails | type: CreditCardPaymentMethodDetails | description: Credit card information for credit card payments, including card type and last 4 digits. - name: lastFourDigits | type: string | description: The last 4 digits of the card number. - name: brand | type: string | description: Card issuer's brand. - name: paymentId | type: string | description: Payment GUID used to reference this payment in refund operations. - name: paymentMethod | type: string | description: Payment method type used for this transaction. 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: offlinePayment | type: boolean | description: Whether this payment was processed offline (not through an online payment gateway). Offline payments typically require manual refund processing. - name: providerLink | type: string | description: URL to the payment provider's dashboard for manual refund processing. Required when payment has manual refund status. - name: paymentsSummary | type: PaymentsSummary | description: Aggregated summary of all payment amounts across all payment methods. - name: monetary | type: MonetaryPaymentSummary | description: Summary of cash-based payment methods (credit cards, PayPal, etc.). - name: membership | type: MembershipPaymentSummary | description: Summary of membership-based payments using credits, plans, or benefits. - name: lineItems | type: array | description: Line item refundability showing available refund quantities for each product. - name: lineItemId | type: string | description: Line item GUID. - name: originalQuantity | type: integer | description: Total quantity of this item originally ordered. - name: refundedQuantity | type: integer | description: Quantity of this item previously refunded across all refund transactions. - name: availableRefundQuantity | type: integer | description: Maximum quantity of this item that can still be refunded. - name: shipping | type: ShippingRefundability | description: Shipping refundability including original amount, previously refunded amount, and remaining refundable amount. Only present if the order includes shipping charges. - name: amount | type: Price | description: Original shipping fee amount. - name: refundedAmount | type: Price | description: Previously refunded shipping fee amount. - name: availableRefundAmount | type: Price | description: Shipping fee amount available for refund. - name: additionalFees | type: array | description: List of additional fee refund amounts - both previously refunded and the amount still available for refund. - name: additionalFeeId | type: string | description: Additional fee GUID. - name: amount | type: Price | description: Original additional fee amount. - name: refundedAmount | type: Price | description: Previously refunded additional fee amount. - name: availableRefundAmount | type: Price | description: Additional fee amount available for refund. ``` ### Examples ### Get Order Refundability Get refundability for partially refunded order. ```curl curl -X POST \ 'https://www.wixapis.com/ecom/v1/order-billing/get-order-refundability' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "orderId": "585daa0c-08d2-42ae-bd6b-18fe59c75836" }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.orders.OrderBillingService.getOrderRefundability(orderId) Description: Retrieves refund information about an order's payments, line items, shipping, and additional fees. Returns detailed refundability status for each payment: - `refundable`: Automatic refund is available. - `manuallyRefundable`: Refund is expected to be processed externally. Can be manually marked as refunded. - `nonRefundable`: Refund cannot be performed. Use this method before processing refunds to understand what can be refunded and through which method (automatic vs manual). # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: orderId Method parameters: param name: orderId | type: string | description: Order GUID. | required: true Return type: PROMISE - name: payments | type: array | description: Payment refundability status and amounts for each payment method used in the order. Shows whether payments can be refunded automatically, manually, or not at all. - ONE-OF: - name: refundable | type: boolean | description: Whether the payment supports automatic API-based refunds. Choose automatic refunds for faster processing when possible. - name: manuallyRefundable | type: ManuallyRefundablePaymentStatus | description: Payment requires manual/external refund processing. Can be manually marked as refunded. Use the provided `providerLink` to access the provider's refund interface. - name: reason | type: ManuallyRefundableReason | description: Specific reason why this payment requires manual refund processing. - enum: - UNKNOWN_REASON: Unknown manual refund reason. - EXPIRED: Payment authorization or refund window has expired with the payment provider. Refunds must be processed manually through the provider's dashboard. - NOT_SUPPORTED: Payment provider does not support automatic refunds for this payment method. Manual refund through provider dashboard is required. - OFFLINE: Payment was processed offline (cash, check, or manually marked as paid). Refund must be handled manually outside the payment system. - REQUIRES_CARD_READER: Payment requires a physical card reader device to process the refund. Typically applies to in-person credit card transactions. - name: nonRefundable | type: NonRefundablePaymentStatus | description: Payment cannot be refunded due to business rules, provider restrictions, or payment state. Check the specific reason to understand why refunding is not possible. - name: reason | type: NonRefundableReason | description: Specific reason why this payment cannot be refunded through any method. - enum: - UNKNOWN_REASON: Unknown non-refundable reason. - ALREADY_REFUNDED: Payment has already been fully refunded. No additional refund amount is available. - PROVIDER_IS_DOWN: Payment provider's system is currently unavailable for refund processing. Try again later or contact the provider directly. - NOT_PAID: Payment has not been successfully completed. Only paid transactions can be refunded. - ZERO_PRICE: Payment amount is zero, so there is nothing to refund. - DISABLED_BY_PROVIDER: Payment provider has disabled refunds for this payment method or account. - PENDING_REFUND: A refund is already in progress for this payment. Wait for completion before initiating another refund. - FORBIDDEN: Refund is not allowed due to business rules, compliance restrictions, or account limitations. - TRANSACTION_NOT_FOUND: Payment transaction cannot be found in the provider's system, preventing refund processing. - ORDER_IS_PENDING: Order is still pending confirmation and has not been finalized for refund processing. - ORDER_IS_REJECTED: Order was rejected or cancelled before payment completion, making refunds unnecessary. - AMOUNT_OFFSET_BY_CHARGEBACK: Payment amount has been offset by chargeback claims, preventing standard refund processing. - name: payment | type: PaymentInfo | description: Payment details including method, amounts, and transaction information. - ONE-OF: - name: monetary | type: MonetaryPaymentSummary | description: Monetary payment details with amounts for cash-based payments. - name: paid | type: Price | description: Amount paid. - name: amount | type: string | description: Amount. - name: formattedAmount | type: string | description: Amount formatted with currency symbol. - name: refunded | type: Price | description: Total amount already refunded from this payment method. - name: refundPending | type: Price | description: Amount currently being processed for refund but not yet completed. - name: maxRefund | type: Price | description: Maximum amount available for additional refunds if the payment is refundable. Calculated as: `paid` - `refunded` - `refundPending` - name: membership | type: MembershipPaymentSummary | description: Membership payment details for payments made using membership credits or plans. - name: paidLineItemIds | type: array | description: Line item GUIDs that were originally paid using membership credits or benefits. - name: refundedLineItemIds | type: array | description: Line item GUIDs that were previously refunded and had been paid with membership benefits. These items have already been processed for membership credit restoration. - name: refundableLineItemIds | type: array | description: Line item GUIDs paid with membership benefits that can still be refunded. Refunding these items may restore membership credits to the customer's account. - ONE-OF: - name: creditCardDetails | type: CreditCardPaymentMethodDetails | description: Credit card information for credit card payments, including card type and last 4 digits. - name: lastFourDigits | type: string | description: The last 4 digits of the card number. - name: brand | type: string | description: Card issuer's brand. - name: paymentId | type: string | description: Payment GUID used to reference this payment in refund operations. - name: paymentMethod | type: string | description: Payment method type used for this transaction. 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: offlinePayment | type: boolean | description: Whether this payment was processed offline (not through an online payment gateway). Offline payments typically require manual refund processing. - name: providerLink | type: string | description: URL to the payment provider's dashboard for manual refund processing. Required when payment has manual refund status. - name: paymentsSummary | type: PaymentsSummary | description: Aggregated summary of all payment amounts across all payment methods. - name: monetary | type: MonetaryPaymentSummary | description: Summary of cash-based payment methods (credit cards, PayPal, etc.). - name: membership | type: MembershipPaymentSummary | description: Summary of membership-based payments using credits, plans, or benefits. - name: lineItems | type: array | description: Line item refundability showing available refund quantities for each product. - name: lineItemId | type: string | description: Line item GUID. - name: originalQuantity | type: integer | description: Total quantity of this item originally ordered. - name: refundedQuantity | type: integer | description: Quantity of this item previously refunded across all refund transactions. - name: availableRefundQuantity | type: integer | description: Maximum quantity of this item that can still be refunded. - name: shipping | type: ShippingRefundability | description: Shipping refundability including original amount, previously refunded amount, and remaining refundable amount. Only present if the order includes shipping charges. - name: amount | type: Price | description: Original shipping fee amount. - name: refundedAmount | type: Price | description: Previously refunded shipping fee amount. - name: availableRefundAmount | type: Price | description: Shipping fee amount available for refund. - name: additionalFees | type: array | description: List of additional fee refund amounts - both previously refunded and the amount still available for refund. - name: additionalFeeId | type: string | description: Additional fee GUID. - name: amount | type: Price | description: Original additional fee amount. - name: refundedAmount | type: Price | description: Previously refunded additional fee amount. - name: availableRefundAmount | type: Price | description: Additional fee amount available for refund. ``` ### Examples ### getOrderRefundability ```javascript import { orderBilling } from '@wix/ecom'; async function getOrderRefundability(orderId) { const response = await orderBilling.getOrderRefundability(orderId); }; ``` ### getOrderRefundability (with elevated permissions) ```javascript import { orderBilling } from '@wix/ecom'; import { auth } from '@wix/essentials'; async function myGetOrderRefundabilityMethod(orderId) { const elevatedGetOrderRefundability = auth.elevate(orderBilling.getOrderRefundability); const response = await elevatedGetOrderRefundability(orderId); } ``` ### getOrderRefundability (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 { orderBilling } from '@wix/ecom'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { orderBilling }, // Include the auth strategy and host as relevant }); async function getOrderRefundability(orderId) { const response = await myWixClient.orderBilling.getOrderRefundability(orderId); }; ``` ---