About the Order Billing API

The Order Billing API allows you to manage payments and refunds for Wix eCommerce orders. The API centralizes all payment-related capabilities for eCommerce orders, supporting a wide range of business use cases, including charging unpaid orders with saved payment methods, capturing and voiding authorized payments, and processing refunds.

With the Order Billing API, you can:

After capturing a payment or issuing a refund with the Order Billing API, you can manage the records of these payments and refunds with the Order Transactions API.

Before you begin

It’s important to note the following before starting to code:

  • At the moment, this API only supports payments from payment service providers. Paying with a gift card or by using a membership is not yet supported.
  • Charging payments with this API is limited to saved payment methods and authorized payments only.
  • Authorizing payments (delayed capture) is only available for Wix Payments.
  • Capturing or voiding authorized payments is only supported for the full authorized amount. Partial captures or voids are not currently available.
  • Most payment providers can be automatically refunded using the Refund Payments method. For unsupported payment providers, use the API to manually mark the payments as externally refunded. This ensures alignment between Wix and external systems.

Use cases

Terminology

  • Regular payment: A standard payment processed via supported payment providers. This represents only monetary transactions, not gift cards or memberships.

  • Offline payment: A payment not processed by Wix, but still recorded by Wix.

  • Saved payment method: Card tokenization replaces sensitive card details with a secure, unique token to protect data during transactions and enable safer digital payments. You can specify that an item requires a saved payment method at checkout with the Catalog Service Plugin.

  • Payment authorization: Authorization is the process of reserving funds on a customer's payment method to ensure the payment can be completed, without immediately charging the amount.

  • Delayed capture: Allows businesses to charge the authorized amount at a later date. This is typically used for security deposits or order verification.

  • Capture: The process of transferring the reserved funds from the customer to the business.

  • Void: Cancels an authorized payment, and releases the reserved funds back to the customer's payment method.

  • Refundability: Whether an order/payment is refundable. Possible reasons why an order/payment is not refundable include pending/rejected orders, payment provider issues, and more.

  • Shipping refund: Refunding the amount charged for shipping fees.

  • Additional fee refund: Refunding the amount charged for extra fees. This may include handling fees, gift wrapping fees, or other supplementary charges.

  • Refund statuses:

    • SCHEDULED - Refund request acknowledged, and will be performed soon.
    • STARTED - Refund initiated on the payment provider side.
    • PENDING - Refund initiated on the payment provider side. This status is assigned by the payment provider.
    • SUCCEEDED - Refund transaction succeeded.
    • FAILED - Refund transaction failed.
Did this help?

Order Billing: Sample Use Cases and Flows

This article shares some possible use cases your app could support, as well as a sample flow that could support each use case. This can be a helpful jumping off point as you plan your app's implementation.

Authorize and capture with a saved payment method

To authorize a payment for an order with a saved payment method, follow these steps:

  1. Ensure the order has a saved payment method. To do this, pass the order ID to the List Transactions For Single Order method.
  2. Search the response for a payment with regularPaymentDetails.savedPaymentMethod set to true. If no such payment exists, you will not be able to use Authorize Charge With Saved Payment Method.
  3. Pass the order ID and the other required fields to Authorize Charge With Saved Payment Method. Use the delayedCaptureSettings field to define whether to automatically capture or void the authorized charge.
  4. To capture the payment manually, pass the order ID and payment ID to Capture Authorized Payments. Currently, capturing only the full amount is supported.
  5. To void the payment, pass the order ID and payment ID to Void Authorized Payments.

Process the refund of an entire order

To fully refund an entire order, follow these steps:

  1. Pass the selected order's ID to Get Order Refundability to retrieve the refundable items and amounts.
  2. Retrieve the refundable payments from the response.
  3. Pass the order ID and payment IDs to Refund Payments. Use the response from Get Order Refundability to provide the amount and items related to the refund.

Process the partial refund of an order

Sometimes you may want to refund only a certain item. To partially refund an order, follow these steps:

  1. Pass the selected order's ID to Get Order Refundability to retrieve the refundable items and amounts.
  2. Retrieve the refundable payments from the response.
  3. Pass the order ID and line item ID to Calculate Refund to compute the refund amount for the required item, including associated taxes and discounts.
  4. Pass the received amount and the line item ID to Refund Payments to execute the partial refund for the selected item.

