Download the PHP package einenlum/creem-php-sdk without Composer
On this page you can find all versions of the php package einenlum/creem-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download einenlum/creem-php-sdk
More information about einenlum/creem-php-sdk
Files in einenlum/creem-php-sdk
Package creem-php-sdk
Short Description PHP SDK for the Creem merchant of records API
License MIT
Informations about the package creem-php-sdk
Creem PHP SDK
A PHP SDK for the Creem merchant of records API. This library provides a clean, type-safe interface for interacting with all Creem API endpoints and handling webhooks.
Requirements
- PHP 8.1 or higher
- A PSR-18 HTTP client (e.g., Guzzle)
- A PSR-17 HTTP factory (e.g., Nyholm PSR-7 or Guzzle PSR-7)
Installation
If you don't have an HTTP client installed, you can install Guzzle:
Quick Start
Configuration
Basic Configuration
Custom HTTP Client
If you need to customize the HTTP client (e.g., for timeouts or proxies):
API Resources
Products
Checkouts
Customers
Subscriptions
Discounts
Licenses
Transactions
Webhook Handling
The SDK provides a WebhookHandler class for processing incoming webhooks with signature verification.
Basic Webhook Setup
Available Webhook Events
| Event | Handler Method | Description |
|---|---|---|
checkout.completed |
onCheckoutCompleted() |
Checkout was completed |
subscription.active |
onSubscriptionActive() |
Subscription is now active |
subscription.paid |
onSubscriptionPaid() |
Subscription payment received |
subscription.canceled |
onSubscriptionCanceled() |
Subscription was canceled |
subscription.expired |
onSubscriptionExpired() |
Subscription has expired |
subscription.trialing |
onSubscriptionTrialing() |
Subscription is in trial |
subscription.paused |
onSubscriptionPaused() |
Subscription was paused |
subscription.update |
onSubscriptionUpdate() |
Subscription was updated |
refund.created |
onRefundCreated() |
Refund was created |
dispute.created |
onDisputeCreated() |
Dispute was created |
Generic Event Handler
Error Handling
The SDK throws specific exceptions for different error types:
All exceptions include response details:
Enums
The SDK uses PHP enums for type-safe values:
Testing
For testing your integration, use the test mode:
This will route all API calls to https://test-api.creem.io.
License
MIT License
All versions of creem-php-sdk with dependencies
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^2.0