PHPackages                             tringuyenduc2903/goshipvietnam-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. tringuyenduc2903/goshipvietnam-laravel

ActiveLibrary

tringuyenduc2903/goshipvietnam-laravel
======================================

GoShip SDK for Laravel framework (Only Vietnam Support)

v1.0.2(8mo ago)017[2 PRs](https://github.com/tringuyenduc2903/GoShipVietNam-Laravel/pulls)MITPHPPHP ^8.3CI passing

Since Aug 16Pushed 1mo agoCompare

[ Source](https://github.com/tringuyenduc2903/GoShipVietNam-Laravel)[ Packagist](https://packagist.org/packages/tringuyenduc2903/goshipvietnam-laravel)[ Docs](https://github.com/tringuyenduc2903/goshipvietnam-laravel)[ GitHub Sponsors]()[ RSS](/packages/tringuyenduc2903-goshipvietnam-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (15)Versions (7)Used By (0)

GoShip SDK for Laravel framework (Only Vietnam Support)
=======================================================

[](#goship-sdk-for-laravel-framework-only-vietnam-support)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9e2de9dc6ae4694f2a4426ffd2ff2516141dfeb49f2faabe4cc4e5e0e1ffbc03/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7472696e677579656e647563323930332f676f73686970766965746e616d2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tringuyenduc2903/goshipvietnam-laravel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/82aad9fb9f506a35f6396fbcfdc77bc6579b4e00c77615360d51bdd608ea8041/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7472696e677579656e647563323930332f676f73686970766965746e616d2d6c61726176656c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/tringuyenduc2903/goshipvietnam-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/62f278be403416087009bc0777d33a582e490eeab0aed719fe594a8cc663d33d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7472696e677579656e647563323930332f676f73686970766965746e616d2d6c61726176656c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/tringuyenduc2903/goshipvietnam-laravel/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/a8e6a56fe188ff0936c230be43684cd35b8df471d2147f7bd398ae73e4625217/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7472696e677579656e647563323930332f676f73686970766965746e616d2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tringuyenduc2903/goshipvietnam-laravel)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require tringuyenduc2903/goshipvietnam-laravel
```

You can publish the config file with:

```
php artisan vendor:publish --tag="goshipvietnam-config"
```

This is the contents of the published config file:

```
return [
    'url' => env('GOSHIP_API_URL', 'https://api.goship.io'),
    'jwt' => env('GOSHIP_JWT', ''),
    'username' => env('GOSHIP_USERNAME', ''),
    'password' => env('GOSHIP_PASSWORD', ''),
    'client_id' => env('GOSHIP_CLIENT_ID', ''),
    'client_secret' => env('GOSHIP_CLIENT_SECRET', ''),
];
```

#### Giải thích

[](#giải-thích)

- **url**: Môi trường phát triển tích hợp (**Sandbox**: , **Production**: )
- **jwt**: Access Token (Sử dụng cho Phương thức *[Lấy Access Token trực tiếp](https://doc.goship.io/getting-started/installation#_1-l%E1%BA%A5y-access-token-tr%E1%BB%B1c-ti%E1%BA%BFp)*)
- **username**: Email (Sử dụng cho Phương thức *[Sử dụng tài khoản developer](https://doc.goship.io/getting-started/installation#_2-s%E1%BB%AD-d%E1%BB%A5ng-t%C3%A0i-kho%E1%BA%A3n-developer)*)
- **password**: Mật khẩu (Sử dụng cho Phương thức *[Sử dụng tài khoản developer](https://doc.goship.io/getting-started/installation#_2-s%E1%BB%AD-d%E1%BB%A5ng-t%C3%A0i-kho%E1%BA%A3n-developer)*)
- **client\_id**: Client ID (Sử dụng cho Phương thức *[Sử dụng tài khoản developer](https://doc.goship.io/getting-started/installation#_2-s%E1%BB%AD-d%E1%BB%A5ng-t%C3%A0i-kho%E1%BA%A3n-developer)*)
- **client\_secret**: Client secret (Sử dụng cho *[Xác thực webhook](https://doc.goship.io/api/shipment/webhooks#x%C3%A1c-th%E1%BB%B1c-webhook)* và Phương thức *[Sử dụng tài khoản developer](https://doc.goship.io/getting-started/installation#_2-s%E1%BB%AD-d%E1%BB%A5ng-t%C3%A0i-kho%E1%BA%A3n-developer)*)

#### File .env:

[](#file-env)

- Đối với *[Lấy Access Token trực tiếp](https://doc.goship.io/getting-started/installation#_1-l%E1%BA%A5y-access-token-tr%E1%BB%B1c-ti%E1%BA%BFp)*:

```
GOSHIP_API_URL=https://api.goship.io/api/v2
GOSHIP_JWT=
GOSHIP_CLIENT_SECRET=
```

- Đối với *[Sử dụng tài khoản developer](https://doc.goship.io/getting-started/installation#_2-s%E1%BB%AD-d%E1%BB%A5ng-t%C3%A0i-kho%E1%BA%A3n-developer)*:

```
GOSHIP_API_URL=https://api.goship.io/api/v2
GOSHIP_USERNAME=
GOSHIP_PASSWORD=
GOSHIP_CLIENT_ID=
GOSHIP_CLIENT_SECRET=
```

Usage
-----

[](#usage)

### [Đăng nhập](https://doc.goship.io/getting-started/authentication#login)

[](#đăng-nhập)

```
use BeetechAsia\GoShip\Facades\GoShip;

$data = [
    'username' => config('goshipvietnam.username'),
    'password' => config('goshipvietnam.password'),
    'client_id' => config('goshipvietnam.client_id'),
    'client_secret' => config('goshipvietnam.client_secret'),
];
GoShip::login($data);
```

### [Lấy tất cả tỉnh/thành phố](https://doc.goship.io/api/shipment/city#l%E1%BA%A5y-t%E1%BA%A5t-c%E1%BA%A3-t%E1%BB%89nhth%C3%A0nh-ph%E1%BB%91)

[](#lấy-tất-cả-tỉnhthành-phố)

```
use BeetechAsia\GoShip\Facades\GoShip;

GoShip::getCities();
```

### [Lấy danh sách quận/huyện theo mã tỉnh/thành phố](https://doc.goship.io/api/shipment/city#l%E1%BA%A5y-danh-s%C3%A1ch-qu%E1%BA%ADnhuy%E1%BB%87n-theo-m%C3%A3-t%E1%BB%89nhth%C3%A0nh-ph%E1%BB%91)

[](#lấy-danh-sách-quậnhuyện-theo-mã-tỉnhthành-phố)

```
use BeetechAsia\GoShip\Facades\GoShip;

$cityId = 100000;
GoShip::getDistrictsByCityId($cityId);
```

### [Lấy danh sách quận/huyện](https://doc.goship.io/api/shipment/district#l%E1%BA%A5y-danh-s%C3%A1ch-qu%E1%BA%ADnhuy%E1%BB%87n)

[](#lấy-danh-sách-quậnhuyện)

```
use BeetechAsia\GoShip\Facades\GoShip;

GoShip::getDistricts();
```

### [Lấy tất cả phường/xã theo mã quận/huyện](https://doc.goship.io/api/shipment/district#l%E1%BA%A5y-t%E1%BA%A5t-c%E1%BA%A3-ph%C6%B0%E1%BB%9Dngx%C3%A3-theo-m%C3%A3-qu%E1%BA%ADnhuy%E1%BB%87n)

[](#lấy-tất-cả-phườngxã-theo-mã-quậnhuyện)

```
use BeetechAsia\GoShip\Facades\GoShip;

$districtId = 100100;
GoShip::getWardsByDistrictId($districtId);
```

### [Lấy danh sách khách hàng](https://doc.goship.io/api/shipment/customer#l%E1%BA%A5y-danh-s%C3%A1ch-kh%C3%A1ch-h%C3%A0ng)

[](#lấy-danh-sách-khách-hàng)

```
use BeetechAsia\GoShip\Facades\GoShip;

GoShip::getCustomers();
```

### [Tìm kiếm một khách hàng](https://doc.goship.io/api/shipment/customer#t%C3%ACm-ki%E1%BA%BFm-m%E1%BB%99t-kh%C3%A1ch-h%C3%A0ng)

[](#tìm-kiếm-một-khách-hàng)

```
use BeetechAsia\GoShip\Facades\GoShip;

$q = 'nguyenvana@gmail.com'; // q có thể nhận giá trị của các trường id, name, email hoặc phone.
GoShip::searchCustomer($q);
```

### [Tạo mới một khách hàng](https://doc.goship.io/api/shipment/customer#t%E1%BA%A1o-m%E1%BB%9Bi-m%E1%BB%99t-kh%C3%A1ch-h%C3%A0ng)

[](#tạo-mới-một-khách-hàng)

```
use BeetechAsia\GoShip\Facades\GoShip;

$data = [
    'name' => 'Trần Văn C',
    'email' => 'tranvanc@gmail.com', // Không bắt buộc
    'phone' => '0902001002',
    'address' => [
        'street' => '1102 Hàng Khay',
        'district' => '100100',
        'city' => '100000',
    ],
];
GoShip::createCustomer($data);
```

### [Cập nhật thông tin khách hàng](https://doc.goship.io/api/shipment/customer#c%E1%BA%ADp-nh%E1%BA%ADt-th%C3%B4ng-tin-kh%C3%A1ch-h%C3%A0ng)

[](#cập-nhật-thông-tin-khách-hàng)

```
use BeetechAsia\GoShip\Facades\GoShip;

$data = [
    'name' => 'Trần Văn C',
    'email' => 'tranvanc@gmail.com', // Không bắt buộc
    'phone' => '0902001002',
];
GoShip::updateCustomer($data);
```

### [Xóa thông tin khách hàng](https://doc.goship.io/api/shipment/customer#x%C3%B3a-th%C3%B4ng-tin-kh%C3%A1ch-h%C3%A0ng)

[](#xóa-thông-tin-khách-hàng)

```
use BeetechAsia\GoShip\Facades\GoShip;

$customerId = 'elpomgr8';
GoShip::deleteCustomer('elpomgr8');
```

### [Lấy biểu phí vận chuyển](https://doc.goship.io/api/shipment/rate)

[](#lấy-biểu-phí-vận-chuyển)

```
use BeetechAsia\GoShip\Facades\GoShip;

$data = [
    'shipment' => [
        'address_from' => [
            'district' => '100100',
            'city' => '100000',
        ],
        'address_to' => [
            'district' => '100100',
            'city' => '100000',
        ],
        'parcel' => [
            'cod' => 500000, // Không bắt buộc
            'amount' => 500000, // Không bắt buộc
            'width' => 10,
            'height' => 10,
            'length' => 10,
            'weight' => 750,
        ],
    ],
];
GoShip::getRates($data);
```

### [Danh sách Vận đơn](https://doc.goship.io/api/shipment/shipment#danh-s%C3%A1ch-v%E1%BA%ADn-%C4%91%C6%A1n)

[](#danh-sách-vận-đơn)

```
use BeetechAsia\GoShip\Facades\GoShip;

GoShip::getShipments();
```

### [Tìm kiếm Vận đơn](https://doc.goship.io/api/shipment/shipment#t%C3%ACm-ki%E1%BA%BFm-shipment)

[](#tìm-kiếm-vận-đơn)

```
use BeetechAsia\GoShip\Facades\GoShip;

// Tìm kiếm theo id, order_id hoặc carrier_code
$q = 'GS8KOV152L';
GoShip::searchShipment($q);

// Tìm kiếm theo thời gian bắt đầu và thời gian kết thúc
$start_date = '2025-08-08';
$end_date = '2025-08-15';
GoShip::searchShipment(start_date: $start_date, end_date: $end_date);
```

### [Tạo mới Vận đơn](https://doc.goship.io/api/shipment/shipment#t%E1%BA%A1o-m%E1%BB%9Bi-v%E1%BA%ADn-%C4%91%C6%A1n)

[](#tạo-mới-vận-đơn)

```
use BeetechAsia\GoShip\Enums\Payer;
use BeetechAsia\GoShip\Facades\GoShip;

$data = [
    'shipment' => [
        'rate' => 'MTRfMTFfMTAwMg==',
        'payer' => Payer::CUSTOMER,
        'order_id' => '02846e55e191c5706a5021191563c2a6',
        'address_from' => [
            'name' => 'Nguyễn Văn A',
            'phone' => '0913131313',
            'street' => '195 Đ. Thạch Bàn',
            'ward' => '64',
            'district' => '100100',
            'city' => '100000',
        ],
        'address_to' => [
            'name' => 'Trần Văn B',
            'phone' => '0912121212',
            'street' => '51 Lê Đại Hành',
            'ward' => '63',
            'district' => '100100',
            'city' => '100000',
        ],
        'parcel' => [
            'cod' => 500000, // Không bắt buộc
            'amount' => 500000, // Không bắt buộc
            'width' => 10,
            'height' => 10,
            'length' => 10,
            'weight' => 750,
            'metadata' => 'Hàng dễ vỡ, vui lòng nhẹ tay.', // Không bắt buộc
        ],
    ],
];
GoShip::createShipment($data);
```

### [Xóa Vận đơn](https://doc.goship.io/api/shipment/shipment#x%C3%B3a-v%E1%BA%ADn-%C4%91%C6%A1n)

[](#xóa-vận-đơn)

```
use BeetechAsia\GoShip\Facades\GoShip;

$shipmentId = 'GS6AYEDVZ6';
GoShip::deleteShipment($shipmentId);
```

### [Danh sách các phiên đối soát COD](https://doc.goship.io/api/shipment/invoice#danh-s%C3%A1ch-c%C3%A1c-phi%C3%AAn-%C4%91%E1%BB%91i-so%C3%A1t)

[](#danh-sách-các-phiên-đối-soát-cod)

```
use BeetechAsia\GoShip\Facades\GoShip;

GoShip::getInvoices();
```

### [Tìm kiếm phiên đối soát COD](https://doc.goship.io/api/shipment/invoice#t%C3%ACm-ki%E1%BA%BFm-phi%C3%AAn-%C4%91%E1%BB%91i-so%C3%A1t-cod)

[](#tìm-kiếm-phiên-đối-soát-cod)

```
use BeetechAsia\GoShip\Facades\GoShip;

// Tìm kiếm theo mã phiên đối soát COD
$code = 'FA13HEUD';
GoShip::searchInvoice($code);

// Tìm kiếm theo thời gian bắt đầu và thời gian kết thúc
$from = '2025-08-08';
$to = '2025-08-15';
GoShip::searchInvoice(from: $from, to: $to);
```

### [Tìm kiếm danh sách Vận đơn theo mã phiên đối soát COD](https://doc.goship.io/api/shipment/invoice#t%C3%ACm-ki%E1%BA%BFm-danh-s%C3%A1ch-v%E1%BA%ADn-%C4%91%C6%A1n-theo-m%C3%A3-phi%C3%AAn-chuy%E1%BB%83n-cod)

[](#tìm-kiếm-danh-sách-vận-đơn-theo-mã-phiên-đối-soát-cod)

```
use BeetechAsia\GoShip\Facades\GoShip;

$invoiceId = 'HDF9D9SS';
GoShip::getShipmentByInvoiceId($invoiceId);
```

### [Lấy tất cả thông tin giao dịch](http://doc.goship.io/api/shipment/transaction#l%E1%BA%A5y-t%E1%BA%A5t-c%E1%BA%A3-th%C3%B4ng-tin)

[](#lấy-tất-cả-thông-tin-giao-dịch)

```
use BeetechAsia\GoShip\Facades\GoShip;

GoShip::getTransactions();
```

### [Tìm kiếm giao dịch](https://doc.goship.io/api/shipment/transaction#t%C3%ACm-ki%E1%BA%BFm-giao-d%E1%BB%8Bch)

[](#tìm-kiếm-giao-dịch)

```
use BeetechAsia\GoShip\Facades\GoShip;

// Tìm kiếm theo mã giao dịch
$code = 'GSox6or6q5';
GoShip::searchTransaction($code)

// Tìm kiếm theo thời gian bắt đầu và thời gian kết thúc
$from = '2025-08-08';
$to = '2025-08-15';
GoShip::searchTransaction(from: $from, to: $to);
```

### [Xác thực webhook](https://doc.goship.io/api/shipment/webhooks#x%C3%A1c-th%E1%BB%B1c-webhook)

[](#xác-thực-webhook)

Giới thiệu: Hàm trả về giá trị boolean (true/false)

**true**: Giá trị băm hợp lệ

**false**: Giá trị băm không hợp lệ

```
use BeetechAsia\GoShip\Facades\GoShip;

GoShip::verifyWebhook();
```

### [Lấy biểu phí vận chuyển Đơn giao hoả tốc](https://doc.goship.io/api/ondemand-shipment/rate)

[](#lấy-biểu-phí-vận-chuyển-đơn-giao-hoả-tốc)

```
use BeetechAsia\GoShip\Enums\Kind;
use BeetechAsia\GoShip\Facades\GoShip;

$data = [
    'paths' => [
        [
            'lat' => 20.9842552,
            'lng' => 105.8609381,
            'kind' => Kind::PICKUP,
        ],
        [
            'lat' => 20.9895958,
            'lng' => 105.8445432,
            'kind' => Kind::DELIVERY,
            'parcel' => [
                'cod_amount' => 500000, // Không bắt buộc
                'amount' => 500000, // Không bắt buộc
                'name' => 'Tủ gỗ',
                'quantity' => 20,
                'width' => 20,
                'weight' => 200,
            ],
        ],
    ],
];
GoShip::getOnDemandRates($data);
```

### [Danh sách Vận đơn Đơn giao hoả tốc](https://doc.goship.io/api/ondemand-shipment/shipment#danh-s%C3%A1ch-v%E1%BA%ADn-%C4%91%C6%A1n)

[](#danh-sách-vận-đơn-đơn-giao-hoả-tốc)

```
use BeetechAsia\GoShip\Facades\GoShip;

GoShip::getOnDemandShipments();
```

### [Tìm kiếm Vận đơn Đơn giao hoả tốc](https://doc.goship.io/api/ondemand-shipment/shipment#t%C3%ACm-ki%E1%BA%BFm-shipment)

[](#tìm-kiếm-vận-đơn-đơn-giao-hoả-tốc)

```
use BeetechAsia\GoShip\Facades\GoShip;

// Tìm kiếm theo id, order_id
$q = '56GDG8F';
GoShip::searchOnDemandShipment($q);

// Tìm kiếm theo thời gian bắt đầu và thời gian kết thúc
$start_date = '2025-08-08';
$end_date = '2025-08-15';
GoShip::searchOnDemandShipment(start_date: $start_date, end_date: $end_date);
```

### [Tạo mới Vận đơn Đơn giao hoả tốc](https://doc.goship.io/api/ondemand-shipment/shipment#t%E1%BA%A1o-m%E1%BB%9Bi-v%E1%BA%ADn-%C4%91%C6%A1n)

[](#tạo-mới-vận-đơn-đơn-giao-hoả-tốc)

```
use BeetechAsia\GoShip\Enums\Kind;
use BeetechAsia\GoShip\Enums\OnDemandCarrier;
use BeetechAsia\GoShip\Enums\Tier;
use BeetechAsia\GoShip\Facades\GoShip;

$data = [
    'order_id' => '02846e55e191c5706a5021191563c2a6',
    'paths' => [
        [
            'address' => 'Ngõ 371 Phố Vũ Tông Phan, Phường Khương Đình, Quận Thanh Xuân, Hà Nội, Việt Nam',
            'name' => 'Nguyễn Văn A',
            'phone' => '0913131313',
            'lat' => 20.9842552,
            'lng' => 105.8609381,
            'kind' => Kind::PICKUP,
        ],
        [
            'address' => '300 Đ. Giải Phóng, Phương Liệt, Hai Bà Trưng, Hà Nội, Việt Nam',
            'name' => 'Trần Văn B',
            'phone' => '0912121212',
            'lat' => 20.9895958,
            'lng' => 105.8445432,
            'kind' => Kind::DELIVERY,
            'parcel' => [
                'name' => 'Tủ gỗ',
                'quantity' => 1,
                'quantity' => 20,
                'width' => 20,
                'weight' => 200,
            ],
        ],
    ],
    'carrier' => OnDemandCarrier::AHAMOVE,
    'vehicle' => 'BIKE',
    'service' => 'HAN-BIKE', // Ahamove: HAN-BIKE, Grab: GrabExpress
    'note' => 'Để vào tủ đồ ở sảnh chung cư (Đến nơi liên hệ KH để lấy mã)' // Nếu không có ghi chú, đặt giá trị là chuỗi rỗng (empty string)
    'metadata' => ['Hàng dễ vỡ, vui lòng nhẹ tay.'], // Không bắt buộc
    /*
     * Áp dụng cho Ahamove
     * HAN-BIKE-ROUND-TRIP: Tài xế sẽ quay lại điểm lấy hàng với số phí bằng 80% phí khoảng cách. Lưu ý: Phí khoảng cách là số phí dựa theo số km vận chuyển, ko bao gồm phí điểm dừng và các loại phí khác.
     * HAN-BIKE-BULKY: Giao hàng cồng kềnh
     *             | Kích thước    | Cân nặng    | Mức phí
     *      TIER_2:| 60x50x60 (cm) | 40kg        | 10.000 VND
     *      TIER_3:| 70x60x70 (cm) | 60kg        | 20.000 VND
     *      TIER_4:| 90x70x90 (cm) | 80kg        | 40.000 VND
     */
    'requests' => [[
        '_id' => 'HAN-BIKE-BULKY',
        'tier_code' => Tier::TIER_2,
    ]],
];
GoShip::createOnDemandShipment($data);
```

### [Sửa thông tin Vận đơn Đơn giao hoả tốc](https://doc.goship.io/api/ondemand-shipment/shipment#s%E1%BB%ADa-th%C3%B4ng-tin-v%E1%BA%ADn-%C4%91%C6%A1n)

[](#sửa-thông-tin-vận-đơn-đơn-giao-hoả-tốc)

```
use BeetechAsia\GoShip\Enums\Kind;
use BeetechAsia\GoShip\Enums\OnDemandCarrier;
use BeetechAsia\GoShip\Enums\Tier;
use BeetechAsia\GoShip\Facades\GoShip;

$shipmentId = '56GDG8F';
$data = [
    'order_id' => '02846e55e191c5706a5021191563c2a6',
    'paths' => [
        [
            'address' => 'Ngõ 371 Phố Vũ Tông Phan, Phường Khương Đình, Quận Thanh Xuân, Hà Nội, Việt Nam',
            'name' => 'Nguyễn Văn A',
            'phone' => '0913131313',
            'lat' => 20.9842552,
            'lng' => 105.8609381,
            'kind' => Kind::PICKUP,
        ],
        [
            'address' => '300 Đ. Giải Phóng, Phương Liệt, Hai Bà Trưng, Hà Nội, Việt Nam',
            'name' => 'Trần Văn B',
            'phone' => '0912121212',
            'lat' => 20.9895958,
            'lng' => 105.8445432,
            'kind' => Kind::DELIVERY,
            'parcel' => [
                'name' => 'Tủ gỗ',
                'quantity' => 1,
                'quantity' => 20,
                'width' => 20,
                'weight' => 200,
            ],
        ],
    ],
    'carrier' => OnDemandCarrier::AHAMOVE,
    'vehicle' => 'BIKE',
    'service' => 'HAN-BIKE', // Ahamove: HAN-BIKE, Grab: GrabExpress
    'note' => 'Để vào tủ đồ ở sảnh chung cư (Đến nơi liên hệ KH để lấy mã)' // Nếu không có ghi chú, đặt giá trị là chuỗi rỗng (empty string)
    'metadata' => ['Hàng dễ vỡ, vui lòng nhẹ tay.'], // Không bắt buộc
    /*
     * Áp dụng cho Ahamove
     * HAN-BIKE-ROUND-TRIP: Tài xế sẽ quay lại điểm lấy hàng với số phí bằng 80% phí khoảng cách. Lưu ý: Phí khoảng cách là số phí dựa theo số km vận chuyển, ko bao gồm phí điểm dừng và các loại phí khác.
     * HAN-BIKE-BULKY: Giao hàng cồng kềnh
     *             | Kích thước    | Cân nặng    | Mức phí
     *      TIER_2:| 60x50x60 (cm) | 40kg        | 10.000 VND
     *      TIER_3:| 70x60x70 (cm) | 60kg        | 20.000 VND
     *      TIER_4:| 90x70x90 (cm) | 80kg        | 40.000 VND
     */
    'requests' => [[
        '_id' => 'HAN-BIKE-BULKY',
        'tier_code' => Tier::TIER_2,
    ]],
];
GoShip::updateOnDemandShipment($shipmentId, $data);
```

### [Xóa Vận đơn Đơn giao hoả tốc](https://doc.goship.io/api/ondemand-shipment/shipment#x%C3%B3a-v%E1%BA%ADn-%C4%91%C6%A1n)

[](#xóa-vận-đơn-đơn-giao-hoả-tốc)

```
use BeetechAsia\GoShip\Facades\GoShip;

$shipmentId = '56GDG8F';
GoShip::deleteOnDemandShipment($shipmentId);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](https://github.com/tringuyenduc2903/GoShipVietNam-Laravel/security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Tri Nguyen Duc (Bee Tech - PHP)](https://github.com/tringuyenduc2903)
- [All Contributors](https://github.com/tringuyenduc2903/GoShipVietNam-Laravel/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance78

Regular maintenance activity

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

3

Last Release

257d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e54d657a3a35d9011184548af90883069d81568ea59370ae2181ce1de0478e91?d=identicon)[tringuyenduc2903](/maintainers/tringuyenduc2903)

---

Top Contributors

[![tringuyenbtjsc](https://avatars.githubusercontent.com/u/199541547?v=4)](https://github.com/tringuyenbtjsc "tringuyenbtjsc (45 commits)")[![tringuyenduc2903](https://avatars.githubusercontent.com/u/101564593?v=4)](https://github.com/tringuyenduc2903 "tringuyenduc2903 (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelBeetech Asiagoshipvietnam-laravel

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/tringuyenduc2903-goshipvietnam-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/tringuyenduc2903-goshipvietnam-laravel/health.svg)](https://phpackages.com/packages/tringuyenduc2903-goshipvietnam-laravel)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[sunchayn/nimbus

A Laravel package providing an in-browser API client with automatic schema generation, live validation, and built-in authentication with a touch of Laravel-tailored magic for effortless API testing.

29428.0k](/packages/sunchayn-nimbus)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[spatie/laravel-mailcoach-sdk

An SDK to easily work with the Mailcoach API in Laravel apps

41290.2k1](/packages/spatie-laravel-mailcoach-sdk)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