Record a refund made on an external system

In cases where the payment provider is not supported by Wix or the refund was processed outside of Wix, you can still record the refund using the Order Billing API. To do this, follow these steps:

  1. Call Refund Payments.
  2. Pass the order ID, payment ID, and refund amount.
  3. Set externalRefund to true.
Did this help?

POST

Get Order Refundability


Developer Preview

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

Retrieves refund information about an order's payments, line items, shipping, and additional fees.

The following information is returned:

  • Whether a payment is refundable; previously refunded amounts; possible refund amounts for each payment.
  • Refundable and previously refunded quantities for each line item, as well as shipping and additional fees.
Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/ecom/v1/order-billing/get-order-refundability

Body Params
orderIdstringRequiredformat GUID

Order ID.

Response Object
paymentsArray <PaymentRefundability>maxItems 100

Payments and their refundability amounts and statuses.


paymentsSummaryPaymentsSummary

Aggregated payments summary.


lineItemsArray <LineItemRefundability>maxItems 300

List of line item refund quantities.


shippingShipping

Shipping refund amounts - both previously refunded and the amount still available for refund.


additionalFeesArray <AdditionalFeeRefundability>maxItems 100

List of additional fee refund amounts - both previously refunded and the amount still available for refund.

Get Order Refundability

Get refundability for partially refunded order.

Request
cURL
curl -X POST \ 'https://www.wixapis.com/ecom/v1/order-billing/get-order-refundability' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ --data-binary '{ "orderId": "585daa0c-08d2-42ae-bd6b-18fe59c75836" }'
Response
JSON
{ "payments": [ { "payment": { "paymentId": "c5e3f495-7de2-4033-9bd0-7eef76700d00", "paymentMethod": "WixPayments", "offlinePayment": false, "monetary": { "paid": { "amount": "111.97", "formattedAmount": "$111.97" }, "refunded": { "amount": "0.00", "formattedAmount": "$0.00" }, "refundPending": { "amount": "0.00", "formattedAmount": "$0.00" }, "maxRefund": { "amount": "111.97", "formattedAmount": "$111.97" } }, "creditCardDetails": { "lastFourDigits": "1111", "brand": "visa" } }, "refundable": true }, { "payment": { "paymentId": "360755cf-c684-4678-89cb-7615f48c256a", "paymentMethod": "WixPayments", "offlinePayment": false, "monetary": { "paid": { "amount": "77.00", "formattedAmount": "$77.00" }, "refunded": { "amount": "77.00", "formattedAmount": "$77.00" }, "refundPending": { "amount": "0.00", "formattedAmount": "$0.00" }, "maxRefund": { "amount": "0.00", "formattedAmount": "$0.00" } }, "creditCardDetails": { "lastFourDigits": "1111", "brand": "visa" } }, "nonRefundable": { "reason": "ALREADY_REFUNDED" } } ], "paymentsSummary": { "monetary": { "paid": { "amount": "188.97", "formattedAmount": "$188.97" }, "refunded": { "amount": "77.00", "formattedAmount": "$77.00" }, "refundPending": { "amount": "0.00", "formattedAmount": "$0.00" }, "maxRefund": { "amount": "111.97", "formattedAmount": "$111.97" } } }, "lineItems": [ { "lineItemId": "00000000-0000-0000-0000-000000000001", "originalQuantity": 5, "refundedQuantity": 3, "availableRefundQuantity": 2 }, { "lineItemId": "00000000-0000-0000-0000-000000000002", "originalQuantity": 3, "refundedQuantity": 0, "availableRefundQuantity": 3 } ], "shipping": { "amount": { "amount": "11.00", "formattedAmount": "$11.00" }, "refundedAmount": { "amount": "11", "formattedAmount": "$11.00" }, "availableRefundAmount": { "amount": "0.00", "formattedAmount": "$0.00" } }, "additionalFees": [ { "additionalFeeId": "d3d9cafb-9e2d-4dae-8129-091df0a6c24f", "amount": { "amount": "2.00", "formattedAmount": "$2.00" }, "refundedAmount": { "amount": "0", "formattedAmount": "$0.00" }, "availableRefundAmount": { "amount": "2.00", "formattedAmount": "$2.00" } } ] }
Did this help?

