PHPackages                             magebitcom/ucp-php-spec - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. magebitcom/ucp-php-spec

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

magebitcom/ucp-php-spec
=======================

Universal Commerce Protocol specification for PHP

v1.0.2(5mo ago)127MITPHPPHP &gt;=8.1

Since Jan 19Pushed 5mo agoCompare

[ Source](https://github.com/magebitcom/ucp-php-spec)[ Packagist](https://packagist.org/packages/magebitcom/ucp-php-spec)[ RSS](/packages/magebitcom-ucp-php-spec/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (1)Versions (14)Used By (0)

UCP PHP Specification
=====================

[](#ucp-php-specification)

PHP interfaces for the Universal Commerce Protocol (UCP) specification. This package provides type-safe PHP interfaces automatically generated from the official UCP JSON Schema definitions.

About UCP
---------

[](#about-ucp)

The Universal Commerce Protocol (UCP) is a standardized protocol for commerce operations, providing a unified interface for shopping, checkout, payment, and fulfillment operations across different platforms and systems.

What's Included
---------------

[](#whats-included)

This package contains PHP interfaces for:

- **Shopping** - Cart, checkout, and order management
- **Payment** - Payment handlers, instruments, and credentials
- **Fulfillment** - Shipping, pickup, and delivery operations
- **Discovery** - Service discovery and capability negotiation

All interfaces are generated from the official UCP JSON Schema specifications located in the `spec/` directory.

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

[](#installation)

```
composer require magebitcom/ucp-php-spec
```

Usage
-----

[](#usage)

### Two Interface Variants

[](#two-interface-variants)

This package generates two sets of interfaces:

1. **`Api`** - Immutable interfaces with getters only (read-only)
2. **`MutableApi`** - Mutable interfaces with getters and setters (read-write)

### Using Immutable Interfaces (Api)

[](#using-immutable-interfaces-api)

The `Api` namespace contains immutable interfaces with only getter methods:

```
