This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Voids or refunds the transaction by ID. Voids if the transaction was only authorized. Refunds if the transaction was already captured.
You can only call this method when authenticated as a Wix app or Wix user identity.
Transaction ID.
Wix Payments account ID.
Amount to capture in minor units (for example, cents). Leave empty to capture the whole transaction amount.
Amount that can be captured or voided in minor units to place a hold on a card to reserve funds. Specify the amount to prevent double partial refunds.
Amount in minor units that can be refunded. Specify the amount to prevent double partial refunds.
Key to ensure idempotency.
Corresponding void or refund ID within the external entity that made the request.
Reason for void or refund.
Metadata to store within the created void or refund.
Voided or refunded transaction information.
Void Id.
Refund ID.
Refund previously captured transaction
curl -X POST \
https://www.wixapis.com/payments/v3/transactions/4f68983f-9b70-438e-8130-4fff0b97cf48/refund \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Authorization: <AUTH>' \
-d '{
"accountId": "6f82b2ce-2a15-4bd7-84b5-392c74b3719c",
"reason": "BUYER_REQUEST"
}'
{
"transaction": {
"id": "4f68983f-9b70-438e-8130-4fff0b97cf48",
"currency": "USD",
"capturableAmount": "0",
"refundableAmount": "0",
"providerTransactionId": "pi_1H83lWAaXaGogcA7gt5WsjjP",
"metadata": {
"metadataKey": "metadataValue"
},
"authorization": {
"amount": "200",
"status": "SUCCEEDED",
"networkReference": {
"networkTransactionId": "WvTnyhZlYER07Ate"
},
"authCode": "123456"
},
"captures": [
{
"id": "4f68983f-9b70-438e-8130-4fff0b97cf48",
"amount": "200",
"status": "SUCCEEDED",
"metadata": {}
}
],
"refunds": [
{
"id": "1dd0bfdc-bf5d-47cb-8d9b-bc2c6d6591d6",
"amount": "200",
"reason": "BUYER_REQUEST",
"status": "SUCCEEDED",
"providerRefundId": "re_1H83mOAaXaGogcA7QYx89USb",
"metadata": {}
}
],
"disputes": [],
"voids": [],
"accountId": "6f82b2ce-2a15-4bd7-84b5-392c74b3719c",
"paymentMethod": {
"typeId": "creditCard"
}
},
"refundId": "1dd0bfdc-bf5d-47cb-8d9b-bc2c6d6591d6"
}
There are 2 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.