Is there a way to pass extra parameters to a static payment link?

For example, if I created a static payment through Square website, can I add extra parameter like this so that when I receive webhook POST the input data would have session_id=ABC in there?

Stripe supports this, which I think is very convenient for people who find it inconvenient to generate dynamic payment links for each checkout session. As I’m new to Square, I want to ask if there is a similar feature. Thanks!

You can add this to a redirect_url when you create a link with the Checkout API. :slightly_smiling_face:

Not sure how that works, but the point is I want to avoid creating a new payment link each time using the API. If I specify redirect_url at the link creation time, I can’t change it without creating a new link, right?

Each link you create with the API is a one time use link. You’ll have to crate a new link for every customer. Unless you use the checkout link created in the Seller Dashboard. If you use that link there there’s no way to pass extra parameters. :slightly_smiling_face:

Good to know, thanks! I will try to propose this as a feature request, as I think it is important.

1 Like

The Checkout link is deprecated.

I found a way to accomplish this using the redirect url. It requires a little programming.

You need to call the create payment link API to dynamically build your payment link and you add the userid or customerid to the end of the redirect url. You will then have your info you need to adjust payment info inside your database.

The API returns an url that you will use for your payment link that will use to check out just like you created it using the square website.

It won’t work for webhooks but redirect.urls will work.