GoatLabels

Updated

Signed events, not polling loops.

Webhook recipes: verify, deduplicate, act


A webhook turns shipping events into code you don't poll for: verify the signature, deduplicate by event id, then act. The highest-value recipe is the adjustment event — a post-shipment charge lands as a payload carrying the wallet delta, so your books update when the carrier rebills, not at month end.

Events from every carrier lifecycle

The events your consumer receives are the same shapes for USPS, UPS and FedEx on every domestic parcel, and DHL on international lanes: one integration covers them all.

UPS FedEx DHL USPS all four
Verify first Reject before parsing.
Dedupe by id One indexed column.
Then act Idempotent side effects.

The adjustment event carries the wallet delta

A post-shipment carrier rebill lands as its own record with the signed change to your prepaid balance — the payload your bookkeeping wants.

VisaMastercardAmerican ExpressDiscover
Own ledger entry Never a mystery charge.
Signed delta Books update on arrival.
Replay-safe Duplicates post once.

Free account. No card needed.

Free and Pro side by side. Label prices are the same on both plans. From /pricing, prices checked November 5, 2026.
FreePro
Price $0 a month$40 a month, or $384 a year billed up front. No commitment period on monthly billing
Shipments per month 50Unlimited
API calls Unlimited, up to 300 a minuteUnlimited, up to 300 a minute
Address validation 100 a monthUnlimited
Billy on Telegram Not includedIncluded
PrintNode auto-print Not includedIncluded
Operations hub Not includedIncluded
Label prices Same as ProSame as Free

How do I verify and deduplicate shipping webhooks?

Every recipe on this page sits on the same three-step spine, and the order is not negotiable. Verify the signature first, on the raw request body, before any parsing happens — an unsigned or badly signed request is not a shipping event, it is arbitrary input from the internet addressed to an endpoint that can move state in your systems. GoatLabels webhooks are signed for exactly this reason. Compare the computed signature to the received one in constant time, and treat verification failure as a hard reject, not a log line. The precise header names and algorithm belong to the API contract, so read them from the API docs rather than hard-coding what a tutorial — including this one — remembers them to be.

Second habit: deduplicate by event id. Deliveries can arrive more than once — a timeout on your side followed by a retry is the everyday case — so the consumer records each event id it has processed and drops repeats on arrival. One table, one unique index, one existence check. Third habit: make the action itself idempotent anyway. Set the order's state to fulfilled rather than toggling it; upsert the accounting entry keyed on the event id rather than appending blindly. Belt and braces, because the one duplicate that matters is the one that arrives the week your dedupe table was being migrated.

How do I post carrier adjustments to my books automatically?

This is the highest-value consumer most sellers never build. A carrier that reweighs or remeasures a parcel after acceptance bills the difference later — what those rebills are, how each carrier detects them, and how to dispute one is the carrier billing adjustments page's territory. What matters here is the shape of the moment: money left your business days or weeks after the sale it belongs to, and in most bookkeeping setups nobody finds out until month end, when the wallet history and the ledger disagree by a number no one can explain.

The recipe closes that gap to minutes. GoatLabels posts each adjustment as its own record, and the shipment.adjustment.created event delivers it to your endpoint carrying the wallet delta — the signed amount by which your prepaid balance actually changed. The consumer verifies, dedupes, then writes one accounting entry: the delta against your postage cost account, keyed to the original order so the order's true margin updates too. Book it on the date the event arrived, because that is when the money moved.

How do I mark orders fulfilled when a label is bought?

The second recipe kills the copy-paste step between buying a label and telling everything else about it. When a label purchase event arrives, the consumer looks up the order by your own reference, writes the tracking number and carrier onto it, and moves it to fulfilled — the same three edits a person makes by hand, minus the person. Because the write is an upsert keyed on the shipment, a retried delivery re-applies the same state instead of appending a second tracking number, which is the difference between an idempotent consumer and a support ticket.

What you should not rebuild is the buyer-facing half. GoatLabels can send branded tracking emails, which are off until you switch them on, and hosts a tracking page per shipment with your logo and colors, so the consumer's job is internal state — your order system, your warehouse queue, your support tool's timeline — not re-notifying the buyer. Where this pattern earns its keep is volume: a store syncing hundreds of orders a day cannot afford a human between the label printer and the order system, and an event-driven consumer is how the two stay agreed without one.

How do I build a webhook consumer that survives outages?

The uncomfortable truth about any webhook integration — every provider, not just this one — is that your endpoint will eventually be down while something important happens. Deploys, expired certificates, a cloud region having a bad afternoon. Two design rules make that survivable. First, acknowledge fast: accept the verified event, queue it durably, and return success in milliseconds, doing the slow work — database writes, third-party calls — off the request path, so your own latency never turns a healthy delivery into a retry storm.

Second, reconcile: run a periodic job that lists recent shipments and adjustments over the REST API and repairs anything your event log missed. Calls are unlimited on every plan, so the backstop poll costs nothing but the cron entry, and the delivery and retry contract itself is documented in the API docs — build against that, not against assumptions. Webhooks for freshness, reconciliation for certainty is the architecture that survives an outage without a human replaying anything by hand. It is also, not coincidentally, the pattern that makes switching costs low: consumers built this way are what API developers comparing platforms and teams pricing per-call APIs port with little rework.

Shipping webhooks, answered

How do I verify a webhook signature?
Compute the expected signature over the raw request body using the endpoint's shared secret, compare it to the signature header with a constant-time comparison, and reject anything that fails before you parse a single byte of JSON. The exact header name and algorithm are part of the API contract, so take them from the API docs rather than from a blog post — including this one.
What happens if my endpoint is down when an event fires?
Design as if any individual delivery can be late or lost, whatever the delivery contract promises: deliveries can be replayed once the endpoint is back, with the delivery, retry, and replay mechanics documented in the API docs, and the durable backstop is reconciliation — a periodic job that lists recent shipments and adjustments over the REST API and fills any gap in your local state. Unlimited API calls mean the backstop costs you engineering time only, not a metered bill.
How do I handle duplicate webhook deliveries?
Record each event's unique id when you process it, and drop any delivery whose id you have already seen — one indexed column and one existence check. Pair that with idempotent side effects, so that even a duplicate that slips past the check re-applies the same state instead of double-posting an accounting entry or double-notifying a buyer.
What does the adjustment webhook payload contain?
The shipment.adjustment.created event identifies the adjusted shipment and carries the adjustment record itself, including the wallet delta — the signed amount by which your prepaid balance changed. The current field-by-field schema lives in the API docs. What an adjustment is and how to dispute one is a separate question, answered on the carrier billing adjustments page.
Can I automate without webhooks by polling the API?
Yes. Every record a webhook announces is also readable over the REST API, and calls are unlimited on every plan, so a cron job that lists recent shipments and adjustments is a legitimate architecture — simpler to operate, at the cost of latency. Most consumers land on both: webhooks for freshness, a reconciliation poll for certainty.

Related: the shipping API for developers, carrier billing adjustments, and bookkeeping for shipping costs.

Unlimited API calls. Signed events. Every plan.

Stop polling for shipping state.
Start consuming it.

Verify, deduplicate, act: point an endpoint at your shipping events, wire the adjustment delta into your books, and let the reconciliation poll sleep unless something breaks.

Free account. No card needed.