PHPackages                             datalive/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. datalive/stripe

ActivePackage[Payment Processing](/categories/payments)

datalive/stripe
===============

php component to connect applications with stripe

04PHP

Since Oct 3Pushed 7y ago1 watchersCompare

[ Source](https://github.com/IngPanda/dataLiveStripe)[ Packagist](https://packagist.org/packages/datalive/stripe)[ RSS](/packages/datalive-stripe/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Data live Stripe
================

[](#data-live-stripe)

Description
-----------

[](#description)

php component to connect applications with stripe

Installation / Usage
--------------------

[](#installation--usage)

Via Composer
------------

[](#via-composer)

```
$ composer require datalive/stripe
```

After installing via composer, run the migration command
--------------------------------------------------------

[](#after-installing-via-composer-run-the-migration-command)

```
$ php artisan migrate
```

Create Account in Stripe
------------------------

[](#create-account-in-stripe)

[https://stripe.com//](https://stripe.com/)

In the dashboard options

-Developers -API Keys

copy the Secret key

In the laravel environment file should go the following data -STRIPE\_KEY (Secret key from stripe) -APP\_ENV -APP\_NAME

Requirements
------------

[](#requirements)

- PHP 7.1.3
- Laravel 5.6 or higher

Usage
-----

[](#usage)

```
namespace App\Http\Controllers;

use datalive\stripe\Stripe;

class UserController extends Controller
{
    public function createCustomer(Request $request)
    {
    	$wallet = new Stripe;
    	$customer = $wallet->createConstumer($user->id);
    }
}
```

Methods
-------

[](#methods)

\##createConstumer

-code

```
		$wallet = new Stripe;
    	$customer = $wallet->createConstumer($user->id);
```

- params

    - account\_id: Local identifier of the account to which you want to link the customer stripe
- return

    - all customer data stored in stripe

\##getCostumerId

-code

```
		$wallet = new Stripe;
    	$customer = $wallet->getCostumerId($user->id);
```

- params

    - account\_id: Local identifier of the account.
- return

    - the customer identifier in stripe

\##getDataCustomer -code

```
		$wallet = new Stripe;
    	$customer = $wallet->getDataCustomer($user->id);
```

- params

    - account\_id: Local identifier of the account.
- return

    - all customer data stored in stripe

\##createCreditCard -code

```
		$wallet = new Stripe;
    	$customer = $wallet->createCreditCard($user->id,$token_card);
```

- params

    - account\_id: Local identifier of the account.
    - $token: Token generated by the front end of stripe using the public key.
- return

    - all credit card data stored in stripe

\##getCreditCards

-code

```
		$wallet = new Stripe;
    	$customer = $wallet->getCreditCards($user->id,$card_id);
```

- params

    - account\_id: Local identifier of the account.
    - $card\_id: (optional) identifier of the credit card in stripe, if the value is not sent the function returns a list of the credit cards
- return

    - all credit card data stored in stripe / list credit cards

\##deleteCreditCard -code

```
		$wallet = new Stripe;
    	$customer = $wallet->deleteCreditCard($user->id,$card_id);
```

- params

    - account\_id: Local identifier of the account.
    - $card\_id: identifier of the credit card in stripe
- return

    - Boolean response of the operation

\##updateCreditCard

-code

```
		$wallet = new Stripe;
    	$customer = $wallet->updateCreditCard($user->id,$card_id,[
		    'name'          => 'John Doe',
		    'address_line1' => 'Example Street 1',
			]);
```

- params

    - account\_id: Local identifier of the account.
    - $card\_id: identifier of the credit card in stripe
    - $data: Array with a single data that can be modified from a credit card

```
$data = [
    'name'          => 'John Doe',
    'address_line1' => 'Example Street 1',
    'address_line2' => 'Example Street 2',
    'address_state' => 'Texas',
    'address_zip' 	=> '55555',
    'exp_month' 	=> '03',
    'exp_year' 	=> '2025',

]
```

- return

    - all credit card data stored in stripe

\##generateTokenCreditCard

Note: this method should only be used for testing purposes since its use in production may result in misuse of data that is sensitive and vulnerable to scams or fraud

-code

```
		$wallet = new Stripe;
    	$customer = $wallet->generateTokenCreditCard($user->id,[
                  'number'    => '4242424242424242',
                  'exp_month' => 10,
                  'cvc'       => 314,
                  'exp_year'  => 2020,
              ]);
```

- params

    - account\_id: Local identifier of the account.
    - $data: array with credit card data

    Note: if the fix is not sent within the function a test token with test data is created

```
			$data =[
                  'number'    => '4242424242424242',
                  'exp_month' => 10,
                  'cvc'       => 314,
                  'exp_year'  => 2020,
              ]
```

- return

    - token credit card

\##loadCharge

-code

```
		$wallet = new Stripe;
    	$customer = $wallet->loadCharge($account_id,$amount,$description,$metadata,$currency)
```

- params

    - account\_id: Local identifier of the account.
    - $amount: amount of the charge
    - $description: description of the charge
    - $metadata: array with additional caharge data
    - $currency: (Default value if not sent is USD)
- return

    - all charge data stored in stripe

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity40

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18577717?v=4)[Samuel Useche](/maintainers/IngPanda)[@IngPanda](https://github.com/IngPanda)

### Embed Badge

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

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

###  Alternatives

[omnipay/coinbase

Coinbase driver for the Omnipay payment processing library

18570.2k1](/packages/omnipay-coinbase)

PHPackages © 2026

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