question

oerhuilaji avatar image
oerhuilaji asked parquet76 commented

clover rest payment api

My POS want call clover payment,and close the order after payment.

I now use rest api to connect the device(clover flex)


C:\Users\Administrator>curl --request GET ^ --url https://192.168.1.33:12346/connect/v1/device/status ^ --header "X-Clover-Device-Id: C143UQXXXXXXXX" ^ --header "X-POS-Id: THAI BOWL" ^ --header "accept: application/json" ^ --header "authorization: Bearer 9fd7108f-ee7e-cd29-39ad-xxxxxxxxxxxx" -k -v

Note: Unnecessary use of -X or --request, GET is already inferred.

* Trying 192.168.1.33:12346...

* Connected to 192.168.1.33 (192.168.1.33) port 12346 (#0)

* schannel: disabled automatic use of client certificate

* schannel: using IP address, SNI is not supported by OS.

* ALPN: offers http/1.1

* ALPN: server did not agree on a protocol. Uses default.

* using HTTP/1.x

> GET /connect/v1/device/status HTTP/1.1

> Host: 192.168.1.33:12346

> User-Agent: curl/8.0.1

> X-Clover-Device-Id: C143UQ20340091

> X-POS-Id: THAI BOWL

> accept: application/json

> authorization: Bearer 9fd7108f-ee7e-cd29-39ad-xxxxxxxxxxxxx

>

* schannel: server closed the connection

< HTTP/1.1 501 Not Implemented

< Date: Sat, 08 Jul 2023 14:38:22 GMT

< Content-Length: 0

< Connection: Close

<

* Closing connection 0

* schannel: shutting down SSL/TLS connection with 192.168.1.33 port 12346


I , need something else to support http request?

2, I get the authorization token from merchant dashboard settigns "API TOKEN", does it correct?

REST API
10 |2000

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

parquet76 avatar image
parquet76 answered

Yes, that is correct. The method of obtaining the token is the same whether you use Rest Pay Display or Cloud Pay Display.

10 |2000

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

smartnzowa avatar image
smartnzowa answered smartnzowa edited

With the access token, you can now make API requests to interact with the Clover REST Payment API. You can perform various actions like creating payment orders, processing payments, and retrieving transaction details. Handle responses: The API responses will provide information about the success or failure of your requests. You should handle these latest zambia news responses appropriately in your application logic. It's important to note that the exact details and endpoints of the Clover REST Payment API may vary depending on the version of the API you're using and the specific requirements of your application. Therefore, referring to the official Clover API documentation for the version you're working with is highly recommended..

10 |2000

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

oerhuilaji avatar image
oerhuilaji answered parquet76 commented

Hi, I now try a emulator in Android Studio, when i exec "python install_apps.py", it return


Traceback (most recent call last):

File "install_apps.py", line 191, in <module>

main(sys.argv[1:])

File "install_apps.py", line 149, in main

for row in conn.execute('select * from apps'):

sqlite3.OperationalError: no such table: apps



and i list the file in folder

ls /var/folders/2c/fy8vpqps6zx0qgpdckcj0f9r0000gn/T/*db*

/var/folders/2c/fy8vpqps6zx0qgpdckcj0f9r0000gn/T/adb.501.log

/var/folders/2c/fy8vpqps6zx0qgpdckcj0f9r0000gn/T/appinfo.db-shm

/var/folders/2c/fy8vpqps6zx0qgpdckcj0f9r0000gn/T/appinfo.db-wal

/var/folders/2c/fy8vpqps6zx0qgpdckcj0f9r0000gn/T/xcrun_db


no appinfo.db found

how can i solve it ?

1 comment
10 |2000

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

parquet76 avatar image parquet76 commented ·
This question has nothing to do with the original post. Please create a new question however, if you are expecting cloud pay display to work with the emulator that assumption is incorrect, it will not. If you want to use the emulator for something else then I would recommend checking the docs out and following them step by step.
0 Likes 0 ·

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