PHPackages                             alternativepayments/alternativepayments - 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. alternativepayments/alternativepayments

ActiveLibrary[API Development](/categories/api)

alternativepayments/alternativepayments
=======================================

Official PHP SDK for Alternative Payments API

v1.1.0(3y ago)1134.0k—2.8%5[2 issues](https://github.com/AlternativePayments/ap-php-sdk/issues)[1 PRs](https://github.com/AlternativePayments/ap-php-sdk/pulls)MITPHPPHP &gt;=5.3.3

Since Jul 5Pushed 3y ago2 watchersCompare

[ Source](https://github.com/AlternativePayments/ap-php-sdk)[ Packagist](https://packagist.org/packages/alternativepayments/alternativepayments)[ Docs](http://www.alternativepayments.com)[ RSS](/packages/alternativepayments-alternativepayments/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)DependenciesVersions (5)Used By (0)

PHP SDK for Alternative Payments RESTful API
============================================

[](#php-sdk-for-alternative-payments-restful-api)

Installation
------------

[](#installation)

### Requirements

[](#requirements)

PHP 5.3.3 and later. cURL extension.

### Developer Documentation

[](#developer-documentation)

[Official Alternative Payments RESTful API Reference](http://www.alternativepayments.com/support/api/)

### Composer

[](#composer)

It's recommended to use [composer](http://getcomposer.org) or you can download the latest release.

```
composer require alternativepayments/alternativepayments

```

Usage
-----

[](#usage)

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();
$customer->setEmail("john.doe@example.com");
$customer->setCountry("BE");
$customer->setFirstName("John");
$customer->setLastName("Doe");
$payment = new \AlternativePayments\Model\Payment();
$payment->setPaymentOption("SEPA");
$payment->setHolder("John Doe");
$payment->setIBAN("BE88271080782541");
$transaction = new \AlternativePayments\Model\Transaction();
$transaction->setCustomer($customer);
$transaction->setPayment($payment);
$transaction->setAmount(4500);
$transaction->setCurrency("EUR");
$transaction->setDescription("test sepa php sdk");
$transaction->setMerchantPassThruData("test_sepa_123");
$transaction->setIPAddress("127.0.0.1");
$res = \AlternativePayments\Transaction :: post($transaction);

```

For more examples check [samples](https://github.com/AlternativePayments/ap-php-sdk/tree/master/samples) folder.

License
-------

[](#license)

Read [License](https://github.com/AlternativePayments/ap-php-sdk/blob/master/LICENSE) for more licensing information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity61

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

Total

4

Last Release

1377d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c98d95b51e512f77365a403efcd25d746154a25f6a8da64e8453bbc75ff54e66?d=identicon)[alternativepayments](/maintainers/alternativepayments)

---

Top Contributors

[![AlternativePayments](https://avatars.githubusercontent.com/u/13147409?v=4)](https://github.com/AlternativePayments "AlternativePayments (10 commits)")[![sdzigurski](https://avatars.githubusercontent.com/u/12763763?v=4)](https://github.com/sdzigurski "sdzigurski (8 commits)")[![sasadubara](https://avatars.githubusercontent.com/u/29538802?v=4)](https://github.com/sasadubara "sasadubara (4 commits)")

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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