# Failed to cancel payment with error 'Payment is attached to the order and guaranteed to complete. It cannot be canceled.'

**URL:** <https://developer.squareup.com/forums/t/failed-to-cancel-payment-with-error-payment-is-attached-to-the-order-and-guaranteed-to-complete-it-cannot-be-canceled/15413>\
**Category:** Questions\
**Tags:** payments-api\
**Created:** [May 4, 2024, 8:39pm UTC](https://developer.squareup.com/forums/t/failed-to-cancel-payment-with-error-payment-is-attached-to-the-order-and-guaranteed-to-complete-it-cannot-be-canceled/15413 "2024-05-04T20:39:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alfred](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@Alfred](https://developer.squareup.com/forums/u/Alfred)\
**Post date:** [May 4, 2024, 8:39pm UTC](https://developer.squareup.com/forums/t/failed-to-cancel-payment-with-error-payment-is-attached-to-the-order-and-guaranteed-to-complete-it-cannot-be-canceled/15413/1 "2024-05-04T20:39:27Z")

</div>

Dear Team,

In production env we created an authorized payment, but failed to cancel it later, we got below error:

> [category=INVALID\_REQUEST\_ERROR, code=BAD\_REQUEST, detail=Payment is attached to the order and guaranteed to complete. It cannot be canceled., field=null]

may i know what the detail means? such as, is it caused by any param set in the request of API creating the payment?

below is the payment info:

- application id: sq0idp-X5g7B-QAtnOvyEFik1fuSg
- location id: LZ27X98TBHAZ0
- payment id: pEeRXidhe2VBmulewDUg6AN0H88YY

Thanks.

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [May 4, 2024, 8:39pm UTC](https://developer.squareup.com/forums/t/failed-to-cancel-payment-with-error-payment-is-attached-to-the-order-and-guaranteed-to-complete-it-cannot-be-canceled/15413/2 "2024-05-04T20:39:46Z")

</div>

👋 I’m Square Dev AI, here to help answer your question!  
Based on the information you’ve provided, the following documentation will help answer your question:

> **[Troubleshoot the Payments API](https://developer.squareup.com/docs/payments-api/error-codes)**
>
> Learn about the error codes returned by the Payments API.

> **[Guidelines and Limitations](https://developer.squareup.com/docs/checkout-api/guidelines-and-limitations)**
>
> Learn about Square Checkout API guidelines and limitations.

> **Additional Documentation**
>
> [Payments Requirements](https://developer.squareup.com/docs/app-marketplace/requirements/payments-api)  
> [Web Payments SDK Requirements](https://developer.squareup.com/docs/app-marketplace/requirements/web-payments-sdk)  
> [Partial Payment Authorizations](https://developer.squareup.com/docs/payments-api/take-payments/card-payments/partial-payments-with-gift-cards)

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.  
Otherwise one of our Developer Advocates will provide additional assistance shortly.

---

<div class="post-metadata">

**Author:** ![Alfred](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@Alfred](https://developer.squareup.com/forums/u/Alfred)\
**Post date:** [May 11, 2024, 8:08am UTC](https://developer.squareup.com/forums/t/failed-to-cancel-payment-with-error-payment-is-attached-to-the-order-and-guaranteed-to-complete-it-cannot-be-canceled/15413/3 "2024-05-11T08:08:47Z")

</div>

Dear team,

Any update please?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Alfred](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@Alfred](https://developer.squareup.com/forums/u/Alfred)\
**Post date:** [May 14, 2024, 9:12am UTC](https://developer.squareup.com/forums/t/failed-to-cancel-payment-with-error-payment-is-attached-to-the-order-and-guaranteed-to-complete-it-cannot-be-canceled/15413/4 "2024-05-14T09:12:44Z")

</div>

Dear Team,

Any update please? It’s 10 days already.  
If it’s an expected behavior, it will be appreciated if you can share the link documenting the related info.

Thanks.

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [May 14, 2024, 4:38pm UTC](https://developer.squareup.com/forums/t/failed-to-cancel-payment-with-error-payment-is-attached-to-the-order-and-guaranteed-to-complete-it-cannot-be-canceled/15413/5 "2024-05-14T16:38:20Z")

</div>

The team is still looking into this issue. 🙂

---

<div class="post-metadata">

**Author:** ![Alfred](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@Alfred](https://developer.squareup.com/forums/u/Alfred)\
**Post date:** [June 3, 2024, 8:25am UTC](https://developer.squareup.com/forums/t/failed-to-cancel-payment-with-error-payment-is-attached-to-the-order-and-guaranteed-to-complete-it-cannot-be-canceled/15413/6 "2024-06-03T08:25:21Z")

</div>

@Bryan-Square

Any update please?  
This issue occurred again, could you please follow up  
Thanks.

application id: sq0idp-X5g7B-QAtnOvyEFik1fuSg  
location id: LC4W03NJBWBW5  
payment id: VYFTk1gueGXOkbM1Tv3kSfzfW7ZZY

---

<div class="post-metadata">

**Author:** ![Alfred](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@Alfred](https://developer.squareup.com/forums/u/Alfred)\
**Post date:** [June 10, 2024, 7:12pm UTC](https://developer.squareup.com/forums/t/failed-to-cancel-payment-with-error-payment-is-attached-to-the-order-and-guaranteed-to-complete-it-cannot-be-canceled/15413/7 "2024-06-10T19:12:07Z")

</div>

Dear Team,

As it’s already one month since we noticed this behavior, may I know whether any progress please?

Thanks.
