PHPackages                             creatydev/authorize-billing - 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. creatydev/authorize-billing

ActiveLibrary[Payment Processing](/categories/payments)

creatydev/authorize-billing
===========================

Laravel Cashier-Authorize provides an expressive, fluent interface to Authorize.net's subscription billing services.

19PHPCI failing

Since Feb 6Pushed 6y ago1 watchersCompare

[ Source](https://github.com/creatydev/authorize-billing)[ Packagist](https://packagist.org/packages/creatydev/authorize-billing)[ RSS](/packages/creatydev-authorize-billing/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Cashier-Authorize
=========================

[](#laravel-cashier-authorize)

Introduction
------------

[](#introduction)

Laravel Cashier-Authorize provides an expressive, fluent interface to [Authorize.net's](https://authorize.net) subscription billing services. It handles almost all of the boilerplate subscription billing code you are dreading writing. In addition to basic subscription management, Cashier-Authorize can handle cancellation grace periods, and even generate invoice PDFs.

Basic Setup
-----------

[](#basic-setup)

Please read the following for the basic setup.

#### .env

[](#env)

ADN\_ENV= ADN\_LOG=authorize.log

ADN\_API\_LOGIN\_ID= ADN\_TRANSACTION\_KEY= ADN\_SECRET\_KEY=Simon

ADN\_ENV should be one of: sandbox, production

#### Migrations

[](#migrations)

You will need to make migrations that include the following:

```
Schema::table('users', function ($table) {
    $table->string('authorize_id')->nullable();
    $table->string('authorize_payment_id')->nullable();
    $table->string('card_brand')->nullable();
    $table->string('card_last_four')->nullable();
});
```

```
Schema::create('subscriptions', function ($table) {
    $table->increments('id');
    $table->integer('user_id');
    $table->string('name');
    $table->string('authorize_id');
    $table->string('authorize_payment_id');
    $table->text('metadata');
    $table->string('authorize_plan');
    $table->integer('quantity');
    $table->timestamp('trial_ends_at')->nullable();
    $table->timestamp('ends_at')->nullable();
    $table->timestamps();
});
```

#### Publish

[](#publish)

You will need to publish the assets of this package.

`php artisan vendor:publish --provider="Laravel\CashierAuthorizeNet\CashierServiceProvider"`

#### Config

[](#config)

Below is an example config for a subscription with Authorize.net compatibility. You can define your subscriptions in this config.

```
'monthly-10-1' => [
    'name' => 'main',
    'interval' => [
        'length' => 1, // number of instances for billing
        'unit' => 'months' //months, days, years
    ],
    'total_occurances' => 9999, // 9999 means without end date
    'trial_occurances' => 0,
    'amount' => 9.99,
    'trial_amount' => 0,
    'trial_days' => 0,
    'trial_delay' => 0, // days you wish to delay the start of billing
]
```

#### 'config/services.php'

[](#configservicesphp)

You will need to add the following to your 'config/services.php' file, please make sure that the model matches your app's User class:

```
'authorize' => [
    'model'  => App\User::class,
],
```

You can also set this value with the following `.env` variable: ADN\_MODEL

Basic Usage
-----------

[](#basic-usage)

There are differences with Authorize.net vs services like Stripe. Authorize.net is a slighly slower and more restricted subscription provider. This means you cannot do things like swap subscriptions, or change quantity of subscriptions. You need to cancel, and create new subscriptions to handle those variations.

You can perform the following actions:

User::

- charge($amount, array $options = \[\])
- hasCardOnFile
- newSubscription($subscription, $plan)
- onTrial($subscription = 'default', $plan = null)
- onGenericTrial()
- subscribed($subscription = 'default', $plan = null)
- subscription($subscription = 'default')
- subscriptions()
- updateCard($card) // $card = \['number' =&gt; '', 'expriation' =&gt; ''\]
- subscribedToPlan($plans, $subscription = 'default')
- onPlan($plan)
- hasAuthorizeId()
- createAsAuthorizeCustomer($creditCardDetails)
- upcomingInvoice($plan)
- findInvoice($invoiceId)
- findInvoiceOrFail($id)
- downloadInvoice($id, array $data, $storagePath = null)
- getSubscriptionFromAuthorize($subscriptionId)
- invoices($plan)
- deleteAuthorizeProfile()
- preferredCurrency()
- taxPercentage() (this method should be added to the User Model and define that user's tax percentage ie: return 10;)

#### Transaction Details

[](#transaction-details)

Enabling the API To enable the Transaction Details API:

1. Log on to the Merchant Interface at  .
2. Select Settings under Account in the main menu on the left.
3. Click the Transaction Details API link in the Security Settings section. The Transaction Details API screen opens.
4. If you have not already enabled the Transaction Details API, enter the answer to your Secret Question, then click Enable Transaction Details API.
5. When you have successfully enabled the Transaction Details API, the Settings page displays.

### CRON job

[](#cron-job)

You need to enable the following CRON job to check the status of your user's subscriptions. This can run as often as you like, and will check to confirm that your user's subscription is active. If the status is changed to cancelled or suspended - the system will disable their subscription locally. Your team will need to resolve the payment issue with Authorize.net and then move forward.

```
protected $commands = [
    \Laravel\CashierAuthorizeNet\Console\SubscriptionUpdates::class,
];
```

```
$schedule->command('subscription:update')->hourly();
```

#### Limitations

[](#limitations)

Another limitation is time related. Due to the fact that Authorize.net uses a SOAP structure for its APIs, there needs to be a time delay between adding a customer with a credit card to their system and then adding a subscription to that user. This could be done easily in your app by having the user enter their credit card information, and then allowing a confirmation of the subscription they wish to purchase as another action. This time can be as little as a second, but all tests thus far with immediate adding of subscriptions fails to work, so please be mindful of this limitation when designing your app.

License
-------

[](#license)

Laravel Cashier-Authorize is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)"# cashier-authorize"

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd557dbb71b9e04a3f1a53580bcf33b0af7aabfa3389079ebb95d7c594ab4dac?d=identicon)[dukenst2006](/maintainers/dukenst2006)

---

Top Contributors

[![dukenst2006](https://avatars.githubusercontent.com/u/7965394?v=4)](https://github.com/dukenst2006 "dukenst2006 (12 commits)")

### Embed Badge

![Health badge](/badges/creatydev-authorize-billing/health.svg)

```
[![Health](https://phpackages.com/badges/creatydev-authorize-billing/health.svg)](https://phpackages.com/packages/creatydev-authorize-billing)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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