PHPackages                             judopay/judopay-sdk - 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. judopay/judopay-sdk

ActiveLibrary[Payment Processing](/categories/payments)

judopay/judopay-sdk
===================

SDK for the Judopay API

5.3.0(3y ago)8108.5k↓31.5%20[3 PRs](https://github.com/Judopay/Judo-PHP/pulls)1MITPHPPHP &gt;=5.5CI failing

Since Aug 20Pushed 1mo ago13 watchersCompare

[ Source](https://github.com/Judopay/Judo-PHP)[ Packagist](https://packagist.org/packages/judopay/judopay-sdk)[ Docs](https://www.judopay.com/docs)[ RSS](/packages/judopay-judopay-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (12)Versions (35)Used By (1)

Judopay PHP SDK [![Build Status](https://camo.githubusercontent.com/ab4fefe31abcc2e3166d9182c221699ded1fb97ebf904e2746b6a63584d893ef/68747470733a2f2f7472617669732d63692e6f72672f4a75646f7061792f4a75646f2d5048502e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Judopay/Judo-PHP)
===============================================================================================================================================================================================================================================================================================

[](#judopay-php-sdk-)

Deprecated
----------

[](#deprecated)

This SDK has been deprecated and will not receive further updates. For help using the Judopay API from a PHP application see

Requirements
------------

[](#requirements)

In order for the Judo PHP library to work correctly with your development setup, please ensure the following requirements are met:

- PHP 5.5 and above
- [Composer](https://getcomposer.org/download/)

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

[](#getting-started)

##### 1. Integration

[](#1-integration)

Installation of the SDK is implemented via the Composer package manager. Add the judopay package to your composer.json file:

```
    "require": {
        "judopay/judopay-sdk": "5.0.0"
    }
```

And then execute:

```
    $ composer install
```

Make sure you require the 'vendor/autoload.php' file, so that the Judopay SDK classes are available to your application. For more information on getting started with Composer, see [Composer intro](https://getcomposer.org/doc/00-intro.md).

##### 2. Setup

[](#2-setup)

To start using the SDK, create a new Judopay object with your API credentials:

```
    $judopay = new Judopay(
        array(
            'apiToken' => 'your-token',
            'apiSecret' => 'your-secret',
            'judoId' => 'your-judo-id'
        )
    );
```

##### 3. Make a payment

[](#3-make-a-payment)

To make a new payment with full card details:

```
    $payment = $judopay->getModel('Payment');
    $payment->setAttributeValues(
        array(
            'judoId' => 'your_judo_id',
            'yourConsumerReference' => '12345',
            'yourPaymentReference' => '12345',
            'amount' => 1.01,
            'currency' => 'GBP',
            'cardNumber' => '4976000000003436',
            'expiryDate' => '12/25',
            'cv2' => 452
        )
    );
```

**Note:** Please make sure that you are using a unique Consumer Reference for each different consumer, and a unique Payment Reference for each transaction.

Card address details can optionally be included for use in AVS checks as follows, (see full list of parameters [here](https://docs.judopay.com/Content/Server%20SDKs/Server%20SDKs_1.htm#Server))

```
    $payment = $judopay->getModel('Payment');
    $payment->setAttributeValues(
        array(
            'judoId' => 'your_judo_id',
            'yourConsumerReference' => '12345',
            'yourPaymentReference' => '12345',
            'amount' => 1.01,
            'currency' => 'GBP',
            'cardNumber' => '4976000000003436',
            'expiryDate' => '12/25',
            'cv2' => 452,
            'cardAddress' => array('address1' => '1 Market Street', 'postCode' => 'E20 6PQ', 'countryCode' => 826)
        )
    );
```

You can check on the required fields and the format of each field in the [Judopay REST API reference](https://docs.judopay.com/api-reference/index.html). To send the request to the API, call:

```
    $response = $payment->create();
```

##### 4. Check the payment result

[](#4-check-the-payment-result)

If the payment is successful, you'll receive a response array like this (see full response [here](https://docs.judopay.com/Content/Server%20SDKs/Server%20SDKs_1.htm#Server)):

```
    Array
    (
        [receiptId] => 520882
        [type] => Payment
        [createdAt] => 2014-08-18T16:28:39.6164+01:00
        [result] => Success
        ...
        [amount] => 10.00
        ...
        [yourPaymentReference] => 12345
    )
```

Also important to handle different exceptions in your code. See more details in our [error handling section](https://docs.judopay.com/Content/Sandbox%20Testing/Test%20Scenarios.htm).

```
    try {
        $response = $payment->create();
        if ($response['result'] === 'Success') {
            echo 'Payment successful';
        } else {
            echo 'There were some problems while processing your payment';
        }
    } catch (JudopayExceptionValidationError $e) {
        echo $e->getSummary();
    } catch (JudopayExceptionApiException $e) {
        echo $e->getSummary();
    } catch (Exception $e) {
        echo $e->getMessage();
    }
```

Next steps
----------

[](#next-steps)

The Judo PHP SDK supports a range of customization options. For more information on using Judo see our [documentation](https://docs.judopay.com/Content/Server%20SDKs/Server%20SDKs_1.htm#Server).

License
-------

[](#license)

See the [LICENSE](https://github.com/JudoPay/PhpSdk/blob/master/LICENSE.txt) file for license rights and limitations (MIT).

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance59

Moderate activity, may be stable

Popularity40

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity70

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

Recently: every ~154 days

Total

28

Last Release

1319d ago

Major Versions

1.0.3 → 2.0.02016-09-28

2.6.0 → 3.0.02019-01-03

3.1.0 → 4.0.02019-06-20

4.6.0 → 5.0.02021-05-17

PHP version history (3 changes)1.0.0PHP &gt;=5.3.3

3.0.0PHP &gt;=5.4

4.0.0PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c8bbd39ce4bee3768ba9b816428e85b15f0a38182add3e5c9a6b44ba3208a0b?d=identicon)[JudoPay](/maintainers/JudoPay)

---

Top Contributors

[![chrisurun](https://avatars.githubusercontent.com/u/32509095?v=4)](https://github.com/chrisurun "chrisurun (137 commits)")[![bluefuton](https://avatars.githubusercontent.com/u/17325?v=4)](https://github.com/bluefuton "bluefuton (119 commits)")[![ofetisov](https://avatars.githubusercontent.com/u/6715455?v=4)](https://github.com/ofetisov "ofetisov (49 commits)")[![Stuart-Baillie](https://avatars.githubusercontent.com/u/65538402?v=4)](https://github.com/Stuart-Baillie "Stuart-Baillie (23 commits)")[![JP-Anderson](https://avatars.githubusercontent.com/u/5774158?v=4)](https://github.com/JP-Anderson "JP-Anderson (9 commits)")[![jamesgoodwin](https://avatars.githubusercontent.com/u/251963?v=4)](https://github.com/jamesgoodwin "jamesgoodwin (7 commits)")[![akakjs](https://avatars.githubusercontent.com/u/169554?v=4)](https://github.com/akakjs "akakjs (6 commits)")[![mikehancock](https://avatars.githubusercontent.com/u/2235333?v=4)](https://github.com/mikehancock "mikehancock (4 commits)")[![James-Lappin](https://avatars.githubusercontent.com/u/7825546?v=4)](https://github.com/James-Lappin "James-Lappin (2 commits)")[![aadilsheth](https://avatars.githubusercontent.com/u/30666139?v=4)](https://github.com/aadilsheth "aadilsheth (2 commits)")[![AlbMata](https://avatars.githubusercontent.com/u/15212570?v=4)](https://github.com/AlbMata "AlbMata (2 commits)")[![dave-pollock](https://avatars.githubusercontent.com/u/20267387?v=4)](https://github.com/dave-pollock "dave-pollock (1 commits)")[![IgorCandido](https://avatars.githubusercontent.com/u/675044?v=4)](https://github.com/IgorCandido "IgorCandido (1 commits)")[![jchoksijudopay](https://avatars.githubusercontent.com/u/50621835?v=4)](https://github.com/jchoksijudopay "jchoksijudopay (1 commits)")[![hamza-mostafa](https://avatars.githubusercontent.com/u/30126495?v=4)](https://github.com/hamza-mostafa "hamza-mostafa (1 commits)")[![mikeboehm](https://avatars.githubusercontent.com/u/208093?v=4)](https://github.com/mikeboehm "mikeboehm (1 commits)")

---

Tags

payment

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/judopay-judopay-sdk/health.svg)

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

###  Alternatives

[shetabit/multipay

PHP Payment Gateway Integration Package

291348.2k3](/packages/shetabit-multipay)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[flutterwavedev/flutterwave-v3

A simple SDK for integrating to Flutterwave Payment

24174.1k6](/packages/flutterwavedev-flutterwave-v3)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)[tsaiyihua/laravel-linepay

linepay library for laravel

102.9k](/packages/tsaiyihua-laravel-linepay)

PHPackages © 2026

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