Hi! I trully apologize if this is too easy for everyone. I’ve build my app react and webservice by myself with not any IT background (just AI). I have it 95% finished, but I’m not able to make SQUARE of my platform “talk.” My business is a monthly subscription fixed at $12 that is sold through social media; once the lead is interested, it completes a registration form, and then it goes to the SQUARE “environment” for the credit card and all the other requirements. Copilot, GITHUB, Claude, Perplexity, and Visual Code say different things, but I can’t make it work. If somebody could guide me, I would be incredibly thankful. I’ve already read the subscription document. My doubt is that i do not have a customer ID (since it’s a lead). I use SUPABASE to register the customers before passing through the Square platform. I apologize for my stupid and basic question. I’ve been stuck on this since 4 days ago. Thank you in advance.
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
App Subscriptions
Get Started
Create an Account and 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.
THank you for your response, this is the response I’m obtaining at the Console: 517-08d12bcfaf2abafa.js?dpl=dpl_FVAypYQrtmUGoJpi4ddVR6FDHXCR:1 Error en el pago: Error: Error procesando el pago
at v (page-810673ec264c9b75.js?dpl=dpl_FVAypYQrtmUGoJpi4ddVR6FDHXCR:1:3953)
It sounds like you’re trying to integrate Square’s subscription service into your application, and you’re facing challenges with handling customer IDs for leads who haven’t yet been fully registered in your system. Here’s a concise guide to help you move forward:
-
Customer Creation: Before you can create a subscription in Square, you need to have a customer profile in Square’s system. Since you’re using SUPABASE to register customers initially, you should ensure that once a lead completes the registration form, you create a corresponding customer in Square using the Customers API. This will give you a customer ID that you can use for subscriptions.
-
Create a Customer in Square: Use the
CreateCustomerendpoint of the Square Customers API to create a new customer profile. You’ll need to pass the necessary customer information, such as name and email, which you collect during the registration process. -
Store the Customer ID: Once the customer is created in Square, store the returned customer ID in your SUPABASE database. This ID will be used to manage subscriptions and payments for that customer.
-
Create a Subscription: With the customer ID, you can now create a subscription using the Subscriptions API. You’ll need to specify the subscription plan and associate it with the customer ID you obtained.
-
Payment Processing: Ensure that your application redirects the user to a Square-hosted checkout page or integrates a payment form where they can enter their credit card details. This can be done using the Web Payments SDK or the Checkout API to securely handle payment information.
-
Testing: Make sure to test the entire flow in the Square Sandbox environment before going live. This will help you identify any issues without affecting real transactions.
By following these steps, you should be able to integrate Square’s subscription service into your application effectively. If you encounter specific errors or issues, reviewing the API responses and logs can provide more insights into what might be going wrong.
This answer was reviewed by @Bryan-Square.
Thank you!!! I think your response is exactly what I needed! Supabase provides customers with different IDs so that SQUARE can recognize them. It seems logical. I the subscription “client” page, should I fulfill with Supabase characters right?. In VERCEL I have SQUARE API and also SUPABASE would i need different APIs for SUPABASE and SQUARE to contact directly?