使方形结帐无效 URL

Invalidate Square Checkout URL

有没有办法使使用 Square Checkout API 生成的 Square Checkout URL 无效?我现在的C#项目使用square dotnet SDK调用CheckoutAPI等待用户支付,支付完成后开始。我不希望用户有可能没有完成订单并且永远不会被重定向到确认 URL,所以我想实现一个超时,如果用户没有在特定时间内付款,整个交易被取消。这是我在伪代码中的描述:

URL = CallCheckoutAPI(locationId, order);
OpenBrowser(URL);
Success = WaitForPayment(timeoutDuration); //Returns true if payment completes,
                                           //false on timeout
if (Success) Commence();
else CancelTransaction(); //This is where the invalidation of the URL would happen

有办法吗?

没有。结帐 URL 仍将在 180 天内有效。但是,如果用户从未访问过结帐 url,那么他们将无法找到它,因为它是独一无二的 URL。但是无法取消结帐 URL。