POST

Calculate Refund


Developer Preview

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

Calculates refund amounts for a given list of an order's line items, shipping, and additional fees.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/ecom/v1/order-billing/calculate-refund

Body Params
orderIdstringRequiredformat GUID

Order ID.


refundItemsRefundItems

List of line items, shipping and additional fees to be calculated for refund.

Response Object
summarySummary

Aggregated summary of all items provided for refund.

This field is not returned when refund is not available for the given list of items.


calculatedRefundItemsCalculatedRefundItems

Calculated summary of each item provided for refund.


ONE OF:

availableboolean

Whether refund is available for the given list of items.


notAvailableNotAvailable

If the calculated refund is not available, this field contains error details and amounts for each item.

Calculate valid refund for 1 line item and 1 additional fee.

Request
cURL
curl -X POST \ 'https://www.wixapis.com/ecom/v1/order-billing/calculate-refund' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ --data-binary '{ "orderId": "585daa0c-08d2-42ae-bd6b-18fe59c75836", "refundItems": { "lineItems": [ { "lineItemId": "00000000-0000-0000-0000-000000000001", "quantity": 1 } ], "additionalFees": [ { "additionalFeeId": "d3d9cafb-9e2d-4dae-8129-091df0a6c24f", "amount": { "amount": "1" } } ] } }'
Response
JSON
{ "summary": { "total": { "amount": "23.00", "formattedAmount": "$23.00" }, "tax": { "amount": "2.00", "formattedAmount": "$2.00" }, "discount": { "amount": "0.00", "formattedAmount": "$0.00" }, "subtotal": { "amount": "21.00", "formattedAmount": "$21.00" }, "lineItemsSubtotal": { "amount": "20.00", "formattedAmount": "$20.00" }, "additionalFeesTotal": { "amount": "1", "formattedAmount": "$1.00" } }, "calculatedRefundItems": { "lineItems": [ { "item": { "lineItemId": "00000000-0000-0000-0000-000000000001", "quantity": 1 }, "summary": { "total": { "amount": "22.00", "formattedAmount": "$22.00" }, "tax": { "amount": "2.00", "formattedAmount": "$2.00" }, "discount": { "amount": "0.00", "formattedAmount": "$0.00" }, "subtotal": { "amount": "20.00", "formattedAmount": "$20.00" } } } ], "additionalFees": [ { "additionalFee": { "additionalFeeId": "d3d9cafb-9e2d-4dae-8129-091df0a6c24f", "amount": { "amount": "1", "formattedAmount": "" } }, "summary": { "total": { "amount": "1", "formattedAmount": "$1.00" }, "tax": { "amount": "0.00", "formattedAmount": "$0.00" }, "discount": { "amount": "0", "formattedAmount": "$0.00" }, "subtotal": { "amount": "1.00", "formattedAmount": "$1.00" } } } ] }, "available": true }
Did this help?

POST

Refund Payments


Developer Preview

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

Calls relevant payment providers and creates refund transactions for the requested payments.

Refunds marked with paymentRefunds.externalRefund = true do not call payment providers and only update the order's transactions records.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/ecom/v1/order-billing/refund-payments

Body Params
orderIdstringRequiredformat GUID

Order ID.


paymentRefundsArray <PaymentRefund>RequiredminItems 1maxItems 50

List of payments and their amounts to refund.


sideEffectsSideEffects

Side effect actions for restocking and notifications.


refundItemsRefundItems

List of line items, shipping and additional fees to refund.


customerReasonstringmaxLength 200

Customer-provided reason for the refund.

Response Object
refundRefund

Refund details.


orderTransactionsOrderTransactions

The order's transactions records after the refunds were performed.

Refund Payments

Partial refund of payment

