• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Capture transaction

Deprecated
Effective August 15th, 2019

Captures a transaction that was created with the Charge endpoint with a delay_capture value of true.

See Delayed capture transactions for more information.

Permissions
PAYMENTS_WRITE

Deprecation date
2019-08-15
Retirement date
2021-09-01
Replaced by
CompletePayment
Migration guide
Name Description
location_id
string

Required
Deprecated
transaction_id
string

Required
Deprecated

Response Fields

Name Description
errors
Error [ ]

Any errors that occurred during the request.

Examples

You are viewing an old version of the API
POST /v2/locations/{location_id}/transactions/{transaction_id}/capture
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/locations/location_id0/transactions/transaction_id1/capture \
  -X POST \
  -H 'Square-Version: 2021-05-13' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
Response JSON
{}

Error Descriptions

400 Bad request DELAYED_TRANSACTION_CANCELED

The application tried to cancel a delayed-capture payment that was already cancelled.

>
400 Bad request DELAYED_TRANSACTION_EXPIRED

The application tried to update a delayed-capture payment that has expired.

>
400 Bad request
{
  "errors": [
    {
      "code": "DELAYED_TRANSACTION_CANCELED",
      "category": "INVALID_REQUEST_ERROR"
    }
  ]
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?