PHPackages                             origami/stripe - 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. [Payment Processing](/categories/payments)
4. /
5. origami/stripe

ActiveLibrary[Payment Processing](/categories/payments)

origami/stripe
==============

Stripe PaymentIntents helper package

2.4.0(2mo ago)23.2k↓100%MITPHPPHP ^7.2|^8.0.2

Since Sep 13Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/papertank/origami-stripe)[ Packagist](https://packagist.org/packages/origami/stripe)[ RSS](/packages/origami-stripe/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (3)Versions (12)Used By (0)

Origami Stripe Package
======================

[](#origami-stripe-package)

This package is a helper for Laravel projects using Stripe's PaymentIntents API and manual confirmation SCA setup.

It was inspired by the SCA updates and logic on the [Laravel Cashier](https://github.com/laravel/cashier) package.

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

[](#installation)

Install this package through Composer.

```
composer require origami/stripe

```

### Requirements

[](#requirements)

This package is designed to work with Laravel &gt;= 6.0 projects currently.

### Setup

[](#setup)

1. You should add a your stripe keys to your `config/services.php` file:

```

    'stripe' => [
        'secret' => env('STRIPE_SECRET'),
        'key' => env('STRIPE_KEY'),
        'webhook' => [
            'secret' => env('STRIPE_WEBHOOK_SECRET'),
        ]
    ],
```

2. Update your `.env` file with the key and secret:

```
STRIPE_KEY=
STRIPE_SECRET=
STRIPE_WEBHOOK_SECRET=

```

Usage
-----

[](#usage)

### Payment object

[](#payment-object)

```
// Make a Payment from a payment_intent ID.
$payment = Origami\Stripe\Payment::find($id);

// Or create a Payment as a new payment_intent
$payment = Origami\Stripe\Payment::create([
    'amount' => 1000,
    'currency' => 'gbp',
    'payment_method' => $method,
    'capture_method' => 'manual',
    'payment_method_types' => ['card'],
    'confirmation_method' => 'manual',
    'confirm' => true,
]));
```

### Available Methods

[](#available-methods)

#### Get amount

[](#get-amount)

Returns amount as `Money\Money` object using [moneyphp/money](https://github.com/moneyphp/money)

```
$payment->amount();
```

### Check status

[](#check-status)

Returns a boolean:

```
public function hasStatus($status)
```

You can pass an array or a string:

```
$payment->hasStatus(['requires_confirmation','requires_capture']);
$payment->hasStatus('requires_confirmation');
```

There are also helper methods for the PaymentIntent statuses:

```
$payment->requiresConfirmation();
$payment->requiresPaymentMethod();
$payment->requiresCapture();
$payment->requiresAction();
$payment->isCancelled();
$payment->isSucceeded();
$payment->isSuccessful(); // Alias for above
```

### Validate PaymentIntent

[](#validate-paymentintent)

See

```
try {

    $payment = Origami\Stripe\Payment::create([
        'amount' => 1000,
        'currency' => 'gbp',
        'payment_method' => $method,
        'capture_method' => 'manual',
        'payment_method_types' => ['card'],
        'confirmation_method' => 'manual',
        'confirm' => true,
    ]));

    if (!$payment) {
        throw new Exception('Error fetching Stripe payment');
    }

    $payment->validate();

    // PaymentIntent is valid
    // capture_method: manual above means we need to capture in another controller
    // capture_method: automatic above means the payment was successully taken

    return response([
        'payment_intent_id' => $payment->id,
        'success' => true,
    ]);

} catch (Origami\Stripe\PaymentActionRequired $e) {
    // Action is required on the client end - see Stripe docs.
    return response()->json([
        'requires_action' => true,
        'payment_intent_client_secret' => $e->payment->clientSecret(),
        'success' => false,
    ], 200);
} catch (Origami\Stripe\PaymentFailed $e) {
    // Payment failed - handle on the client end.
    return response()->json([
        'error' => $e->getMessage(),
        'success' => false,
    ], 500);
} catch (Stripe\Exception\CardException $e) {
    // Don't forget to handle Stripe's exceptions for declined cards, etc.
    return response()->json([
        'error' => $e->getMessage(),
        'success' => false,
    ], 500);
} catch (Exception $e) {
    // Something else went wrong.
    Log::error($e);
    return response()->json(['error' => 'Unexpected error', 'success' => false], 500);
}
```

Author
------

[](#author)

[Papertank Limited](http://papertank.com)

License
-------

[](#license)

[MIT License](http://github.com/papertank/origami-stripe/blob/master/LICENSE)

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance86

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~236 days

Recently: every ~348 days

Total

11

Last Release

67d ago

Major Versions

1.2.0 → 2.0.02020-09-13

1.3.0 → 2.1.02022-05-13

PHP version history (3 changes)1.0.0PHP &gt;=5.6.0

2.0.0PHP ^7.2

1.3.0PHP ^7.2|^8.0.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b1eb2c68ae9c43fc61ae8aa21aabaf932fcb1fd2372e77db8e7800d38cdf3d2?d=identicon)[papertank](/maintainers/papertank)

---

Top Contributors

[![davidrushton](https://avatars.githubusercontent.com/u/4039772?v=4)](https://github.com/davidrushton "davidrushton (21 commits)")

---

Tags

laravel-packagestripe

### Embed Badge

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

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

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M106](/packages/laravel-cashier)[lemonsqueezy/laravel

A package to easily integrate your Laravel application with Lemon Squeezy.

58596.1k](/packages/lemonsqueezy-laravel)[duncanmcclean/simple-commerce

A simple, yet powerful e-commerce addon for Statamic.

16313.2k2](/packages/duncanmcclean-simple-commerce)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

322.8k](/packages/duncanmcclean-statamic-cargo)[cloudcreativity/laravel-stripe

Laravel integration for Stripe, including Stripe Connect.

4112.4k](/packages/cloudcreativity-laravel-stripe)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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