POST

Capture Transaction


Developer Preview

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

Manually captures an authorized transaction by ID.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Managed Payments- All Permissions
Manage Transactions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/transaction-service/v3/transactions/{transactionId}/capture

Path Params
transactionIdstringRequired

Transaction ID.

Body Params
accountIdstringRequiredformat GUID

Wix Payments account ID.


amountintegerformat uint64

Amount to capture in minor units (for example, cents). When not passed, the whole transaction amount will be captured.


capturableAmountintegerdeprecatedformat uint64

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 captures.


idempotencyKeystringminLength 1maxLength 100

Key to ensure idempotency.


externalCaptureIdstringminLength 1maxLength 36

Corresponding capture ID within the external entity that initiated the transaction capture.


metadataMap <string, string>maxItems 16format map

Metadata to store within the created capture.

Response Object
transactionTransaction

Captured transaction information.


captureIdstringformat GUID

Capture ID.

Capture an authorized transaction

Capture previously created authorized transaction

Request
cURL
curl -X POST \ https://www.wixapis.com/payments/v3/transactions/29298cc4-43b1-4ae9-bd52-be5e35cd114b/capture \ -H 'Content-Type: application/json; charset=utf-8' \ -H 'Authorization: <AUTH>' \ -d '{ "accountId": "6f82b2ce-2a15-4bd7-84b5-392c74b3719c" }'
Response
JSON
{ "transaction": { "id": "29298cc4-43b1-4ae9-bd52-be5e35cd114b", "currency": "USD", "capturableAmount": "0", "refundableAmount": "100", "providerTransactionId": "pi_1H7iJ4AaXaGogcA7QBfvragk", "metadata": { "metadataKey": "metadataValue" }, "authorization": { "amount": "100", "status": "SUCCEEDED", "networkReference": { "networkTransactionId": "WvTnyhZlYER07Ate" }, "authCode": "123456" }, "captures": [ { "id": "a885c8b6-8794-4f61-9fb0-bec93e0715b4", "amount": "100", "status": "SUCCEEDED", "metadata": {} } ], "refunds": [], "disputes": [], "voids": [], "accountId": "6f82b2ce-2a15-4bd7-84b5-392c74b3719c", "paymentMethod": { "typeId": "creditCard" } }, "captureId": "a885c8b6-8794-4f61-9fb0-bec93e0715b4" }
Errors
409Already Exists

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?