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

ActiveLibrary[API Development](/categories/api)

roadtoexp/php-bluesnap-sdk
==========================

A PHP SDK for the BlueSnap API

00PHP

Since Jul 30Pushed 2y agoCompare

[ Source](https://github.com/roadtoexp/php-bluesnap-sdk)[ Packagist](https://packagist.org/packages/roadtoexp/php-bluesnap-sdk)[ RSS](/packages/roadtoexp-php-bluesnap-sdk/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

BlueSnap PHP Library
--------------------

[](#bluesnap-php-library)

This (unofficial) library standardizes and simplifies working with the BlueSnap API.

All the standard API documentation is applicable to this library.

View the BlueSnap documentation here:

This library currently supports:

- CardTransactions
- VaultedShoppers
- Vendors
- Subscriptions
- Plans (Subscriptions)
- Refunds
- Reports
- Generating a Hosted Payment Fields token

### Installation

[](#installation)

Install this package with composer

```
composer require shabananavas/php-bluesnap-sdk
```

### Usage

[](#usage)

Initialize the library in your class constructor

```
public function __construct()
{
    $environment = 'sandbox'; // or 'production'
    \Bluesnap\Bluesnap::init($environment, 'YOUR_API_KEY', 'YOUR_API_PASSWORD');
}
```

Create a New Hosted Payment Fields Token

```
public function getHostedPaymentFieldsToken() {
  $data = \Bluesnap\HostedPaymentFieldsToken::create();
  return $data['hosted_payment_fields_token'];
}
```

Create a New Transaction

```
public function createTransaction()
{
    $response = \Bluesnap\CardTransaction::create([
        'creditCard' => [
            'cardNumber' => '4263982640269299',
            'expirationMonth' => '02',
            'expirationYear' => '2018',
            'securityCode' => '837'
        ],
        'amount' => 10.00,
        'currency' => 'USD',
        'recurringTransaction' => 'ECOMMERCE',
        'cardTransactionType' => 'AUTH_CAPTURE',
    ]);

    if ($response->failed())
    {
        $error = $response->data;

        // handle error
    }

    $transaction = $response->data;

    return $transaction;
}
```

#### See [examples](https://github.com/shabananavas/php-bluesnap-sdk/tree/master/examples) for further details on using the library

[](#see-examples-for-further-details-on-using-the-library)

License
-------

[](#license)

This package is licensed under the [MIT License](https://github.com/shabananavas/php-bluesnap-sdk/blob/master/LICENSE)

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31372373?v=4)[Alexandr Artemov](/maintainers/roadtoexp)[@roadtoexp](https://github.com/roadtoexp)

---

Top Contributors

[![tdanielcox](https://avatars.githubusercontent.com/u/3145392?v=4)](https://github.com/tdanielcox "tdanielcox (32 commits)")[![pmccarren](https://avatars.githubusercontent.com/u/4959702?v=4)](https://github.com/pmccarren "pmccarren (17 commits)")[![shabananavas](https://avatars.githubusercontent.com/u/11439056?v=4)](https://github.com/shabananavas "shabananavas (8 commits)")[![roadtoexp](https://avatars.githubusercontent.com/u/31372373?v=4)](https://github.com/roadtoexp "roadtoexp (3 commits)")[![krystalcode](https://avatars.githubusercontent.com/u/301364?v=4)](https://github.com/krystalcode "krystalcode (2 commits)")[![safalliajoseph](https://avatars.githubusercontent.com/u/17721140?v=4)](https://github.com/safalliajoseph "safalliajoseph (2 commits)")

### Embed Badge

![Health badge](/badges/roadtoexp-php-bluesnap-sdk/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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