Timestamps
Two formats. Both are real, and they differ.
| Where | Format | Example |
|---|---|---|
Order placed_at, updated_at | UTC, no offset | 2026-11-18T09:14:22Z |
Webhook settled_at | RFC 3339 with offset | 2026-11-18T09:14:37+01:00 |
Both are valid RFC 3339, so a real parser handles either:
new Date('2026-11-18T09:14:22Z') // fine
new Date('2026-11-18T09:14:37+01:00') // finefrom datetime import datetime
datetime.fromisoformat("2026-11-18T09:14:22Z")
datetime.fromisoformat("2026-11-18T09:14:37+01:00")new DateTimeImmutable('2026-11-18T09:14:22Z');
new DateTimeImmutable('2026-11-18T09:14:37+01:00');Warning
Do not parse these with a fixed format string. A pattern written for
Y-m-d\TH:i:s\Z reads the order fields and throws on the webhook, and a
pattern written for the offset form does the reverse. This bites at the worst
moment, in a webhook handler, where the exception is invisible to you and
looks to us like a failed delivery.
Go's time.RFC3339 and Java's OffsetDateTime.parse both read either form.
Everything is UTC
The offset you see on settled_at is a presentation detail. Store timestamps in
UTC, convert when you show them, and compare them as instants rather than as
strings. Two of these strings can represent the same moment and not be equal
character for character.
For signature freshness
The t in X-GetElectric-Signature is plain Unix seconds, not either format
above. Compare it with your own clock as a number. See
Verifying a signature.
Order of events
placed_at is when we claimed your reference. updated_at moves as the order
progresses, and equals placed_at on an order that settled instantly.
settled_at on the webhook is when it reached a terminal state.
A webhook can reach you before the POST /reseller/orders response does, for an
order that settles very fast, so do not rely on settled_at being later than
anything you recorded locally. Write your own row before you send the order.