{"id":18973695,"url":"https://github.com/64robots/stripe","last_synced_at":"2025-06-30T07:33:05.874Z","repository":{"id":46471736,"uuid":"232119641","full_name":"64robots/stripe","owner":"64robots","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-20T20:02:01.000Z","size":78,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-22T03:56:03.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/64robots.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-06T14:35:48.000Z","updated_at":"2024-05-20T20:01:02.000Z","dependencies_parsed_at":"2024-05-20T21:24:56.758Z","dependency_job_id":"d271908c-b375-4061-9bc2-f71aabed3b26","html_url":"https://github.com/64robots/stripe","commit_stats":{"total_commits":42,"total_committers":4,"mean_commits":10.5,"dds":0.6904761904761905,"last_synced_commit":"06603b1a2b03ce19eeac674ee7b2a0b4ffd9fa02"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/64robots/stripe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/64robots%2Fstripe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/64robots%2Fstripe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/64robots%2Fstripe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/64robots%2Fstripe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/64robots","download_url":"https://codeload.github.com/64robots/stripe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/64robots%2Fstripe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262631013,"owners_count":23340182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T15:12:51.043Z","updated_at":"2025-06-30T07:33:05.854Z","avatar_url":"https://github.com/64robots.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Add stripe integration to laravel applications\n==============================================\n\nThis package makes it easier to add stripe integrations to laravel applications\n\n## Installation and setup\n\nTo get the latest version, simply require the package using [Composer](https://getcomposer.org):\n\n```bash\n$ composer require 64robots/stripe\n```\n\nOnce installed, this package will automatically register its service provider.\n\nTo publish the config file to `config/stripe.php` run:\n\n```bash\n$ php artisan vendor:publish --provider=\"R64\\Stripe\\StripeServiceProvider\" --tag=\"config\"\n```\n\n## Usage\nThe class you'd propably interact with the most is `PaymentProcessor` class. The processor class can be injected into other classes or can be resolved from the container.\n\n```\nuse R64\\Stripe\\PaymentProcessor;\n.\n.\n.\n\n$processor = app(PaymentProcessor::class);\n\n$charge = $processor-\u003ecreateCharge([\n    'customer' =\u003e 'cus_GVIiC06JWCq1mo',\n    'amount' =\u003e 100,\n    'currency' =\u003e 'USD',\n    'source' =\u003e 'tok_visa'\n]);\n```\n\n### Charges\n- To charge a credit or a debit card, you create a Charge object. You can create a charge using the `createCharge` method on the `PaymentProcessor` class. A `R64\\Stripe\\Objects\\Charge` object would be returned.\n\n```\n$charge = $processor-\u003ecreateCharge([\n    'customer' =\u003e 'cus_GVIiC06JWCq1mo',\n    'amount' =\u003e 100,\n    'currency' =\u003e 'USD',\n    'source' =\u003e 'tok_visa'\n]);\n```\n\n### Customers\nThe processor allows you to create, update, list customers and get a single customer.\n\n- To create a customer, use the `createCustomer` method on the processor. A `R64\\Stripe\\Objects\\Customer` object would be returned.\n\n```\n$customer = $processor-\u003ecreateCustomer([\n    'description' =\u003e 'Customer for jenny.rosen@example.com',\n    'source' =\u003e 'tok_visa',\n    'email' =\u003e jenny.rosen@example.com,\n    'metadata' =\u003e [\n        'first_name' =\u003e Rosen,\n        'last_name' =\u003e Gina,\n    ]\n]);\n```\n\n- To update a customer, use the `updateCustomer` method on the processor. A `R64\\Stripe\\Objects\\Customer` object would be returned.\n\n```\n$customer = $processor-\u003eupdateCustomer([\n    'id' =\u003e 1,\n    'email' =\u003e jenny.rosen@example.com,\n    'description' =\u003e Update jenny.rosen@example.com details,\n    'source' =\u003e 'tok_visa'\n]);\n```\n\n- To get a single customer, use the `getCustomer` method on the processor. A `R64\\Stripe\\Objects\\Customer` object would be returned.\n\n```\n$customer = $processor-\u003egetCustomer('cus_GVIiC06JWCq1mo');\n```\n\n### Card\nYou can get a card, create and update a card using the processor.\n\n- To get a single card details, use the `getCard` method on the processor. A `R64\\Stripe\\Objects\\Card` object would be returned.\n\n```\n$card = $processor-\u003egetCard('cus_GVIiC06JWCq1mo', 'card_1FyI6w2eZvKYlo2COseWzZAo');\n```\n\n- To create a card, use the `createCard` method on the processor. A `R64\\Stripe\\Objects\\Card` object would be returned.\n\n```\n$card = $processor-\u003ecreateCard([\n    'source' =\u003e 'tok_visa'\n]);\n```\n\n- To update a card, use the `updateCard` method on the processor. A `R64\\Stripe\\Objects\\Card` object would be returned.\n\n```\n$card = $processor-\u003eupdateCard(\n    'cus_GVIiC06JWCq1mo',\n    'card_1FyI6w2eZvKYlo2COseWzZAo',\n    [\n        'name' =\u003e 'Jenny Rosen'\n    ]\n);\n```\n\n### Plan and Subscription\nPlans define the base price, currency, and billing cycle for subscriptions.\n\n- To create a product, use the `createProduct` method on the processor. A `R64\\Stripe\\Objects\\Product` object would be returned.\n\n```\n$product = $processor-\u003ecreateProduct([\n    'name' =\u003e 'Monthly membership base fee',\n    'type' =\u003e 'service',\n]);\n```\n\n- To create a plan, use the `createPlan` method on the processor. A `R64\\Stripe\\Objects\\Plan` object would be returned.\n\n```\n$plan = $processor-\u003ecreatePlan([\n    'product' =\u003e ['name' =\u003e 'Gold special'],\n    'nickname' =\u003e 'special,\n    'interval' =\u003e 'month',\n    'billing_scheme' =\u003e 'per_unit',\n    'amount' =\u003e 100,\n    'currency' =\u003e 'usd'\n]);\n```\n\n- To create a subscription, use the `createSubscription` method on the processor. A `R64\\Stripe\\Objects\\Subscription` object would be returned.\n\n```\n$subscription = $processor-\u003ecreateSubscription([\n    'customer' =\u003e 'cus_GVIiC06JWCq1mo',\n    'items' =\u003e [\n        [\n            'object' =\u003e 'list',\n            'plan' =\u003e plan_GVIh1z2696UJyR\n        ]\n    ]\n]);\n```\n\n- To create an invoice, use the `createInvoice` method on the processor. A `R64\\Stripe\\Objects\\Invoice` object would be returned.\n\n```\n$invoice = $processor-\u003ecreateInvoice([\n    'customer' =\u003e 'cus_GVIiC06JWCq1mo',\n    'subscription' =\u003e 'sub_DUVhBH3LKxekhs',\n]);\n```\n\n- To create an invoice item, use the `createInvoiceItem` method on the processor. A `R64\\Stripe\\Objects\\InvoiceItem` object would be returned.\n\n```\n$invoiceItem = $processor-\u003ecreateInvoiceItem([\n    'customer' =\u003e 'cus_GVIiC06JWCq1mo',\n    'subscription' =\u003e 'sub_DUVhBH3LKxekhs',\n    'amount' =\u003e 100,\n    'currency' =\u003e 'usd',\n]);\n```\n\n- To get an invoice details, use the `getInvoice` method. A `R64\\Stripe\\Objects\\Invoice` object would be returned.\n\n```\n$invoice = $this-\u003eprocessor-\u003egetInvoice('in_1FJSdj2eZvKYlo2CCyOhyNxj');\n```\n\n- To get a subscription details, use the `getSubscription` method. A `R64\\Stripe\\Objects\\Subscription` object would be returned.\n\n```\n$subscription = $this-\u003eprocessor-\u003egetSubscription(sub_DUVhBH3LKxekhs);\n```\n\n### Card Holder\nYou can create, update and get a card holder's details.\n\n- To create a card holder, use the `createCardHolder` method. A `R64\\Stripe\\Objects\\CardHolder` object would be returned.\n\n```\n$cardHolder = $processor-\u003ecreateCardHolder([\n    'type' =\u003e 'individual',\n    'name' =\u003e 'Jenny Rosen',\n    'email' =\u003e 'jenny.rosen@example.com',\n    'phone_number' =\u003e '+18888675309',\n    'billing' =\u003e [\n        'name' =\u003e 'Jenny Rosen',\n        'address' =\u003e [\n        'line1' =\u003e '1234 Main Street',\n        'city' =\u003e 'San Francisco',\n        'state' =\u003e 'CA',\n        'country' =\u003e 'US',\n        'postal_code' =\u003e '94111',\n        ],\n    ],\n]);\n```\n\n- To update a card holders details, use the `updateCardHolder` method. A `R64\\Stripe\\Objects\\CardHolder` object would be returned.\n\n```\n$cardHolder = $processor-\u003eupdateCardHolder([\n    'ich_1Ccy6F2eZvKYlo2ClnIm9bs4',\n    [\n        'metadata' =\u003e [\n            'order_id' =\u003e '6735'\n        ]\n    ]\n])\n```\n\n- To retrieve a card holder, use the `getCardHolder` method. A `R64\\Stripe\\Objects\\CardHolder` object would be returned.\n\n```\n$cardHolder = $processor-\u003egetCardHolder('ich_1Ccy6F2eZvKYlo2ClnIm9bs4');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F64robots%2Fstripe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F64robots%2Fstripe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F64robots%2Fstripe/lists"}