kodepintar/laravel-rajaongkir
A Laravel wrapper for the RajaOngkir API that makes it easy to look up Indonesian provinces, cities, districts, and shipping costs from couriers like JNE, TIKI, and POS, with simple configuration and a clean, expressive interface for your app.
Checkout shipping price & ETA display (the core use case). RajaOngkir returns domestic shipping cost by origin, destination, weight, and courier — which is exactly the input needed to show a real shipping fee and estimated delivery window at checkout instead of a flat rate or a post-purchase surprise. This is a conversion lever, not just an integration task.
Address capture. Province/city/district lookup lets us ship a cascading Indonesian address form instead of free-text fields, which reduces failed deliveries and CS cleanup.
Build vs buy on logistics data. The decision is really "RajaOngkir aggregator vs direct courier contracts (JNE, J&T, SiCepat, etc.)." This package makes the aggregator path cost roughly days of engineering, so the defensible sequencing is: buy now to validate Indonesian demand, revisit direct contracts only once volume earns contracted rates. Treat the package as the cheap option that keeps the exit door open, not a permanent architecture bet.
Promotion and margin modeling. Free-shipping thresholds, shipping subsidies, and per-destination COGS all require knowing the actual cost before you commit to a promo. Having a working rate lookup in-app turns those from guesses into numbers.
Roadmap sequencing for an Indonesia launch. Multi-warehouse origin selection, courier preference (cheapest vs fastest), and COD availability all hang off this data. Deciding which of those is v1 vs v2 depends on how cheap the rate lookup is to obtain — this package makes it cheap.
Internal ops. CS quoting, manual order entry, and warehouse routing tooling can reuse the same lookup.
Decision-quality caveat: 7 stars and a last release of September 2022 mean this is a commodity adapter with effectively no community. The PM decision it most informs is "how much of our differentiation do we want to invest here?" Answer: none. Buy the commodity, own the interface.
Adopt when:
ShippingRateProvider) so couriers or providers can be swapped later.Look elsewhere when:
Non-negotiable adoption conditions: pin ^3.0.4 (release 3.0.4 fixed POST payloads not being transmitted — versions 3.0.0–3.0.3 can silently return a plausible-looking response with an empty request body upstream), and ship a regression test that asserts the request body, not just the HTTP status.
For executives: This is a commodity capability we can have working in days, not a build project. It gives customers an accurate shipping cost and delivery estimate at checkout — the single most common reason Indonesian carts are abandoned — and removes a recurring CS ticket category ("how much is shipping to my city?"). Cost is one Composer dependency plus a RajaOngkir account; engineering effort is roughly one to two days including tests. The risk is not money, it's maintenance: the package is small, single-maintainer, and hasn't been released since 2022. We mitigate that by wrapping it in our own interface so we can replace it or call the API directly without touching product code. Recommendation: adopt for launch, revisit when order volume justifies direct courier contracts.
For engineering: Thin wrapper over the RajaOngkir HTTP API, installed via Composer with a published config and .env credentials. Two hard requirements: pin ^3.0.4 and verify it in CI (earlier 3.x releases dropped POST bodies silently), and hide it behind a ShippingRateProvider interface with a contract test that fails on an empty outbound payload. Move lookups into queued jobs with retries and cache aggressively — province/city data is near-static, and rate calls should be cached per origin/destination/weight band. Run config:clear after credential changes; stale config looks identical to a payload bug. Budget a senior reviewer for the initial integration and name an owner for the dependency.
How can I help you explore Laravel packages today?