Hi, Team Clover
I'm facing an error while calling read card API.
My request is like this:
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\"cardEntryMethods\":[\"DEFAULT\"]}")
val request = Request.Builder()
.url("https://sandbox.dev.clover.com/connect/v1/card/read")
.post(body)
.addHeader("accept", "application/json")
.addHeader("X-Clover-Device-Id", "{$deviceId}")
.addHeader("X-POS-Id", "{$posId}" )
.addHeader("X-Clover-Timeout", "200")
.addHeader("content-type", "application/json")
.addHeader("authorization", "Bearer {$bearerToken}")
.build()
val response = client.newCall(request).execute()
This is a kotlin Rest API request to read card.
All is fine according to docs but I am having this error on response on device, postman and clover website
error: 500 Internal server error
{
"message": "An unexpected error has occurred. Please try again in a few moments.",
"requestId": "44224903-3353",
"requestType": "READ_CARD",
"type": "ERROR"
}