PHPackages                             nickcheek/privacy-wrapper - 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. nickcheek/privacy-wrapper

ActiveLibrary[API Development](/categories/api)

nickcheek/privacy-wrapper
=========================

PHP Api wrapper for Privacy API

v1.0.1(5y ago)14MITPHPPHP ^7.1CI failing

Since Jul 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/nickcheek/privacy-wrapper)[ Packagist](https://packagist.org/packages/nickcheek/privacy-wrapper)[ Docs](https://github.com/nickcheek/privacy-wrapper)[ RSS](/packages/nickcheek-privacy-wrapper/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Privacy API wrapper for PHP
===========================

[](#privacy-api-wrapper-for-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8b1f99f9141ffbac40b954e354181dee48ee5daa18a789447aa83828c5c590a1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e69636b636865656b2f707269766163792d777261707065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nickcheek/privacy-wrapper)[![Total Downloads](https://camo.githubusercontent.com/0466a4e696abd5cefa9c7378bcab41761258a74525ceee54fefce81447524390/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e69636b636865656b2f707269766163792d777261707065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nickcheek/privacy-wrapper)

Just a small PHP API wrapper for privacy.com

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

[](#installation)

You can install the package via composer:

```
composer require nickcheek/privacy-wrapper
```

Usage
-----

[](#usage)

```
// Include the library and then call it

$privacy = new PrivacyWrapper('your-api-code-from-privacy');

var_dump($privacy->User()->enroll($first_name, $last_name, $dob, $street1, $street2 = null, $zipcode, $ssn_last_four, $phone_number = null, $email = null));

//Note: dob should be as an ISO 8601 date, phone should be in E.164 format

//Funding Methods
var_dump($privacy->Funding()->addBank($routingNumber, $accountNumber, $accountName));
var_dump($privacy->Funding()->listFundingSources());
var_dump($privacy->Funding()->listFundingBanks());
var_dump($privacy->Funding()->listFundingCards());

//Card Methods

var_dump($privacy->Card()->createCard($token = '', $type = 'SINGLE_USE',  $spend_limit = 10000, $limit_duration = 'FOREVER', $state = 'OPEN'));
var_dump($privacy->Card()->updateCard($card_token, $memo = null, $state = 'OPEN', $funding_token = '',  $spend_limit = 10000, $spend_limit_duration = 'FOREVER'));
var_dump($privacy->Card()->listCards());

// Note:
// Available Types: SINGLE_USE, MERCHANT_LOCKED, UNLOCKED
// Available Spend Limit Duration: TRANSACTION, MONTHLY, ANNUALLY, FOREVER
// Available State: OPEN, PAUSED

//Simulate Methods (requires sandbox API)
// to use sandbox, pass it through the Service Call, if left blank, it will use the live url.

var_dump($privacy->Simulate('sandbox')->authorize(string $descriptor, int $pan, int $amount));
var_dump($privacy->Simulate('sandbox')->void(string $token, int $amount));
var_dump($privacy->Simulate('sandbox')->clearing(string $token, int $amount));

//return is equivelant of refund
var_dump($privacy->Simulate('sandbox')->return(string $descriptor, int $pan, int $amount));
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Nicholas Cheek](https://github.com/nickcheek)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Total

2

Last Release

2130d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f33b515b89e91b73f02d7f38c436c85be7f9035c99f0cfa1ba78a1806045def?d=identicon)[nickcheek](/maintainers/nickcheek)

---

Tags

privacynickcheekprivacy-wrapper

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nickcheek-privacy-wrapper/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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