Request
cURL
curl -X POST \ 'https://www.wixapis.com/ecom/v1/order-billing/refund-payments' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ --data-binary '{ "orderId": "585daa0c-08d2-42ae-bd6b-18fe59c75836", "paymentRefunds": [ { "paymentId": "c5e3f495-7de2-4033-9bd0-7eef76700d00", "amount": { "amount": "23.00" } } ], "sideEffects": { "restock": { "lineItems": [ { "lineItemId": "00000000-0000-0000-0000-000000000001", "quantity": 1 } ] }, "notifications": { "sendCustomerEmail": true, "customMessage": "Sorry <3" } }, "refundItems": { "lineItems": [ { "lineItemId": "00000000-0000-0000-0000-000000000001", "quantity": 1 } ], "additionalFees": [ { "additionalFeeId": "d3d9cafb-9e2d-4dae-8129-091df0a6c24f", "amount": { "amount": "1" } } ] } }'
Response
JSON
{ "refund": { "id": "09ecf3d7-5ab3-4e18-810e-a5bca145b107", "transactions": [ { "paymentId": "c5e3f495-7de2-4033-9bd0-7eef76700d00", "amount": { "amount": "23.00", "formattedAmount": "$23.00" }, "refundStatus": "SCHEDULED", "externalRefund": false } ], "details": { "items": [ { "lineItemId": "00000000-0000-0000-0000-000000000001", "quantity": 1 } ], "shippingIncluded": false, "lineItems": [ { "lineItemId": "00000000-0000-0000-0000-000000000001", "quantity": 1 } ], "additionalFees": [ { "additionalFeeId": "d3d9cafb-9e2d-4dae-8129-091df0a6c24f", "amount": { "amount": "1", "formattedAmount": "$1.00" } } ] }, "createdDate": "2024-10-15T14:05:01.472Z", "summary": { "requestedRefund": { "amount": "23.00", "formattedAmount": "$23.00" }, "pendingRefund": { "amount": "23.00", "formattedAmount": "$23.00" }, "pending": true } }, "orderTransactions": { "orderId": "585daa0c-08d2-42ae-bd6b-18fe59c75836", "payments": [ { "id": "360755cf-c684-4678-89cb-7615f48c256a", "regularPaymentDetails": { "paymentOrderId": "2d466981-112a-4d10-bb1e-381183169f4b", "gatewayTransactionId": "5b4eea6a-4eee-42d6-8d3f-1722adfb1c31", "paymentMethod": "WixPayments", "providerTransactionId": "5b4eea6a-4eee-42d6-8d3f-1722adfb1c31", "offlinePayment": false, "status": "REFUNDED", "savedPaymentMethod": false, "creditCardDetails": { "lastFourDigits": "1111", "brand": "visa" } }, "createdDate": "2024-10-15T11:17:59.312Z", "updatedDate": "2024-10-15T11:22:08.875Z", "amount": { "amount": "77.0", "formattedAmount": "$77.00" }, "refundDisabled": false }, { "id": "c5e3f495-7de2-4033-9bd0-7eef76700d00", "regularPaymentDetails": { "paymentOrderId": "f439a5fe-2683-46aa-bf67-ba9dff503f87", "gatewayTransactionId": "deabbe2c-20e1-4cac-809e-70924003cbe3", "paymentMethod": "WixPayments", "providerTransactionId": "deabbe2c-20e1-4cac-809e-70924003cbe3", "offlinePayment": false, "status": "APPROVED", "savedPaymentMethod": false, "creditCardDetails": { "lastFourDigits": "1111", "brand": "visa" } }, "createdDate": "2024-10-15T11:19:46.285Z", "updatedDate": "2024-10-15T11:19:46.285Z", "amount": { "amount": "111.97", "formattedAmount": "$111.97" }, "refundDisabled": false } ], "refunds": [ { "id": "09ecf3d7-5ab3-4e18-810e-a5bca145b107", "transactions": [ { "paymentId": "c5e3f495-7de2-4033-9bd0-7eef76700d00", "amount": { "amount": "23.00", "formattedAmount": "$23.00" }, "refundStatus": "SCHEDULED", "externalRefund": false } ], "details": { "items": [ { "lineItemId": "00000000-0000-0000-0000-000000000001", "quantity": 1 } ], "shippingIncluded": false, "lineItems": [ { "lineItemId": "00000000-0000-0000-0000-000000000001", "quantity": 1 } ], "additionalFees": [ { "additionalFeeId": "d3d9cafb-9e2d-4dae-8129-091df0a6c24f", "amount": { "amount": "1", "formattedAmount": "$1.00" } } ] }, "createdDate": "2024-10-15T14:05:01.472Z", "summary": { "requestedRefund": { "amount": "23.00", "formattedAmount": "$23.00" }, "pendingRefund": { "amount": "23.00", "formattedAmount": "$23.00" }, "pending": true } }, { "id": "8d8c686d-8b1b-459d-a3c5-3d1caaa7cddf", "transactions": [ { "paymentId": "360755cf-c684-4678-89cb-7615f48c256a", "amount": { "amount": "77", "formattedAmount": "$77.00" }, "refundStatus": "SUCCEEDED", "gatewayRefundId": "f1d208a4-3753-4785-9464-c4d2ba0ba54d", "providerRefundId": "5464b10f-0958-40fd-ab58-9a3f79be74e6", "externalRefund": false } ], "details": { "items": [ { "lineItemId": "00000000-0000-0000-0000-000000000001", "quantity": 3 } ], "shippingIncluded": true, "lineItems": [ { "lineItemId": "00000000-0000-0000-0000-000000000001", "quantity": 3 } ], "additionalFees": [], "shipping": { "amount": { "amount": "11", "formattedAmount": "$11.00" } } }, "createdDate": "2024-10-15T11:22:02.281Z", "summary": { "requestedRefund": { "amount": "77", "formattedAmount": "$77.00" }, "refunded": { "amount": "77", "formattedAmount": "$77.00" }, "pending": false } } ] } }
Errors
400Invalid Argument

