Square API/Supabase?

I’m building an ordering app for a coffee shop in react native, and I want to keep the number of systems involved to a minimum. I’m currently using supabase for the auth & database components, and was wondering if there was a way to also use it as the backend for the Square API features that require one, too. (Customer API, payments, etc)

Yes, I can use Heroku, but I’d like to keep it down to just supabase if possible. I don’t want to end up with 30 different things needed to support the app, that’s going to make updates & maintenance excruciating.

Here’s hoping there’s a good solution!

: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

Deploy the Server
Deploy the Server
https://developer.squareup.com/docs/orders-api/quick-start/start

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.

Yes, you can use Supabase as your backend for the Square API features. Supabase provides backend services like authentication, database management, and serverless functions, which you can use to implement the server-side logic required for Square APIs.

For instance, you can use Supabase’s serverless functions to implement the necessary endpoints for processing payments with Square’s Payments API. These endpoints would receive payment tokens from your frontend, make the necessary API calls to Square’s servers to process the payments, and then respond back to your frontend.

Similarly, you can use Supabase’s database to store customer information and use it in conjunction with Square’s Customers API. You can create, retrieve, update, and delete customer information in your Supabase database, and sync this data with Square’s servers as needed.

Remember to ensure that your implementation adheres to Square’s security requirements and best practices, especially when dealing with sensitive customer information and payment data.

This answer was reviewed by @Bryan-Square.

1 Like

This is great info! Any chance there’s sample code somewhere out there that I can start with?

Unfortunately, we don’t have an example of this. 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: