question

devendrasamcom avatar image
devendrasamcom asked

Clover Mini 2 Read Card API showing error 500 internal server error

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"

}

Clover Android SDKClover Mini
10 |2000

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

0 Answers

·

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