There are 5 errors with this status code:

404Not Found

There are 4 errors with this status code:

428Failed Precondition

There is 1 error with this status code:

See the entire list and learn more about Wix errors.

Did this help?

POST

Authorize Charge With Saved Payment Method


Developer Preview

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

Authorizes a payment using an order's saved payment method.

Use the delayedCaptureSettings field to specify whether the payment should also be captured/voided immediately or at a later time. Alternatively, the payment can be manually captured or voided using the Capture Authorized Payments or Void Authorized Payments methods.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/ecom/v1/order-billing/authorize-charge-with-saved-payment-method

Body Params
orderIdstringRequiredformat GUID

Order ID.

The order must have a saved payment method associated. Pass the order ID to the List Transactions For Single Order method and search the response for a payment with regularPaymentDetails.savedPaymentMethod: true. If no saved payment exists, the call will fail.


amountAmountRequired

Amount to authorize.


currencystringRequiredformat CURRENCY

Currency code, in ISO-4217 format.


delayedCaptureSettingsDelayedCaptureSettingsRequired

Settings for scheduled action to perform automatically.

Response Object
paymentPayment

Authorized payment.


orderTransactionsOrderTransactions

Order transactions updated with authorized payment.

Authorize Charge With Saved Payment Method
Request
cURL
curl -X POST \ 'https://www.wixapis.com/ecom/v1/order-billing/authorize-charge-with-saved-payment-method' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ --data-binary '{ "orderId": "3545c2f2-7768-4e6e-b64b-dcc11dc7a7f9", "amount": { "amount": "1" }, "currency": "USD", "delayedCaptureSettings": { "scheduledAction": "VOID", "delayDuration": { "count": 1, "unit": "DAYS" } } }'
Response
JSON
{ "payment": { "id": "496aaea1-4e2f-4cb1-9522-6b85f49b91e2", "regularPaymentDetails": { "paymentOrderId": "dc6e6d53-51d6-48a4-8755-ca87a4e370bf", "offlinePayment": false, "status": "PENDING", "savedPaymentMethod": false, "authorizationDetails": { "delayedCapture": true, "captures": [], "scheduledAction": { "actionType": "VOID" } } }, "createdDate": "2024-12-25T08:46:04.257Z", "updatedDate": "2024-12-25T08:46:04.257Z", "amount": { "amount": "1", "formattedAmount": "$1.00" }, "refundDisabled": false }, "orderTransactions": { "orderId": "3545c2f2-7768-4e6e-b64b-dcc11dc7a7f9", "payments": [ { "id": "23af2de7-b24d-41d5-8d27-cf925d378d32", "regularPaymentDetails": { "paymentOrderId": "eead5fa5-29c2-4f7e-957c-a5eb0286c235", "gatewayTransactionId": "afba164b-a96c-4cb2-a22d-6eec692e1148", "paymentMethod": "Credit/Debit Cards", "providerTransactionId": "afba164b-a96c-4cb2-a22d-6eec692e1148", "offlinePayment": false, "status": "APPROVED", "savedPaymentMethod": true, "creditCardDetails": { "lastFourDigits": "1111", "brand": "visa" } }, "createdDate": "2024-12-25T08:36:29.499Z", "updatedDate": "2024-12-25T08:36:32.351Z", "amount": { "amount": "2.0", "formattedAmount": "$2.00" }, "refundDisabled": false }, { "id": "496aaea1-4e2f-4cb1-9522-6b85f49b91e2", "regularPaymentDetails": { "paymentOrderId": "dc6e6d53-51d6-48a4-8755-ca87a4e370bf", "offlinePayment": false, "status": "PENDING", "savedPaymentMethod": false, "authorizationDetails": { "delayedCapture": true, "captures": [], "scheduledAction": { "actionType": "VOID" } } }, "createdDate": "2024-12-25T08:46:04.257Z", "updatedDate": "2024-12-25T08:46:04.257Z", "amount": { "amount": "1", "formattedAmount": "$1.00" }, "refundDisabled": false } ], "refunds": [] } }
Errors
400Invalid Argument

