PHPackages                             checkout/checkout-php-api - 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. [Payment Processing](/categories/payments)
4. /
5. checkout/checkout-php-api

ActiveLibrary[Payment Processing](/categories/payments)

checkout/checkout-php-api
=========================

Checkout PHP API Library

1.2.18(7y ago)25450.9k↓62.4%27[4 issues](https://github.com/checkout/checkout-php-library/issues)[1 PRs](https://github.com/checkout/checkout-php-library/pulls)1MITPHPPHP &gt;5.3.0

Since Mar 16Pushed 5y ago28 watchersCompare

[ Source](https://github.com/checkout/checkout-php-library)[ Packagist](https://packagist.org/packages/checkout/checkout-php-api)[ Docs](https://github.com/checkout/checkout-php-library)[ RSS](/packages/checkout-checkout-php-api/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)DependenciesVersions (21)Used By (1)

> **❗ This library points to Checkout.com's classic API. Please refer to the [latest PHP SDK](https://github.com/checkout/checkout-sdk-php) instead to benefit from the updated API**

### Requirements

[](#requirements)

PHP 5 &gt; 5.3.0

### How to use the library

[](#how-to-use-the-library)

Add the latest version of checkout-php-library into your project by using Composer or manually:

**Using Composer (Recommended)**

Either run the following command in the root directory of your project:

```
composer require checkout/checkout-php-api

```

Or require the Checkout.com package inside the composer.json of your project:

```
"require": {
    "php": ">=5.2.4",
    "checkout/checkout-php-api": "1.2.18"
},

```

**Manually**

Download or clone the github repository, [master](https://github.com/checkout/checkout-php-library/archive/master.zip) or download a [release](https://github.com/checkout/checkout-php-library/releases), and manually add it to your project.

### Example

[](#example)

After adding the library to your project, include the file autoload.php found in root of the library.

```
include 'checkout-php-api/autoload.php';
```

You will be required to set the secret key when initialising a new **APIClient** instance. You will also have option for other configurations defined in AppSettings.php file.

The constructor available for configuration:

```
 __construct($secretKey, $env = 'sandbox' ,$debugMode = false, $connectTimeout = 60, $readTimeout =60)

 //Example:
use com\checkout;
$apiClient = new checkout\ApiClient('sk_test_XXXXXXXXXXXX');
```

By default both **$connectTimeout** and **$readTimeout** are to 60 seconds. You may change them as needed.

**$env** accepts either `'sandbox'` or `'live'` as value. This parameter allow you to shift between the sandbox environment or live environment. By Default the sandbox environment will be used.

### Sample code for:

[](#sample-code-for)

- [Tokens](https://github.com/checkout/checkout-php-library/wiki/Tokens)
- [Charges](https://github.com/checkout/checkout-php-library/wiki/Charges)
- [Cards](https://github.com/checkout/checkout-php-library/wiki/Cards)
- [Customers](https://github.com/checkout/checkout-php-library/wiki/Customers)
- [Recurring Payments](https://github.com/checkout/checkout-php-library/wiki/RecurringPayments)
- [Local Payment Providers](https://github.com/checkout/checkout-php-library/wiki/lpp)
- [Reporting](https://github.com/checkout/checkout-php-library/wiki/Reporting)
- [Visa Checkout](https://github.com/checkout/checkout-php-library/wiki/VisaCheckout)

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity48

Moderate usage in the ecosystem

Community29

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~66 days

Recently: every ~92 days

Total

17

Last Release

2678d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a7cd9668511a05e33966f2630f5b0575b001900c73ca41ccfb3ded043c27a3a9?d=identicon)[checkout.integration](/maintainers/checkout.integration)

---

Top Contributors

[![nicolas-maalouf-cko](https://avatars.githubusercontent.com/u/17044577?v=4)](https://github.com/nicolas-maalouf-cko "nicolas-maalouf-cko (117 commits)")[![dhiraj-gangoosirdar-cko](https://avatars.githubusercontent.com/u/9551970?v=4)](https://github.com/dhiraj-gangoosirdar-cko "dhiraj-gangoosirdar-cko (62 commits)")[![ravish-ramrakha-cko](https://avatars.githubusercontent.com/u/5680840?v=4)](https://github.com/ravish-ramrakha-cko "ravish-ramrakha-cko (52 commits)")[![avish-bisbeehurry-cko](https://avatars.githubusercontent.com/u/9551963?v=4)](https://github.com/avish-bisbeehurry-cko "avish-bisbeehurry-cko (23 commits)")[![santiago-delpuerto-cko](https://avatars.githubusercontent.com/u/29624039?v=4)](https://github.com/santiago-delpuerto-cko "santiago-delpuerto-cko (17 commits)")[![jason-footing-cko](https://avatars.githubusercontent.com/u/10703682?v=4)](https://github.com/jason-footing-cko "jason-footing-cko (12 commits)")[![elvenpath](https://avatars.githubusercontent.com/u/1319068?v=4)](https://github.com/elvenpath "elvenpath (4 commits)")[![aleksandr-n-whidegroup](https://avatars.githubusercontent.com/u/16414904?v=4)](https://github.com/aleksandr-n-whidegroup "aleksandr-n-whidegroup (2 commits)")[![ckogit](https://avatars.githubusercontent.com/u/118845582?v=4)](https://github.com/ckogit "ckogit (2 commits)")[![fluxynet](https://avatars.githubusercontent.com/u/949842?v=4)](https://github.com/fluxynet "fluxynet (2 commits)")[![fising](https://avatars.githubusercontent.com/u/1930658?v=4)](https://github.com/fising "fising (1 commits)")[![reva2work](https://avatars.githubusercontent.com/u/538756?v=4)](https://github.com/reva2work "reva2work (1 commits)")[![david-fiaty-cko](https://avatars.githubusercontent.com/u/26484662?v=4)](https://github.com/david-fiaty-cko "david-fiaty-cko (1 commits)")

---

Tags

paymentgatewayonline-paymentcheckoutcomGW3CKO

### Embed Badge

![Health badge](/badges/checkout-checkout-php-api/health.svg)

```
[![Health](https://phpackages.com/badges/checkout-checkout-php-api/health.svg)](https://phpackages.com/packages/checkout-checkout-php-api)
```

###  Alternatives

[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.6M13](/packages/checkout-checkout-sdk-php)[sudiptpa/omnipay-nabtransact

National Australia Bank (NAB) Transact driver for the Omnipay payment processing library.

1019.5k](/packages/sudiptpa-omnipay-nabtransact)[lucassmacedo/omnipay-mercadopago

MercadoPago gateway for OmniPay

155.4k](/packages/lucassmacedo-omnipay-mercadopago)

PHPackages © 2026

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