PHP SDK for AlternativePayments API
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
Lib/AlternativePayments update payment methods Sep 27, 2017
samples Added transaction samples May 11, 2018
tests Removing redundand properties Jul 4, 2016
.gitignore ap-php-sdk new payment methods added Jul 4, 2017
LICENSE Initial commit Jul 2, 2015 Create README file Aug 17, 2016
composer.json added composer Sep 27, 2017

PHP SDK for Alternative Payments RESTful API



PHP 5.3.3 and later. cURL extension.

Developer Documentation

Official Alternative Payments RESTful API Reference


It's recommended to use composer or you can download the latest release.

composer require alternativepayments/alternativepayments


To load the Alternative Payments PHP SDK you have to include autoloader:

require_once '/path/to/your-project/vendor/autoload.php';

To use Alternative Payments PHP SDK you need to setup your secret integration key:

use AlternativePayments\Config;
Config :: setApiKey("sk_test_rHErfsdjgfk9.....lFbfdsgh3mv0M");

SEPA transaction request example:

require_once '../vendor/autoload.php';

use AlternativePayments\Config;
Config :: setApiKey("sk_test_rHErfsdjgfk9.....lFbfdsgh3mv0M");

$customer = new \AlternativePayments\Model\Customer();
$payment = new \AlternativePayments\Model\Payment();
$payment->setHolder("John Doe");
$transaction = new \AlternativePayments\Model\Transaction();
$transaction->setDescription("test sepa php sdk");
$res = \AlternativePayments\Transaction :: post($transaction);

For more examples check samples folder.


Read License for more licensing information.