> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Capturing and Voiding Payments ## Article: Capturing and Voiding Payments ## Article Link: https://dev.wix.com/docs/api-reference/business-management/payments/payment-service-provider-service-plugin/capturing-and-voiding-payments.md ## Article Content: # Capturing and Voiding Payments Usually, when Wix calls [Create Transaction](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/transactions/create-transaction.md) the whole payment flow is implemented, including capturing the payment. Learn more about [processing payments](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/processing-payments.md). However, if `authorizeOnly` is set to `true` in the request, Wix will send a request to your [Capture Transaction](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/transactions/capture-transaction.md) or [Void Transaction](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/transactions/void-transaction.md) 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](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/introduction.md#how-to-become-a-payment-service-provider-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](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/transactions/capture-transaction.md) or [Void Transaction](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/transactions/void-transaction.md). 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](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/sample-capture-and-void-flows.md). ## 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. 1. 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](https://dev.wix.com/docs/api-reference/business-management/payments/payment-service-provider-service-plugin/callbacks/submit-event.md) 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](https://dev.wix.com/docs/api-reference/business-management/payments/payment-service-provider-service-plugin/reason-codes.md). * Requests made to these endpoints include a `Digest` header whose value is a [JSON Web Token](https://en.wikipedia.org/wiki/JSON_Web_Token). The PSP should use this value to validate all requests to the endpoint. Learn more about [JWT validation](https://dev.wix.com/docs/api-reference/business-management/payments/payment-service-provider-service-plugin/validate-endpoint-requests.md). ## Send webhooks In addition to responding to requests to the [Capture Transaction](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/transactions/capture-transaction.md) and [Void Transaction](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/transactions/void-transaction.md) 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](https://dev.wix.com/docs/api-reference/business-management/payments/payment-service-provider-service-plugin/callbacks/submit-event.md) API. Webhook requests must use 0Auth 2.0 authentication. To learn more, see [Webhooks](https://dev.wix.com/docs/api-reference/business-management/payments/payment-service-provider-service-plugin/webhooks.md).