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

ActiveLibrary

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

Unofficial Affirm php sdk

1.0.1(8y ago)013.0k↓50%3[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 1mo ago

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 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

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

3079d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e8a4cc3999e47a7c2617fe87ab051656c601afbcbf03d9c9ee4e127a3f9696ec?d=identicon)[mikedfunk](/maintainers/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

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k20](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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