|
1 | 1 | # Cloud Device API |
2 | 2 |
|
3 | | -The [Cloud Device API](https://docs.adyen.com/api-explorer/cloud-device-api/1/overview) is our solution to create best-in-class In-person Payments integrations. |
| 3 | +The [Cloud Device API](https://docs.adyen.com/api-explorer/cloud-device-api/1/overview) is our solution to create best-in-class in-person payments integrations. |
4 | 4 |
|
5 | 5 | With the Cloud device API you can: |
6 | 6 |
|
7 | | -- Send Terminal API requests to a cloud endpoint. You can use this communication method when it is not an option to send Terminal API requests over your local network directly to a payment terminal. |
8 | | -- Check the cloud connection of a payment terminal or of a device used in a Mobile solution for in-person payments. |
| 7 | +- send Terminal API requests to a cloud endpoint. You can use this communication method when it is not an option to send Terminal API requests over your local network directly to a payment terminal. |
| 8 | +- check the cloud connection of a payment terminal or of a device used in a Mobile solution for in-person payments. |
9 | 9 |
|
10 | 10 | ## Benefits of the Cloud Device API |
11 | 11 |
|
@@ -38,7 +38,7 @@ const client = new Client(config); |
38 | 38 | const cloudDeviceAPI = new CloudDeviceAPI(client); |
39 | 39 | ``` |
40 | 40 |
|
41 | | -### Send a payment request |
| 41 | +### Send a payment SYNC request |
42 | 42 |
|
43 | 43 | ```javascript |
44 | 44 |
|
@@ -100,7 +100,7 @@ const response = await cloudDeviceAPI.sendSync( |
100 | 100 |
|
101 | 101 | ### Send a payment ASYNC request |
102 | 102 |
|
103 | | -If you choose to receive the response asynchronously, you only need to use a different method (`sendAsync()`). |
| 103 | +If you choose to receive the response asynchronously, you only need to use a different method (`sendAsync`). |
104 | 104 | Don't forget to set up [event notifications](https://docs.adyen.com/point-of-sale/design-your-integration/notifications/event-notifications/) in the CA to be able to receive the Cloud Device API responses. |
105 | 105 |
|
106 | 106 | ```javascript |
@@ -149,7 +149,7 @@ console.log(deviceStatus.status); |
149 | 149 |
|
150 | 150 | ### Error handling |
151 | 151 |
|
152 | | -In case of error try-catch the `CloudDeviceApiError` to understand what went wrong. |
| 152 | +In case of error, you can try-catch the `CloudDeviceApiError` to understand what went wrong. |
153 | 153 |
|
154 | 154 | ```javascript |
155 | 155 | try { |
@@ -177,11 +177,12 @@ const encryptionCredentialDetails: EncryptionCredentialDetails = { |
177 | 177 | Passphrase: "myPassphrase" |
178 | 178 | }; |
179 | 179 |
|
180 | | -const response: CloudDeviceApiResponse = await cloudDeviceAPI.sendEncryptedSync("YOUR_MERCHANT_ACCOUNT", "V400m-123456789", cloudDeviceApiRequest, encryptionCredentialDetails); |
| 180 | +const response: CloudDeviceApiResponse = await cloudDeviceAPI.sendEncryptedSync( |
| 181 | + "YOUR_MERCHANT_ACCOUNT", "V400m-123456789", cloudDeviceApiRequest, encryptionCredentialDetails); |
181 | 182 | console.log("response:", response); |
182 | 183 | ``` |
183 | 184 |
|
184 | | -In case of asynchronous integration, you can decrypt the payload of the event notification using `decryptNotification()` method. |
| 185 | +In case of asynchronous integration, you can decrypt the payload of the event notifications using `decryptNotification()` method. |
185 | 186 |
|
186 | 187 | ```javascript |
187 | 188 |
|
|
0 commit comments