How to create a payment link using square node SDK that can take any amount input (like a donate link) and also the link is reusable and doesn’t expire after payments.
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
In-App Payments SDK Quickstart
In-App Payments SDK Quickstart
Take a Cash Payment
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.
To create a payment link that can take any amount input and is reusable, you can use the Square Online Checkout API. However, currently, the Square Node.js SDK does not directly support the creation of checkout links.
You would need to create a Checkout object using the CreateCheckout endpoint of the Checkout API. This endpoint allows you to specify the amount of money to be charged.
Please note that the Checkout API creates a checkout page for a single order, and the checkout page URL expires after one payment or 180 days, whichever comes first.
As of now, Square does not support creating a permanent, reusable payment link that does not expire after a payment. Each payment requires creating a new checkout object with a new URL.
This answer was reviewed by @Bryan-Square.