Skip to content
Ongkir SDK screenshot
Engineering·
  • TypeScript
  • Bun
  • Hono
  • Biome
  • Changesets

Ongkir SDK

Unofficial multi-provider TypeScript SDK for Indonesia shipping rates & tracking — Biteship, Komerce (RajaOngkir), Shipper — one ShippingProvider contract, bring-your-own-key, runtime-agnostic.

About this project

Built a monorepo where @ongkir-sdk/core defines the ShippingProvider contract, normalized types, ShippingSDKError, a region resolver backed by api-wilayah-indonesia, and a shared contract test suite. Provider adapters (@ongkir-sdk/biteship, @ongkir-sdk/komerce) implement the same interface and must pass the same contract tests — guaranteeing drop-in swapability. @ongkir-sdk/hono exposes providers as REST routes (rates, tracking, webhooks, createShipment). Designed to be runtime-agnostic across Bun, Node, Deno, and Workers, published to npm with changesets and CI.

Published 4 npm packages — @ongkir-sdk/core, biteship, komerce, and hono. v1 covers read-only rates and tracking; v2 adds createShipment (Biteship creates real orders, Komerce throws CREATE_SHIPMENT_NOT_SUPPORTED per tier limits). Both adapters pass the same contract test suite, and the Hono middleware exposes the whole flow as REST endpoints.

More Work