Download the PHP package nicxonsolutions/rajaongkir without Composer

On this page you can find all versions of the php package nicxonsolutions/rajaongkir. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package rajaongkir

RajaOngkir Komerce API for Laravel

Laravel package for the latest RajaOngkir Komerce API, including the current 2026 RajaOngkir API endpoints for destination lookup, shipping cost calculation, district-level shipping costs, and AWB tracking.

This package provides a Laravel-native API client, facade, optional API routes, courier metadata, and helpers for domestic and international shipping workflows.

Built and maintained by PT. Nicxon International Solutions.

Table of Contents

Why This Package Exists

RajaOngkir is widely used in Indonesian ecommerce, but the Laravel ecosystem has lacked an up-to-date package for the current RajaOngkir Komerce API. RajaOngkir itself does not provide an official Laravel package, and many existing community packages target older API versions or outdated endpoint structures.

I at PT. Nicxon International Solutions created this package to fill that gap: a production-ready Laravel integration for the modern RajaOngkir Komerce API, with support for the latest destination hierarchy, domestic and international rates, district-level shipping cost calculation, and package tracking.

All rights reserved by PT. Nicxon International Solutions.

Requirements

Installation

Install the package with Composer:

Publish the configuration file:

Add your RajaOngkir credentials and defaults to .env:

Clear cached config when deploying or changing environment values:

Configuration

The published config file is available at config/rajaongkir.php.

Important options:

Supported sort_shipping values:

Enabled couriers and services are configured in selected_couriers.

Basic Usage

Use the facade when calling methods statically:

Make sure you import Nicxonsolutions\Rajaongkir\Facades\Rajaongkir for static-style calls. If you import Nicxonsolutions\Rajaongkir\Rajaongkir, use dependency injection instead.

Or inject the service:

Search Destinations

Search-Based Lookup

Domestic destination search:

Example response item:

International destination search:

Province, City, District, and Sub-District Lookup

You can also use the structured Indonesian location hierarchy endpoints.

Get all provinces:

Get one province by province ID:

Get cities by province ID:

Get one city by province ID and city ID:

If you only have the city ID, you can search all provinces:

Get districts by city ID:

Get one district by city ID and district ID:

Get sub-districts by district ID:

Get one sub-district by district ID and sub-district ID:

The package normalizes each item with common keys:

Calculate Shipping Costs

Domestic rates:

International rates:

District-level domestic rates:

Example parsed rate:

The calculation methods return:

Track Shipments

Track a shipment by AWB number and courier:

Some couriers require the last 5 digits of the recipient phone number for validation, including JNE:

The API response contains shipment summary, details, delivery status, and manifest history when available:

Checkout Quote Helper

For application carts, you can use quote() and pass the cart weight plus destination data:

You may override default origin or request parameters:

Optional API Routes

Package routes are disabled by default. Enable them in .env:

Available routes:

Cost request body:

District domestic cost requests use the same body shape, but origin and destination should be district IDs.

Tracking request body:

last_phone_number is optional for the package request, but certain couriers may require it.

API Key Validation

You can perform a simple API key check:

This performs a small domestic destination search request.

Error Handling

The package throws Nicxonsolutions\Rajaongkir\Exceptions\RajaongkirException for missing configuration, invalid parameters, or API errors.

Courier Metadata

Courier and service metadata is stored in config/couriers.php. The package includes domestic and international services ported from the original WooCommerce plugin.

Get available couriers:

Use courier() when you want to fetch all couriers, one courier, or couriers matching a service code:

When the filter matches a courier code, response code, or courier label, one courier is returned. When the filter matches a service code or service label, matching couriers are returned with a matched_services key.

Production Notes

License

GPL-2.0-or-later.

Copyright (c) PT. Nicxon International Solutions. All rights reserved.

Support


All versions of rajaongkir with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/http Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/routing Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/session Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/view Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nicxonsolutions/rajaongkir contains the following files

Loading the files please wait ...