POST

Void


Developer Preview

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

This method requests that a gift card transaction be voided by your app. Wix calls this method when a purchase fails after gift card redemption.

Endpoint
POST
{DEPLOYMENT-URI}/v1/void
Body Params
appInstanceIdstringdeprecatedformat GUID

App ID of the Gift Card provider. Deprecated.


transactionIdstringminLength 1maxLength 100

Transaction ID to void.


locationIdstringmaxLength 50

Physical location ID. Can be based on the Locations API or an external provider.

Response Object
remainingBalancenumberminimum 0maximum 999999999.99

Remaining balance on the Gift Card after voiding the transaction.


currencyCodestringformat CURRENCY

Currency code.

Void Transaction

The data payload will include the following object as an encoded JWT. For the purposes of this example, we show the request and response objects decoded.

Request
cURL
curl -X POST \ 'http://provider.example.com/v1/void' \ -H 'user-agent: Wix' \ -H 'accept-encoding: gzip, deflate' \ -H 'content-type: text/plain; charset=utf-8' \ -d '{ "transactionId": "00000000-0000-0000-0000-000000000001" }'
Response
JSON
{ "remainingBalance": 100.0, "currencyCode": "USD" }
Errors
TransactionNotFoundobjectstatus code: 404
AlreadyVoidedobjectstatus code: 409
GiftCardDisabledobjectstatus code: 428
GiftCardExpiredobjectstatus code: 428
Did this help?