There are 2 errors with this status code:

404Not Found

There is 1 error with this status code:

428Failed Precondition

There are 3 errors with this status code:

See the entire list and learn more about Wix errors.

Did this help?

POST

Void Authorized Payments


Developer Preview

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

Voids an order's authorized payments.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/ecom/v1/order-billing/void-authorized-payments

Body Params
orderIdstringRequiredformat GUID

Order ID.


paymentIdsArray <string>RequiredminItems 1maxItems 100format GUID

IDs of the authorized payments to void.

Response Object
orderTransactionsOrderTransactions

Order transactions updated with voided payment.

Void Authorized Payments

Void previously authorized payments.

Request
cURL
curl -X POST \ 'https://www.wixapis.com/ecom/v1/order-billing/void-authorized-payments' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ --data-binary '{ "orderId": "fdac1270-f581-4c43-af7d-f347cda9f1ec", "paymentIds": [ "ae063baf-e276-447d-94b3-4503561876a1" ] }'
Response
JSON
{ "orderTransactions": { "orderId": "fdac1270-f581-4c43-af7d-f347cda9f1ec", "payments": [ { "id": "953df6c8-7d51-4207-b99e-a3f13f16284f", "regularPaymentDetails": { "paymentOrderId": "6a568092-66c5-4de9-9f2a-1ced6e0ce28e", "gatewayTransactionId": "6cfccb9a-060e-4de0-a321-4017d3eb977b", "paymentMethod": "Credit/Debit Cards", "providerTransactionId": "6cfccb9a-060e-4de0-a321-4017d3eb977b", "offlinePayment": false, "status": "APPROVED", "savedPaymentMethod": true, "creditCardDetails": { "lastFourDigits": "1111", "brand": "visa" } }, "createdDate": "2024-12-25T08:56:48.258Z", "updatedDate": "2024-12-25T08:56:50.732Z", "amount": { "amount": "2.0", "formattedAmount": "$2.00" }, "refundDisabled": false }, { "id": "ae063baf-e276-447d-94b3-4503561876a1", "regularPaymentDetails": { "paymentOrderId": "b4f3d414-0237-4861-9ef1-1a6afdc48555", "gatewayTransactionId": "6bed010d-3176-4a88-a7ac-4b2b0c99efdb", "providerTransactionId": "6bed010d-3176-4a88-a7ac-4b2b0c99efdb", "offlinePayment": false, "status": "AUTHORIZED", "savedPaymentMethod": false, "creditCardDetails": { "lastFourDigits": "1111", "brand": "visa" }, "authorizationDetails": { "delayedCapture": true, "authorizedDate": "2024-12-25T08:58:20.338Z", "captures": [], "void": { "status": "PENDING", "reason": "UNKNOWN_REASON" }, "scheduledAction": { "actionType": "VOID", "executionDate": "2024-12-26T08:58:20.338Z" } } }, "createdDate": "2024-12-25T08:58:18.226Z", "updatedDate": "2024-12-25T09:02:14.681Z", "amount": { "amount": "1", "formattedAmount": "$1.00" }, "refundDisabled": false } ], "refunds": [] } }
Errors
404Not Found

