deegitalbe / chargebee-php
ChargeBee API client implementation for PHP
Requires
- php: >=5.6.0
- ext-curl: *
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- simpletest/simpletest: ^1.1
- dev-master
- v3.1.0
- v3.0.0
- v2.8.3
- v2.8.2
- v2.8.1
- v2.7.9
- v2.7.8
- v2.7.7
- v2.7.6
- v2.7.5
- v2.7.4
- v2.7.3
- v2.7.2
- v2.7.1
- v2.7.0
- v2.6.9
- v2.6.8
- v2.6.7
- v2.6.6
- v2.6.5
- v2.6.4
- v2.6.3
- v2.6.2
- v2.6.1
- v2.6.0
- v2.5.9
- v2.5.8
- v2.5.7
- v2.5.6
- v2.5.5
- v2.5.4
- v2.5.3
- v2.5.2
- v2.5.1
- v2.5.0
- v2.4.9
- v2.4.8
- v2.4.7
- v2.4.6
- v2.4.5
- v2.4.4
- v2.4.3
- v2.4.2
- v2.4.1
- v2.4.0
- v2.3.9
- v2.3.8
- v2.3.7
- v2.3.6
- v2.3.5
- v2.3.4
- v2.3.3
- v2.3.2
- v2.3.1
- v2.3.0
- v2.2.9
- v2.2.8
- v2.2.7
- v2.2.6
- v2.2.5
- v2.2.4
- v2.2.3
- v2.2.2
- v2.2.1
- v2.2.0
- v2.1.9
- v2.1.8
- v2.1.7
- v2.1.6
- v2.1.5
- v2.1.4
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.9
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.7.5
- v1.7.4
- v1.7.3
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.9
- v1.6.8
- v1.6.7
- v1.6.6
- v1.6.5
- v1.6.4
- v1.6.3
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.9
- v1.5.8
- v1.5.7
- v1.5.6
- v1.5.5
- v1.5.4
- v1.5.3
- v1.5.2
- v1.5.1
- v1.5.0
- v1.4.9
- v1.4.8
- v1.4.7
- v1.4.6
- v1.4.5
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.9
- v1.3.8
- v1.3.7
- v1.3.6
- v1.3.5
- v1.3.4
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.9
- v1.2.8
- v1.2.7
- v1.2.6
- v1.2.5
- v1.2.4
- dev-chargebee-v1
- dev-5.8.5_libs_v2
- dev-copy_card_api_fix
- dev-bck_compat
This package is auto-updated.
Last update: 2024-11-17 16:52:27 UTC
README
This a fork using Guzzle 7.
Chargebee PHP Client Library - API V2
This is the PHP Library for integrating with Chargebee. Sign up for a Chargebee account here.
Chargebee now supports two API versions - V1 and V2, of which V2 is the latest release and all future developments will happen in V2. This library is for API version V2. If you’re looking for V1, head to chargebee-v1 branch.
Requirements
PHP 5.6.0 or later
Installation
Composer
Chargebee
is available on Packagist and can be installed using Composer
composer require deegitalbe/chargebee-php
To use the bindings,
require_once('vendor/autoload.php');
Manual Installation
Download the latest release and to use the bindings, include
init.php
file.
require_once('/path/to/chargebee-php/lib/init.php');
Documentation
Usage
To create a new subscription:
use ChargeBee\ChargeBee\Environment;
use ChargeBee\ChargeBee\Subscription;
...
Environment::configure("your_site", "{your_site_api_key}");
$result = Subscription::create(array(
"id" => "__dev__KyVqH3NW3f42fD",
"planId" => "starter",
"customer" => array(
"email" => "john@user.com",
"firstName" => "John",
"lastName" => "Wayne"
)
));
$subscription = $result->subscription();
$customer = $result->customer();
$card = $result->card();
Legacy Support
If you are using PHP < 5.6.0 , you can download chargebee-php v2.8.3. This version will not support recently added features since the version was released. We recommend you to upgrade PHP inorder to use the latest features.
License
See the LICENSE file.