PHPackages                             saatchiart/affirm-php-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. saatchiart/affirm-php-sdk

ActiveLibrary[API Development](/categories/api)

saatchiart/affirm-php-sdk
=========================

Unofficial Affirm php sdk

1.0.1(8y ago)013.1k↓10.7%3[1 issues](https://github.com/saatchiart/affirm-php-sdk/issues)[1 PRs](https://github.com/saatchiart/affirm-php-sdk/pulls)MITPHP

Since Dec 4Pushed 6y ago11 watchersCompare

[ Source](https://github.com/saatchiart/affirm-php-sdk)[ Packagist](https://packagist.org/packages/saatchiart/affirm-php-sdk)[ RSS](/packages/saatchiart-affirm-php-sdk/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (7)Versions (4)Used By (0)

Unofficial Affirm PHP SDK
=========================

[](#unofficial-affirm-php-sdk)

[Affirm API Docs](https://docs.affirm.com/Integrate_Affirm/Direct_API#checkout_object)

Install:
--------

[](#install)

```
composer require saatchiart/affirm-php-sdk
```

Usage:
------

[](#usage)

```
// get an affirm php sdk instance
$config = [
    'public_api_key' => 'MY_AFFIRM_PUBLIC_API_KEY',
    'private_api_key' => 'MY_AFFIRM_PRIVATE_API_KEY',
    'is_sandbox' => true,
];
$affirm = new \SaatchiArt\Affirm\Api\Client($config);

// authorize an affirm payment by checkout token
/** @var \stdClass $response decoded json from response */
$optionalData = ['order_id' => 'OPTIONAL_ORDER_ID'];
$response = $affirm->authorize('MY_CHECKOUT_TOKEN', $optionalData);

// capture an authorized affirm payment by charge id
$optionalData = [
    'order_id' => 'abc123',
    'shipping_carrier' => 'my carrier',
    'shipping_confirmation' => 'abc123',
];
$response = $affirm->capture('MY_CHARGE_ID', $optionalData);

// read an authorized charge by charge id
$optionalData = [
    'limit' => 123,
    'before' => 'beforeString',
    'after' => 'afterString',
];
$response = $affirm->read('MY_CHARGE_ID', $optionalData);
```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3132d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/661038?v=4)[Mike Funk](/maintainers/mikedfunk)[@mikedfunk](https://github.com/mikedfunk)

---

Top Contributors

[![mikedfunk](https://avatars.githubusercontent.com/u/661038?v=4)](https://github.com/mikedfunk "mikedfunk (3 commits)")[![stsibel](https://avatars.githubusercontent.com/u/1758206?v=4)](https://github.com/stsibel "stsibel (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/saatchiart-affirm-php-sdk/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M986](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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