Skip to main content
EasyPost is a shipping API that abstracts the complexity of multiple carriers (USPS, UPS, FedEx, and more) behind a single integration. Droplinked uses it within the ShippingModule for:
  • Address verification
  • Parcel creation
  • Shipment creation and rate retrieval
  • Purchasing shipping labels
  • Tracking shipments

Configuration

EASY_POST_API_KEY=...
VarNotes
EASY_POST_API_KEYPrivate API key from your EasyPost dashboard. Authenticates every request
EASY_POST_API_KEY is sensitive and stored server-side only. Never expose it to the client.

Client initialization

The EasyPostShippingService initializes the client in its constructor using the @easypost/api library:
this.easyPost = new EasyPostClient(apiKey, { timeout: 120000 });

Reference docs

API surface

Address creation

Fields sent:
  • street1, street2
  • city, state, zip
  • country
  • company, phone, email

Shipment creation

Fields sent:
  • to_address — destination address ID
  • from_address — origin address ID
  • parcel — parcel ID
  • customs_info — required for international shipments (contents type, etc.)
Returned:
  • id — shipment ID
  • rates[] — array of available rates, each with id, carrier, service, rate, delivery_days

Buying a shipment

Fields sent:
  • shipment_id — the shipment to buy
  • rate{ id: rate_id }, the specific rate selected
Returned:
  • tracking_code — tracking number
  • postage_label — URL to the shipping label image (PNG/PDF)
  • status — current status (pre_transit, in_transit, delivered, …)

What we store

FieldWhy
shipment_idReference the shipment later
tracking_codeLet customers track their package
label_urlRe-print the label on demand
carrier & serviceRecord-keeping and analytics

Flow diagram

Security notes

1

API key protection

EASY_POST_API_KEY is server-only and stored in your secrets manager. Never inlined in client code or build output.
2

Address verification

EasyPost address verification runs before buying labels — reduces failed deliveries.

Troubleshooting

SymptomLikely causeFix
Service unavailableEasyPost API down or timing outClient uses a 120s timeout; retry the request
Rate not foundrate_id invalid or expiredRefresh rates by creating a new shipment and selecting a fresh rate
Empty availableShipping on a US→US physical-only cartProduct mis-routed to a non-EasyPost strategySee Checkout stability — known regression