There are 2 errors with this status code:

409Already Exists

There is 1 error with this status code:

428Failed Precondition

There are 2 errors with this status code:

See the entire list and learn more about Wix errors.

Did this help?

POST

Capture Authorized Payments


Developer Preview

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

Captures an order's authorized payments.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/ecom/v1/order-billing/capture-authorized-payments

Body Params
orderIdstringRequiredformat GUID

Order ID.


paymentsArray <PaymentCapture>RequiredminItems 1maxItems 100

List payment IDs and amounts to capture.

Response Object
orderTransactionsOrderTransactions

Order transactions updated with captured payment.

Capture Authorized Payments

Capture previously authorized payments.

Request
cURL
curl -X POST \ 'https://www.wixapis.com/ecom/v1/order-billing/capture-authorized-payments' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ --data-binary '{ "orderId": "3545c2f2-7768-4e6e-b64b-dcc11dc7a7f9", "payments": [ { "paymentId": "496aaea1-4e2f-4cb1-9522-6b85f49b91e2", "amount": { "amount": "1" } } ] }'
Response
JSON
{ "orderTransactions": { "orderId": "3545c2f2-7768-4e6e-b64b-dcc11dc7a7f9", "payments": [ { "id": "23af2de7-b24d-41d5-8d27-cf925d378d32", "regularPaymentDetails": { "paymentOrderId": "eead5fa5-29c2-4f7e-957c-a5eb0286c235", "gatewayTransactionId": "afba164b-a96c-4cb2-a22d-6eec692e1148", "paymentMethod": "Credit/Debit Cards", "providerTransactionId": "afba164b-a96c-4cb2-a22d-6eec692e1148", "offlinePayment": false, "status": "APPROVED", "savedPaymentMethod": true, "creditCardDetails": { "lastFourDigits": "1111", "brand": "visa" } }, "createdDate": "2024-12-25T08:36:29.499Z", "updatedDate": "2024-12-25T08:36:32.351Z", "amount": { "amount": "2.0", "formattedAmount": "$2.00" }, "refundDisabled": false }, { "id": "496aaea1-4e2f-4cb1-9522-6b85f49b91e2", "regularPaymentDetails": { "paymentOrderId": "dc6e6d53-51d6-48a4-8755-ca87a4e370bf", "gatewayTransactionId": "3376e961-48c7-4093-b8be-0320ace06777", "providerTransactionId": "3376e961-48c7-4093-b8be-0320ace06777", "offlinePayment": false, "status": "AUTHORIZED", "savedPaymentMethod": false, "creditCardDetails": { "lastFourDigits": "1111", "brand": "visa" }, "authorizationDetails": { "delayedCapture": true, "authorizedDate": "2024-12-25T08:46:05.539Z", "captures": [ { "status": "PENDING", "amount": { "amount": "1", "formattedAmount": "$1.00" }, "createdDate": "2024-12-25T08:51:51.167Z", "id": "053aa1b1-e589-4850-b67c-9755af1a73e4" } ], "scheduledAction": { "actionType": "VOID", "executionDate": "2024-12-26T08:46:05.539Z" } } }, "createdDate": "2024-12-25T08:46:04.257Z", "updatedDate": "2024-12-25T08:51:51.167Z", "amount": { "amount": "1", "formattedAmount": "$1.00" }, "refundDisabled": false } ], "refunds": [] } }
Errors
400Invalid Argument

There is 1 error with this status code:

404Not Found

There is 1 error with this status code:

409Already Exists

There are 2 errors with this status code:

428Failed Precondition

There are 2 errors with this status code:

See the entire list and learn more about Wix errors.

Did this help?