question

rpm avatar image
rpm asked rpm answered

HELP: Create a card token, eCommerse API

Hello. I am connecting my Cloud software to charge cards with a clover device.

I am trying to "Create a card token for use with subsequent payments" using this guide:

https://docs.clover.com/reference/request_token


I can successfully send other commands (message, get signature, welcome, thank-you) to the terminal and get a proper behavior and response. When I send this command I get proper behavior (dev-kit device asked to scan a card, after swiping it shows Credit/Debit option), but I get an error response after swiping and choosing "Credit" on the device.


I am using PHP and cURL.


If I include 'tokenType' => 'ECOMM_COMPAT' I get one error:

{"code":"processing_error","message":"400 Bad Request: Please provide valid expiry date.","requestId":"91e665e9-30432","requestType":"REQUEST_TOKEN","type":"api_error"}


...and if I don't include that I get another:

{"code":"processing_error","message":"503, ","requestId":"91e665e9-30431","requestType":"REQUEST_TOKEN","type":"api_error"}


The docs say error 503 means "The device is not available because it is currently servicing another call.", but it is not! I can't find anything about an "expiry date" anywhere on the internet. All other functions are working properly. Someone please help me figure this out. Thanks.

ecommerce
10 |2000

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

rpm avatar image
rpm answered

Bump. What does it mean "400 Bad Request: Please provide valid expiry date." when I send the correct request:


curl --request POST \

--url https://deviceiporhost:12346/connect/v1/card/tokens \

--header 'Idempotency-Key: valid-UUID' \

--header 'X-Clover-Device-Id: DuoSerialNumber' \

--header 'X-Clover-Timeout: 30' \

--header 'X-POS-Id: MyPOS' \

--header 'accept: application/json' \

--header 'authorization: Bearer OAuthToken' \

--header 'content-type: application/json' \

--data '

{

"tokenType": "ECOMM_COMPAT"

}


...and it works fine on the device. I only get the error after successfully swiping a test card on my DevKit.

10 |2000

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

rpm avatar image
rpm answered

BUMP. I have 8 messages working, but the Token one still doesn't...

clover.pngMy Testing Screen

I get an error without the ECOMM_COMPAT flag like above, or with the ECOMM_COMPAT flag saying I am missing a valid expiry date.


Is this because I am using a Duo with side-loaded Cloud Pay Display?

Is this because you can't make Tokens in the sandbox with a Dev-Kit or something?

I really need to get this to work. Do I need to order a different Dev-Kit?


clover.png (188.9 KiB)
10 |2000

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

rpm avatar image
rpm answered

Nevermind...

The issue was that the test-card that came with my Dev-Kit has an EXP of 12 / 2018, and therefore cannot be tokenized.
They also told me the Dev-Kit would only work with the test-card, but it worked fine with my real credit-card.

Ridiculous. I wasted a week because they sent me an expired card.
10 |2000

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