POST /v2/payments/cancel
Cancels (voids) a payment identified by the idempotency key that is specified in the request.
Use this method when the status of a CreatePayment
request is unknown (for example, after you send a
CreatePayment
request, a network error occurs and you do not get a response). In this case, you can
direct Square to cancel the payment using this endpoint. In the request, you provide the same
idempotency key that you provided in your CreatePayment
request that you want to cancel. After
canceling the payment, you can submit your CreatePayment
request again.
Note that if no payment with the specified idempotency key is found, no action is taken and the endpoint returns successfully.
Servers
- https://connect.squareup.com
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
idempotency_key |
String | Yes |
The |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.