Capturing and Voiding Payments

Usually, when Wix calls Create Transaction the whole payment flow is implemented, including capturing the payment. Learn more about processing payments.

However, if authorizeOnly is set to true in the request, Wix will send a request to your Capture Transaction or Void Transaction endpoint when the transaction is captured or voided.

Important:

Wix only sends authorizeOnly:true to PSPs that have enabled Full Auth Capture for card payments. This can be done while becoming a PSP or once you're already integrated with Wix.

The Wix app implementing the payment flow defines whether to handle capture when creating the transaction, or to handle creation and capture separately. If they are handled separately, the Wix app also defines when to call Capture Transaction or Void Transaction. This can be through a standardized workflow, Wix user interaction with a customized dashboard page, or another way that the Wix app defines.

To learn more about capture and void workflows, see Sample Capture and Void Flows.

About the Capture Transaction and Void Transaction endpoints

In general, an implementation of these endpoints must do 2 things:

  1. Accept requests in the format indicated in the service plugin reference, capture or void payments accordingly, and respond with the appropriate HTTP status code and response body.
  2. Send webhooks to Wix to confirm payment events and to notify Wix about any changes to a payment status. Webhooks are sent using the Submit Event API.

Here are some important things to keep in mind when implementing the endpoints:

  • These endpoints are only called if authorizeOnly is set to true in the Capture Transaction request.
  • Wix uses reason codes to indicate the statuses of payments. Your endpoints should respond with the appropriate reason code for each payment status. For a list of reason codes, see Reason Codes.
  • Requests made to these endpoints include a Digest header whose value is a JSON Web Token. The PSP should use this value to validate all requests to the endpoint. Learn more about JWT validation.

Send webhooks

In addition to responding to requests to the Capture Transaction and Void Transaction endpoints, the PSP must send webhooks to Wix to confirm capture or void events and to notify Wix about any changes to a payment status. Webhooks are sent using the Submit Event API.

Webhook requests must use 0Auth 2.0 authentication. To learn more, see Webhooks.

Did this help?