PHPackages                             blueweb/payout\_one - 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. blueweb/payout\_one

ActiveLibrary[API Development](/categories/api)

blueweb/payout\_one
===================

Payout API Client PHP Library

1.0(5y ago)06.2k↓33.3%1MITPHPPHP ^7.4

Since May 3Pushed 1y ago3 watchersCompare

[ Source](https://github.com/blueweb/payout_one)[ Packagist](https://packagist.org/packages/blueweb/payout_one)[ RSS](/packages/blueweb-payout-one/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Payout API Client PHP Library
=============================

[](#payout-api-client-php-library)

The Payout PHP library for API client.

Features
--------

[](#features)

- Card payments
- Bank transfers
- Multi-language (english, slovak, czech)
- Multi-currency

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

[](#requirements)

- PHP 5.5 or later
- cUrl extension enabled
- Payout account

Getting Started
---------------

[](#getting-started)

### Installation

[](#installation)

Download [the latest release](https://github.com/payout-one/payout_php/releases), unpack the ZIP file and upload `Payout` directory to your project library folder. Then include the `init.php` file.

```
require_once('/path-to-your-system-library/Payout/init.php');
```

### Namespace

[](#namespace)

All the examples below assume the Bigcommerce\\Api\\Client class is imported into the scope with the following namespace declaration:

```
use Payout\Client;
```

### Configuration

[](#configuration)

Configure Payout API Client and initialize PHP object.

```
$config = array(
        'client_id' => 'a3f30b76-5b01-4250-9718-96d933bf91c9',
        'client_secret' => '4e6fiCXTzuNwUhYjecEEOa94Ne3_zRItqUNqcJr1kMaWVsRuB7rs_nscT7HDN7be',
        'sandbox' => true
    );

$payout = new Client($config);
```

### Test installation

[](#test-installation)

You can print library version to test the installation.

```
echo $payout->getLibraryVersion();
```

### Create checkout

[](#create-checkout)

Prepare array with checkout data and pass it to the `createCheckout()` method. Response from [API POST Create checkout](https://postman.payout.one/?version=latest#d5b91144-1e72-4c9b-bd10-22aa14aa526e)is returned as PHP object.

```
$checkout_data = array(
        'amount' => '683.50',
        'currency' => 'EUR',
        'customer' => [
            'first_name' => 'John',
            'last_name' => 'Doe',
            'email' => 'john.doe@payout.one'
        ],
        'external_id' => '20190001',
        'redirect_url' => 'https://payout.one/payment/redirect'
    );

$response = $payout->createCheckout($checkout_data);
var_dump($response);
```

Basic example
-------------

[](#basic-example)

Simple usage looks like:

```
