Clover API Flow
Clover API Flow
Contents
Card Token Request...............................................................................................................................2
Card Token Response.............................................................................................................................2
Create Customer Request......................................................................................................................3
Create Customer Response....................................................................................................................4
Create Order Request............................................................................................................................4
Create Order Response..........................................................................................................................6
Pay For Order Request.........................................................................................................................10
Pay for Order Response.......................................................................................................................11
2
--url https://token-sandbox.dev.clover.com/v1/tokens \
--data '
"card": {
"brand": "VISA",
"number": "4242424242424242",
"exp_month": "12",
"exp_year": "28",
"cvv": "222",
"first6": "424242",
"last4": "4242"
'
"id": "clv_1TSTSmK3B56n9RZDXJnjitGF",
"object": "token",
"card": {
"exp_month": "12",
"exp_year": "2028",
"first6": "424242",
"last4": "4242",
"brand": "VISA"
3
--url https://sandbox.dev.clover.com/v3/merchants/JTM5GB79NN2B1/customers \
--data '
"cards": [
"first6": "424242",
"last4": "4242",
"token": "clv_1TSTSmK3B56n9RZDXJnjitGF",
"tokenType": "CTOKEN"
],
"firstName": "FirstC1",
"lastName": "LastC1",
"emailAddresses": [
"emailAddress": "[email protected]"
],
"phoneNumbers": [
"phoneNumber": "+923334568821"
}
4
'
"href": "https://sandbox.dev.clover.com/v3/merchants/JTM5GB79NN2B1/customers/
T429GDYEQW7X4",
"id": "T429GDYEQW7X4",
"firstName": "FirstC1",
"lastName": "LastC1",
"marketingAllowed": false,
"customerSince": 1698219751000,
"metadata": {}
--url https://sandbox.dev.clover.com/v3/merchants/JTM5GB79NN2B1/atomic_order/orders \
--data '
"orderCart": {
"orderType": {
"taxable": "false",
"isDefault": "false",
"filterCategories": "false",
"isHidden": "false",
"isDeleted": "false",
"id": "RJ8K80W9QS6HR",
"labelKey": "com.clover.order.type.dine_in",
},
"merchant": {
"id": "JTM5GB79NN2B1"
},
"groupLineItems": "false",
"currency": "USD",
"lineItems": [
"item": {
"id": "RV3J2CBNA2582"
},
"printed": "false",
"exchanged": "false",
"refunded": "false",
"refund": {
"transactionInfo": {
"isTokenBasedTx": "false",
"emergencyFlag": "false"
},
"isRevenue": "false",
"id": "RV3J2CBNA2582",
"modifications": [
"modifier": {
"available": "true",
"price": "0",
"modifierGroup": {
"id": "Y0E3RJF11H0SC"
6
},
"id": "Q6PW21RDDY4VW"
},
"id": "Q6PW21RDDY4VW",
"amount": 150
},
"modifier": {
"available": "true",
"price": "0",
"id": "Y0E3RJF11H0SC"
},
"id": "Y0E3RJF11H0SC",
"name": "Double",
"amount": 500
'
"href": "https://sandbox.dev.clover.com/v3/merchants/JTM5GB79NN2B1/orders/
0E1SDRMHRTG24",
"id": "0E1SDRMHRTG24",
"currency": "USD",
7
"employee": {
"href": "https://sandbox.dev.clover.com/v3/merchants/JTM5GB79NN2B1/employees/
M2MCFTG7EHS4W",
"id": "M2MCFTG7EHS4W",
"customId": "",
"role": "ADMIN",
"orders": {
"href": "https://sandbox.dev.clover.com/v3/merchants/JTM5GB79NN2B1/employees/
M2MCFTG7EHS4W/orders"
},
"total": 1301,
"orderType": {
"id": "RJ8K80W9QS6HR",
"labelKey": "com.clover.order.type.dine_in",
"taxable": true,
"isDefault": false,
"filterCategories": false,
"isHidden": false,
"fee": 0,
"minOrderAmount": 0,
"maxOrderAmount": 0,
"maxRadius": 0,
"avgOrderTime": 0,
"hoursAvailable": "BUSINESS",
"isDeleted": false,
"systemOrderTypeId": "DINE-IN-TYPE"
8
},
"taxRemoved": false,
"isVat": false,
"state": "OPEN",
"manualTransaction": false,
"groupLineItems": false,
"testMode": false,
"createdTime": 1698219254000,
"clientCreatedTime": 1698219254000,
"modifiedTime": 1698219253000,
"lineItems": {
"elements": [{
"id": "C1A2ZK8K9TJQA",
"orderRef": {
"id": "0E1SDRMHRTG24"
},
"item": {
"id": "RV3J2CBNA2582"
},
"alternateName": "",
"price": 525,
"itemCode": "",
"printed": false,
"createdTime": 1698219254000,
"orderClientCreatedTime": 1698219254000,
"exchanged": false,
"modifications": {
"elements": [{
"id": "3K7X308A7ZZ0Y",
"lineItemRef": {
9
"id": "C1A2ZK8K9TJQA"
},
"amount": 150,
"modifier": {
"id": "Q6PW21RDDY4VW"
}, {
"id": "TN8238NFK8Q6R",
"lineItemRef": {
"id": "C1A2ZK8K9TJQA"
},
"name": "Double",
"amount": 500,
"modifier": {
"id": "Y0E3RJF11H0SC"
}]
},
"refunded": false,
"isRevenue": true,
"taxRates": {
"elements": [{
"id": "JHBP9ZYTZSPQM",
"lineItemRef": {
"id": "C1A2ZK8K9TJQA"
},
"rate": 675000,
"isDefault": true
}, {
10
"id": "F6V5KC4HEYH0G",
"lineItemRef": {
"id": "C1A2ZK8K9TJQA"
},
"rate": 399000,
"isDefault": true
}]
}]
--url https://scl-sandbox.dev.clover.com/v1/orders/0E1SDRMHRTG24/pay \
--data '
"ecomind": "ecom",
"customer": "T429GDYEQW7X4",
"email": "[email protected]",
"amount": 1301,
"currency": "USD"
'
11
"id": "0E1SDRMHRTG24",
"object": "order",
"amount": 1301,
"tax_amount": 126,
"amount_paid": 1301,
"tax_amount_paid": 126,
"currency": "USD",
"charge": "DCXG54WZ3JRRR",
"warning_message": "Subsequent credential on file pay request sent for without Initial credential
on file pay request.",
"created": 1698219254000,
"customer": "T429GDYEQW7X4",
"email": "[email protected]",
"ref_num": "329800500120",
"auth_code": "OK9479",
"items": [
"parent": "RV3J2CBNA2582",
"inventory_id": "RV3J2CBNA2582",
"amount": 525,
"tax_rates": [
"rate": 675000
},
"rate": 399000
],
"source": {
"brand": "VISA",
"exp_month": "12",
"exp_year": "2028",
"first6": "424242",
"last4": "4242"
},
"status": "paid",
"status_transitions": {
"paid": 1698219781465
},
"ecomind": "ecom"