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:
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?
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?
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.
Just checking in to see if there have been any updates since our last message. We’re still looking forward to hearing from you and appreciate any information you can share. If any updates or changes are required on my end regarding this API, please let me know.