Hi,
We’ve encountered a case where our customer was able to complete a payment even after the payment link was deleted using the Delete Payment Link API:
According to the documentation, the API response should include two pieces of information:
→ The ID of the deleted payment link
→ The cancelled order ID (cancelled_order_id)
But in this case, we only received the payment link ID in the response — the cancelled order ID was missing.
My questions:
→ Why was the cancelled_order_id not returned in the response?
→ Under what circumstances would the payment link not expire after calling this API?
Additional context:
→ The customer initially attempted a payment, but it failed with the error “TRANSACTION_LIMIT.” We received a payment ID with status “FAILED” in response of “orders/ORDERID-GET”
→ Our system then triggered the Delete Payment Link API.
→ However, several hours later, the customer was still able to successfully complete the payment with a different card using the same payment link. We received another payment ID in response of “orders/ORDERID-GET”
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:
Additional Documentation
Retrieve Refunds
Retrieve Payments
Cancel or Delete Invoices
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.
I just tested DeletePaymentLink
and the order_id
was in the response. Do you have the payment_id
of the failed payment and the payment_id
for the successful payment? Also what’s the order_id
of the payment link that you deleted? 
Is that information safe to share here?
Yes, anything that I ask for is absolutely safe to share. The one value that we ask that you never share is your access token. That is secret and should never be shared publicly. 
Here is the order ID and the payment IDs:
Order ID: 55kxgKvDlhOUjdwEybuMNj9oRRIZY
Failed Payment ID: 1M3P6X1J1KaWTmNjkbr22yMFHwZZY
Successful Payment ID: Hb23Nki1bPLlMC5WXkcdGABUDqFZY
I just took a look at your API Logs and I don’t see any API calls to DeletePaymentLink
with the order_id: 55kxgKvDlhOUjdwEybuMNj9oRRIZY
. Are you sure it was called correctly?
Yes. Should I share the request and response logs with the payment link ID?
Yes, that would be helpful. 
Here are the logs:
Request:
{“url”:“https://connect.squareup.com/v2/online-checkout/payment-links/5KCK6T4LELEP7BGW”,“type”:“DELETE”,“header”:[“Authorization: Bearer TOKEN”,“Content-Type: application/json”],“data”:null}
Respnse:
{“id”:“5KCK6T4LELEP7BGW”}
And I just noticed that my system has sent around 1,900 delete payment link requests since 2024-10-30, and in about 90 of those requests, we didn’t receive a cancelled order ID.
I’m checking with the team on this. 
Just following up to see if there have been any updates?
I’m still waiting on a response from the team. Just to confirm is this intermit? I see some calls with the order_id
and others without. 
Yes, it’s not happening with every request—only with a few requests.