I think I may have found a bug.
On my store when accessing the cart, the order would already be loaded and used to view different line items. Then you can choose to checkout and be sent to a square auto generated checkout page. This is of course done using the payment link api to generate link.
This worked.
I then implemented a calculation step every time the cart is accessed. This works fine but when generating link to create checkout page ( the same flow ) it errors out.
applicationId: sandbox-sq0idb-Ml8VuI3UAOZaoZWw64Z05w
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
Checkout API
Guidelines and Limitations
Configure the Order-Ahead Sample Application
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.
Actually upon further testing, I removed the calculation step and it seems the payment link still is not working, I am completely lost now. As I don’t know what else I have changed.
I took a look at your application and I don’t see any error from CreatePaymentLink
. I checked both production and sandbox. What’s the error message your getting from Square?
Ahh sorry I found the error, all due to my clumsiness. Before calling the payment link, I made a call to update the order to add services charges, that call errored out because I forgot to include version number.