Subscription API Missing Email Issue

Hello,

I’ve been facing a problem with some clients when they try to subscribe to my app (Expo KDS) while not having an email address added to their Square POS account. Requests made to the subscription api fails with error like this:

err: {“response”:{“statusCode”:400,“body”:“{"errors": [{"code": "CUSTOMER_MISSING_EMAIL","detail": "The provided customer ID XXXXXXXXXXXXXXXXXXXXXXX does not have an email address.","category": "INVALID_REQUEST_ERROR"}]}\n”

Every time that happens I have to email the client and let them know why the app is not working as they are expecting and how they should add an email address to their Square POS account then retry to subscribe on my Expo KDS app so things start to work properly.

Could you please help and find a way to make make sure all clients have an email address on their accounts.

Also, is there a plan to make the subscription plan for Canadian based apps like the USA based apps. Meaning the subscription is being handled by Square rather than us the deverlopers.

Thank you

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

Handling Errors
Troubleshoot In-App Payments SDK Problems
Guidelines and Limitations

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.

The Subscriptions API requires customers to have a profile in the seller’s Customer Directory to enroll them in a plan. The customer profiles must also include a valid email address because Square sends the subscription invoices and receipts to this email address. If a customer doesn’t have an email address in their profile, the API request will fail.

To ensure all clients have an email address on their accounts, you could add a step in your app’s subscription process to check if the customer’s profile has an email address. If it doesn’t, you could prompt the customer to add one before proceeding with the subscription.

As for your question about subscription plans for Canadian based apps, currently, there’s no information provided in the documents about plans to change the handling of subscriptions for Canadian apps to be like USA based apps.

This answer was reviewed by @Bryan-Square.

How are you getting the customer_id to create the subscription? Are you creating the customer profile? If so you can make the email a required field. :slight_smile:

I am not sure I will look into how I did the implementation but generally speaking I’ve followed the required steps in the subscription api documentation.

In all cases the way if handling subscription is causing some issues. When do you think that Canadian based companies will have the option to subscribe from Square marketplace directly like the apps based in the states?

Thank you

Currently, we don’t have any public timelines for this feature. :slight_smile:

You should open a bug and send it to Square development team so they handle this exception on their side. This subscription api thing is not that good. Instead of focusing on my app to make it better and the development of my client base I have to focus on Square subscription Api and handle its exceptions.