You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/CloudDeviceApi.md
+25-5Lines changed: 25 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ New features and products will be released exclusively on the Cloud device API
20
20
21
21
### Setup
22
22
23
-
First you must initialise the Client **setting the closest**[Region](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/#cloud):
23
+
First you must initialise the Client (see an example on TEST):
Copy file name to clipboardExpand all lines: doc/MigratingToCloudDeviceApi.md
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,6 @@ The Terminal (Cloud) API (`TerminalCloudAPI`) was built manually with hand-craft
8
8
9
9
Because the Cloud device API models are generated from the spec rather than hand-crafted, there are differences in class names, enum naming conventions, field types, and accessor methods. This guide describes these differences and what to be aware of when adopting the Cloud device API.
10
10
11
-
### Who should migrate?
12
-
13
-
-**New integrations**: use the Cloud device API from the start. See the [Cloud device API documentation](CloudDeviceApi.md).
14
-
-**Updating your cloud integration**: you should consider migrating to the Cloud device API to benefit from the improvements listed below.
15
-
-**Not making changes**: you can continue using the Terminal (Cloud) API. It remains functional, but you will miss out on the benefits of the Cloud device API.
16
-
17
11
## Benefits of the Cloud device API
18
12
19
13
The Cloud device API introduces several improvements over the Terminal (Cloud) API:
@@ -23,6 +17,13 @@ The Cloud device API introduces several improvements over the Terminal (Cloud) A
23
17
-**Improved security**: supports OAuth authentication alongside API key authentication.
24
18
-**Device management endpoints**: query connected devices and check their status directly from your integration.
25
19
-**New features**: future In-Person Payments features and products will be released exclusively on the Cloud device API.
20
+
21
+
### Who should migrate?
22
+
23
+
-**New integrations**: use the Cloud device API from the start. See the [Cloud device API documentation](CloudDeviceApi.md).
24
+
-**Updating your cloud integration**: you should consider migrating to the Cloud device API to benefit from the improvements listed below.
25
+
-**Not making changes**: you can continue using the Terminal (Cloud) API. It remains functional, but you will miss out on the benefits of the Cloud device API.
26
+
26
27
-**Generated from the OpenAPI specification**: unlike the hand-crafted Terminal (Cloud) API models, the Cloud device API is auto-generated from the [Adyen OpenAPI spec](https://github.com/Adyen/adyen-openapi). This brings consistency with every other service in the library (Checkout, Management, Transfers, etc.), ensures the models stay in sync with the API, and provides built-in `fromJson()`/`toJson()` serialization, fluent setters, and Jackson support out of the box.
27
28
28
29
## Key differences
@@ -128,6 +129,9 @@ Some field types differ in the generated models.
128
129
129
130
The most common change. The Cloud device API models use `java.time.OffsetDateTime` for timestamp fields, whereas the Terminal (Cloud) API models use `XMLGregorianCalendar`.
130
131
132
+
The key difference is how each type handles timezone information. `XMLGregorianCalendar` allows an undefined timezone: when constructed from `new GregorianCalendar()` without an explicit timezone, it inherits the JVM default.
133
+
This means the same wall-clock time (e.g. 14:30:00) could be serialized as `14:30:00+01:00` on a server in Amsterdam or `14:30:00-05:00` on one in New York — two different points in time. `OffsetDateTime` always carries an explicit offset, so `OffsetDateTime.now(ZoneOffset.UTC)` always serializes as `2025-01-15T14:30:00Z`, unambiguously.
Some date fields (e.g. `Instalment.firstPaymentDate`) use `java.time.LocalDate` in the Cloud device API instead of `String`.
151
155
156
+
`LocalDate` has no timezone or offset information — it represents a calendar date only (year, month, day). When the library serializes a `LocalDate`, it uses the date as-is without any timezone conversion.
157
+
This means the date sent to the API is whatever date your system clock shows in its local timezone. If your server runs in a timezone that is behind UTC and the transaction happens near midnight UTC, the local date may be one day behind.
158
+
**Ensure the system timezone is set correctly and consistently across all environments where the SDK runs.**
0 commit comments