Using Metadata for Linking our site's user IDs in Square API Payment Links and Subscription Management

Currently, we have implemented subscriptions on our membership site using Square API Payment Links with PHP. Can we use our site’s user ID as metadata to link the membership information on our side with the subscription payment information on Square’s side as a unique identifier? In that case, we are currently processing via checkout payment links from the Catalog API. Is it possible to include metadata in this process? Or is metadata only available in the Order API? I’m not sure about the flow, so could you please explain it to me?

:wave: 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

Square Order Checkout
Metadata
Customers API Workflows

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.

You can’t include metadata in the Create Payment Link, can you? Isn’t it impossible to use the Order API to create an order before creating the payment link?

At this time metadata is only available with the Orders API. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. :slightly_smiling_face: