Important:
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.
function _void(payload: _voidEnvelope): VoidResponse | Promise<VoidResponse>;
import { giftVouchersProvider } from "@wix/ecom/service-plugins";
giftVouchersProvider.provideHandlers({
_void: async (payload) => {
const { request, metadata } = payload;
// Use the `request` and `metadata` received from Wix and
// apply custom logic.
return {
// Return your response exactly as documented to integrate with Wix.
// Return value example:
remainingBalance: "100.00",
currencyCode: "USD",
};
},
});