question

tmescic avatar image
tmescic asked David Marginian edited

Getting 500 Internal Server Error when creating a customer on EU API only

We have an app on both US and EU market. We are using this API endpoint to create a customer: https://docs.clover.com/reference/handlerscreatecustomer

We have the same code running on both markets. Few weeks ago, we started noticing a big number of 500 Internal Server errors (no additional details) appearing in the logs when calling this endpoint only on EU API.

This is an example of a request (sensitive data redacted):

     curl --request POST \
     --url 'https://api.eu.clover.com/v3/merchants/{mID}/customers?expand=addresses,emailAddresses,phoneNumbers' \
     --header 'Authorization: Bearer {accessToken}' \
     --header 'Content-Type: application/json' \
     --data '
{
     "emailAddresses": [
          {
               "emailAddress": "user@user.com",
               "verifiedTime": 1630361379992
          }
     ],
     "phoneNumbers": [
          {
               "phoneNumber": "+123123123123"
          }
     ],
     "firstName": "firstname",
     "lastName": "lastname",
     "customerSince": 0
}
'

The API just responds with status code 500 and this response body:

{"message":"500 Internal Server Error"}

Again, the same code works on US API, and wasn't changed in a very long time.

Any ideas what might be causing this?

REST API
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
David Marginian avatar image
David Marginian answered David Marginian edited

To immediately remediate this issue do not pass 0 for customerSince. Instead, the field can be removed, set to null or current timestamp.

10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community