PHPackages                             suseche/walletstripe - 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. suseche/walletstripe

ActivePackage[API Development](/categories/api)

suseche/walletstripe
====================

php component to connect applications with stripe

0271PHP

Since Oct 10Pushed 7y ago3 watchersCompare

[ Source](https://github.com/IngPanda/walletStripe)[ Packagist](https://packagist.org/packages/suseche/walletstripe)[ RSS](/packages/suseche-walletstripe/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

WalletStripe
============

[](#walletstripe)

### Description

[](#description)

php component to connect applications with stripe

### Installation / Usage

[](#installation--usage)

#### 1. Use Composer

[](#1-use-composer)

```
$ composer require suseche/walletstripe
```

#### 2. Run the migration command

[](#2-run-the-migration-command)

```
$ php artisan migrate
```

#### 3. Create Account in Stripe

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

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

In the dashboard options go to:

- Developers
    - API Keys

Copy the Secret key provided by stripe and in the laravel environment file add the following:

```
-STRIPE_KEY (Secret key from stripe)
-APP_ENV
-APP_NAME

```

### Requirements

[](#requirements)

- PHP 7.1.3
- Laravel 5.6

### Usage

[](#usage)

```
namespace App\Http\Controllers;

use suseche\walletstripe\WalletStripe;

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

### Methods

[](#methods)

- **createConstumer**

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

1. **params**

    *account\_id*: Account's local identifier which you want to link the customer stripe to.
2. **return**

    All customer data stored in Stripe

- **getCostumerId**

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

1. **params**

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

    - The customer identifier in stripe

- **getDataCustomer**

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

1. **params**

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

    - All customer data stored in stripe

- **createCreditCard**

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

1. **params**

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

    - All credit card data stored in stripe

- **getCreditCards**

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

1. **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
2. **return**

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

- **deleteCreditCard**

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

1. **params**

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

    - Boolean response of the operation

- **updateCreditCard**

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

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',
    ]
```

2. **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*

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

1. **params**

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

    *Note: if the array 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,
    ]
```

2. **return**

    - token credit card

- **loadCharge**

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

1. **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: A string representing the currency in ISO format (Default value if not sent is USD)
2. **return**

    - all charge data stored in stripe

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

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://avatars.githubusercontent.com/u/18577717?v=4)[Samuel Useche](/maintainers/IngPanda)[@IngPanda](https://github.com/IngPanda)

---

Top Contributors

[![IngPanda](https://avatars.githubusercontent.com/u/18577717?v=4)](https://github.com/IngPanda "IngPanda (24 commits)")

### Embed Badge

![Health badge](/badges/suseche-walletstripe/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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