Development
  • Guides
  • API Reference
  • API Explorer
  • SDKs
  • Sample apps
  • System status
Support
  • Developer forums
  • Developer blog
  • YouTube
  • X
More
  • Square Home
  • Square Developer
  • App Marketplace
  • Partner with Square
  • Solutions Partner Program
  • Pricing
  • Sales

© 2026 Square, Inc.

  • Developer terms of service
  • Developer Integration and Marketing Agreement
  • Privacy policy
  • Partnerships
  • Sign In
  • Sign In

    Payments

  • List payments

  • Create payment

  • Cancel payment by idempotency key

  • Get payment

  • Update payment

  • Cancel payment

  • Complete payment

  • Webhooks

  • payment.created

  • payment.updated

<- Payments API

Payments API

All versions ->

Cancel payment

POST

 /v2/payments/{payment_id}/cancel

Cancels (voids) a payment.

You can use this endpoint to cancel a payment with the APPROVED status.

Permissions:PAYMENTS_WRITE

Guide

Delayed capture

Try in API Explorer
Link to section

Path parameters

Example code

Link to section

payment_id

string

Required

The ID of the payment to cancel.

Link to section

Response fields

Link to section

errors

Information about errors encountered during the request.

Link to section

payment

The successfully canceled Payment object.

Link to section

Examples

All versions ->

POST /v2/payments/{payment_id}/cancel
curl https://connect.squareup.com/v2/payments/1QjqpBVyrI9S4H9sTGDWU9JeiWdZY/cancel \ -X POST \ -H 'Square-Version: 2026-11-18' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json'

Response JSON

{ "payment": { "id": "1QjqpBVyrI9S4H9sTGDWU9JeiWdZY", "created_at": "2021-10-13T20:26:44.191Z", "updated_at": "2021-10-13T20:31:21.597Z", "amount_money": { "amount": 1000, "currency": "USD" }, "tip_money": { "amount": 100, "currency": "USD" }, "status": "CANCELED", "delay_duration": "PT168H", "source_type": "CARD", "card_details": { "status": "VOIDED", "card": { "card_brand": "VISA", "last_4": "1111", "exp_month": 11, "exp_year": 2022, "fingerprint": "sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ", "card_type": "DEBIT", "prepaid_type": "NOT_PREPAID", "bin": "411111" }, "entry_method": "ON_FILE", "cvv_status": "CVV_ACCEPTED", "avs_status": "AVS_ACCEPTED", "auth_result_code": "68aLBM", "statement_description": "SQ *EXAMPLE TEST GOSQ.C", "card_payment_timeline": { "authorized_at": "2021-10-13T20:26:44.364Z", "voided_at": "2021-10-13T20:31:21.597Z" } }, "location_id": "L88917AVBK2S5", "order_id": "nUSN9TdxpiK3SrQg3wzmf6r8LP9YY", "risk_evaluation": { "created_at": "2021-10-13T20:26:45.271Z", "risk_level": "NORMAL" }, "note": "Example Note", "customer_id": "W92WH6P11H4Z77CTET0RNTGFW8", "total_money": { "amount": 1100, "currency": "USD" }, "approved_money": { "amount": 1000, "currency": "USD" }, "delay_action": "CANCEL", "delayed_until": "2021-10-20T20:26:44.191Z", "application_details": { "square_product": "ECOMMERCE_API", "application_id": "sq0ids-TcgftTEtKxJTRF1lCFJ9TA" }, "version_token": "N8AGYgEjCiY9Q57Jw7aVHEpBq8bzGCDCQMRX8Vs56N06o" } }