PHPackages                             checkout/checkout-sdk-php-beta - 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. [API Development](/categories/api)
4. /
5. checkout/checkout-sdk-php-beta

AbandonedArchivedLibrary[API Development](/categories/api)

checkout/checkout-sdk-php-beta
==============================

Checkout.com SDK for PHP

2.0.0-beta2(4y ago)0121MITPHPPHP &gt;=7.4

Since Feb 3Pushed 4y ago8 watchersCompare

[ Source](https://github.com/checkout/checkout-sdk-php-beta)[ Packagist](https://packagist.org/packages/checkout/checkout-sdk-php-beta)[ Docs](https://github.com/checkout/checkout-sdk-php-beta)[ RSS](/packages/checkout-checkout-sdk-php-beta/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (2)Dependencies (10)Versions (9)Used By (0)

Checkout.com PHP SDK beta
=========================

[](#checkoutcom-php-sdk-beta)

This is a temporary development Checkout PHP SDK project that was archived and transferred to the [official repository](https://github.com/checkout/checkout-sdk-php).

[![build-main](https://github.com/checkout/checkout-sdk-php-beta/workflows/build-main/badge.svg)](https://github.com/checkout/checkout-sdk-php-beta/workflows/build-main/badge.svg)[![GitHub license](https://camo.githubusercontent.com/1b56ca05bf1946193d4ac996911b7dabdc1842209302c4c91d89ff5fcfa04dd1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f636865636b6f75742f636865636b6f75742d73646b2d7068702d626574612e737667)](https://github.com/checkout/checkout-sdk-php-beta/blob/main/LICENSE.md)[![GitHub release](https://camo.githubusercontent.com/9616c40158d4758cef456fbd09b6d606f9bc96c572b975d2e17fa50de6e3f64d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f636865636b6f75742f636865636b6f75742d73646b2d7068702d626574612e737667)](https://GitHub.com/checkout/checkout-sdk-php-beta/releases/)[![Quality Gate Status](https://camo.githubusercontent.com/f07f723b0f2bb1c89fb33ab08fdbb0e4e4eac0cff929ffe5d12565748319dbb9/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d636865636b6f75745f636865636b6f75742d73646b2d7068702d62657461266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/summary/new_code?id=checkout_checkout-sdk-php-beta)

Getting started
---------------

[](#getting-started)

Packages and sources are available from [Packagist](https://packagist.org/packages/checkout/checkout-sdk-php-beta).

#### Composer

[](#composer)

```
"require": {
    "php": ">=7.4",
    "checkout/checkout-sdk-php-beta": "version"
}
```

Please check in [GitHub releases](https://github.com/checkout/checkout-sdk-php-beta/releases) for all the versions available.

How to use the SDK
------------------

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

This SDK can be used with two different pair of API keys provided by Checkout. However, using different API keys imply using specific API features. Please find in the table below the types of keys that can be used within this SDK.

Account SystemPublic Key (example)Secret Key (example)defaultpk\_g650ff27-7c42-4ce1-ae90-5691a188ee7bsk\_gk3517a8-3z01-45fq-b4bd-4282384b0a64Fourpk\_pkhpdtvabcf7hdgpwnbhw7r2uicsk\_m73dzypy7cf3gf5d2xr4k7sxo4eNote: sandbox keys have a `test_` or `sbox_` identifier, for Default and Four accounts respectively.

**PLEASE NEVER SHARE OR PUBLISH YOUR CHECKOUT CREDENTIALS.**

If you don't have your own API keys, you can sign up for a test account [here](https://www.checkout.com/get-test-account).

Default
-------

[](#default)

Default keys client instantiation can be done as follows:

```
$builder = CheckoutDefaultSdk::staticKeys();
$builder->setPublicKey("public_key");
$builder->setSecretKey("secret_key");
$builder->setEnvironment(Environment::sandbox()); // or production()
$builder->setHttpClientBuilder(); // optional, for a custom HTTP client
$defaultApi = $builder->build();

$paymentsClient = $defaultApi->getPaymentsClient();
$paymentsClient->refundPayment("payment_id");
```

### Four

[](#four)

If your pair of keys matches the Four type, this is how the SDK should be used:

```
$builder = CheckoutFourSdk::staticKeys();
$builder->setPublicKey("public_key");
$builder->setSecretKey("secret_key");
$builder->setEnvironment(Environment::sandbox()); // or production()
$builder->setHttpClientBuilder(); // optional, for a custom HTTP client
$fourApi = $builder->build();

$paymentsClient = $fourApi->getPaymentsClient();
$paymentsClient->refundPayment("payment_id");
```

The SDK supports client credentials OAuth, when initialized as follows:

```
$builder = CheckoutFourSdk::oAuth();
$builder->clientCredentials("client_id", "client_secret");
$builder->scopes([FourOAuthScope::$Files, FourOAuthScope::$Flow]); // array of scopes
$builder->setEnvironment(Environment::sandbox()); // or production()
$builder->setHttpClientBuilder(); // optional, for a custom HTTP client
$fourApi = $builder->build();

$paymentsClient = $fourApi->getPaymentsClient();
$paymentsClient->refundPayment("payment_id");
```

### PHP Settings

[](#php-settings)

For operations that require file upload (Disputes or Marketplace) the configuration `extension=fileinfo` must be enabled in the `php.ini`.

Exception handling
------------------

[](#exception-handling)

All the API responses that do not fall in the 2\*\* status codes will cause a `CheckoutApiException`. The exception encapsulates the `requestId`, `httpStatusCode` and a map of `errorDetails`, if available.

More documentation related to Checkout API and the SDK is available at:

- [Official Docs (Default)](https://docs.checkout.com/)
- [Official Docs (Four)](https://docs.checkout.com/four)
- [API Reference (Default)](https://api-reference.checkout.com/)
- [API Reference (Four)](https://api-reference.checkout.com/preview/crusoe/)

Building from source
--------------------

[](#building-from-source)

Once you checkout the code from GitHub, the project can be built using composer:

```
composer update

```

The execution of integration tests require the following environment variables set in your system:

- For Default account systems: `CHECKOUT_PUBLIC_KEY` &amp; `CHECKOUT_SECRET_KEY`
- For Four account systems: `CHECKOUT_FOUR_PUBLIC_KEY` &amp; `CHECKOUT_FOUR_SECRET_KEY`
- For Four account systems (OAuth): `CHECKOUT_FOUR_OAUTH_CLIENT_ID` &amp; `CHECKOUT_FOUR_OAUTH_CLIENT_SECRET`

Code of Conduct
---------------

[](#code-of-conduct)

Please refer to [Code of Conduct](CODE_OF_CONDUCT.md)

Licensing
---------

[](#licensing)

[MIT](LICENSE.md)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

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

Total

2

Last Release

1549d ago

### Community

Maintainers

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

---

Top Contributors

[![rsaestrela](https://avatars.githubusercontent.com/u/3053481?v=4)](https://github.com/rsaestrela "rsaestrela (18 commits)")[![a-ibarra](https://avatars.githubusercontent.com/u/30295119?v=4)](https://github.com/a-ibarra "a-ibarra (16 commits)")[![Bonafede](https://avatars.githubusercontent.com/u/25872233?v=4)](https://github.com/Bonafede "Bonafede (6 commits)")[![AleGladchteinParser](https://avatars.githubusercontent.com/u/95039617?v=4)](https://github.com/AleGladchteinParser "AleGladchteinParser (4 commits)")

---

Tags

betaphpsdkphpapisdklibrarypaymentgatewaycheckoutcheckoutcomGW3CKOReboot

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[postfinancecheckout/sdk

PostFinance Checkout SDK for PHP

22219.1k13](/packages/postfinancecheckout-sdk)[wallee/sdk

wallee SDK for PHP

12354.2k11](/packages/wallee-sdk)[fabian-beiner/todoist-php-api-library

A PHP client library that provides a native interface to the official Todoist REST API.

4810.8k](/packages/fabian-beiner-todoist-php-api-library)

PHPackages © 2026

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