question

itachi avatar image
itachi asked itachi published

Could someone please describe the process of completing an order, starting from its creation using a REST API?

Okay, the issue is that I'm confused after reading the Clover documentation. What is the process or the steps to mark an order as complete? Are the steps something like creating an order and then updating payment information, or is there anything else that needs to be done?


What is the best approach to integrate Clover POS?

Orders
10 |2000

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

bryanvargas avatar image
bryanvargas answered bryanvargas commented

We have some premade recipes you can go through on how to build an order cart and pay it out: https://docs.clover.com/recipes

6 comments
10 |2000

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

itachi avatar image itachi commented ·

Okay, which order state indicates that the order is completed, and which payment state signifies that the payment is completed? I attempted to use the REST API in Postman and successfully created an atomic order. Afterward, I added payment information to the order using an external payment option. Once the payment state changes to 'paid,' how can I mark the order as complete?

0 Likes 0 ·
bryanvargas avatar image bryanvargas ♦♦ itachi commented ·
The order state should changed to locked and the paymentState should be PAID
0 Likes 0 ·
itachi avatar image itachi bryanvargas ♦♦ commented ·

After updating the payment information, the payment state changed to 'paid,' but the order state did not change to 'locked.' However, if I update the state using the API, it returns the order state as 'locked.'

0 Likes 0 ·
Show more comments
itachi avatar image
itachi answered itachi published

{

"href": "https://sandbox.dev.clover.com/v3/merchants/HK24E05P6G1W1/orders/S7MPX7RV2BPSC",

"id": "S7MPX7RV2BPSC",

"currency": "USD",

"employee": {

"href": "https://sandbox.dev.clover.com/v3/merchants/HK24E05P6G1W1/employees/S6031V34M45WJ",

"id": "S6031V34M45WJ",

"name": "n"

"role": "ADMIN",

"orders": {

"href": "https://sandbox.dev.clover.com/v3/merchants/HK24E05P6G1W1/employees/S6031V34M45WJ/orders"

}

},

"total": 1600,

"paymentState": "PAID",

"taxRemoved": false,

"isVat": false,

"state": "OPEN",

"manualTransaction": false,

"groupLineItems": false,

"testMode": false,

"createdTime": 1698775679000,

"clientCreatedTime": 1698775679000,

"modifiedTime": 1698775762000,

"lineItems": {

"elements": [

{

"id": "S419RR2F4HJ1Y",

"orderRef": {

"id": "S7MPX7RV2BPSC"

},

"item": {

"id": "TYT504827C2SC"

},

"name": "Flavorful Marinated Egg",

"price": 900,

"printed": false,

"createdTime": 1698775679000,

"orderClientCreatedTime": 1698775679000,

"exchanged": false,

"refunded": false,

"isRevenue": true

},

{

"id": "MND45MB8560SP",

"orderRef": {

"id": "S7MPX7RV2BPSC"

},

"item": {

"id": "FX2E1QSN4ST3T"

},

"name": "Flavorful",

"price": 700,

"printed": false,

"createdTime": 1698775679000,

"orderClientCreatedTime": 1698775679000,

"exchanged": false,

"refunded": false,

"isRevenue": true

}

]

},

"payments": {

"elements": [

{

"id": "DX8724RR16R3W",

"order": {

"id": "S7MPX7RV2BPSC"

},

"tender": {

"href": "https://sandbox.dev.clover.com/v3/merchants/HK24E05P6G1W1/tenders/FFVK3Q4NK96VJ",

"id": "FFVK3Q4NK96VJ",

"editable": false,

"labelKey": "com.clover.tender.external_payment",

"label": "External Payment",

"opensCashDrawer": false,

"enabled": false,

"visible": false

},

"amount": 2000,

"tipAmount": 200,

"taxAmount": 150,

"cashbackAmount": 300,

"employee": {

"href": "https://sandbox.dev.clover.com/v3/merchants/HK24E05P6G1W1/employees/S6031V34M45WJ",

"id": "S6031V34M45WJ",

"name": "Tim Zhang",

"role": "ADMIN",

"orders": {

"href": "https://sandbox.dev.clover.com/v3/merchants/HK24E05P6G1W1/employees/S6031V34M45WJ/orders"

}

},

"createdTime": 1698775763000,

"clientCreatedTime": 1698775763000,

"modifiedTime": 1698775762000,

"offline": false,

"result": "SUCCESS"

}

]

}



After using this API, the payment state changes to 'paid,' but the order state does not change to 'locked.'

10 |2000

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