Download the PHP package johnpaulmedina/laravel-usps without Composer

On this page you can find all versions of the php package johnpaulmedina/laravel-usps. 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 laravel-usps

Laravel-USPS

Full Laravel package for the USPS API v3 (OAuth2). Covers all 20 USPS API domains: addresses, tracking, labels, international labels, domestic prices, international prices, service standards, locations, carrier pickup, containers, payments, campaigns, package campaigns, adjustments, disputes, appointments, shipping options, and SCAN forms.

Note: The legacy USPS Web Tools XML API was retired in January 2026. This package uses the new OAuth2-based REST/JSON API at apis.usps.com.

Reference: Official USPS API examples and OpenAPI specs at github.com/USPS/api-examples.

Requirements

Installation

The service provider and facade are auto-discovered.

Configuration

Publish the config file:

This creates config/usps.php:

Add your credentials to .env:

Artisan Commands

All commands output formatted tables to the console.

Usage

All API domains are accessible via the Usps facade. Address methods are called directly; all other domains are accessed through fluent accessor methods that return typed API clients.

Addresses

Response:

DPV (Delivery Point Validation) confirms whether a specific address is a real USPS deliverable location — down to the apartment/suite level.

Code Meaning
Y Full match — both street and unit confirmed
D Primary address confirmed, apartment/suite missing
S Primary confirmed, apartment/suite provided but doesn't match
N Not a valid delivery point

When apartment is missing (e.g., multi-unit building):

Correction codes: 32 = apartment/suite needed, 22 = multiple addresses found.

Response:

Response:

Response:

Note: State names are auto-converted to abbreviations (Florida → FL). ZIP codes with dashes are auto-split (20500-0005 → ZIP5: 20500, ZIP4: 0005).

USPS Address API Documentation: developer.usps.com/api/81 — full response field definitions, DPV codes, correction codes, and error handling.

Tracking

Domestic Labels

International Labels

Domestic Prices

International Prices

Service Standards

Service Standards Directory

Service Standards Files

International Service Standards

Locations

Carrier Pickup

Containers

Payments

Informed Delivery Campaigns (Mail)

Informed Delivery Package Campaigns

Adjustments

Disputes

Appointments (FAST)

Shipping Options

SCAN Forms

API Domains

Domain Facade Accessor Endpoints
Addresses Direct methods 3
Tracking tracking() 3
Domestic Labels labels() 12
International Labels internationalLabels() 4
Domestic Prices domesticPrices() 5
International Prices internationalPrices() 5
Service Standards serviceStandards() 2
Service Standards Directory serviceStandardsDirectory() 2
Service Standards Files serviceStandardsFiles() 2
International Service Standards internationalServiceStandards() 1
Locations locations() 3
Carrier Pickup carrierPickup() 5
Containers containers() 5
Payments payments() 2
Campaigns campaigns() 9
Package Campaigns packageCampaigns() 6
Adjustments adjustments() 1
Disputes disputes() 1
Appointments appointments() 4
Shipping Options shippingOptions() 1
SCAN Forms scanForms() 3

Authentication

The package automatically handles OAuth2 client credentials flow. Access tokens are cached per-scope for ~50 minutes to minimize token requests. Each API domain requests only the scopes it needs.

License

MIT


All versions of laravel-usps with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/cache Version ^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 johnpaulmedina/laravel-usps contains the following files

Loading the files please wait ...