Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report

stripe/stripe-php v13.11.0-beta.1

Stripe PHP Library
Package summary
Share
0
issues
0
licenses
Package created
1 May 2012
Version published
2 Feb 2024
Maintainers
1
Total deps
0
Direct deps
0
License
MIT
Generating a report...
Hold on while we generate a fresh audit report for this package.

Frequently Asked Questions

What does stripe/stripe-php do?

The stripe/stripe-php is a powerful library that gives PHP applications convenient access to the Stripe API. Enabling functionalities ranging from handling payments to managing customers and subscriptions, it provides a wide range of features that are compatible with various versions of the Stripe API. The stripe/stripe-php package greatly simplifies the integration process with Stripe, helping to expedite monetization models within applications.

How do you use stripe/stripe-php?

You can begin using stripe/stripe-php by installing it via Composer - a package manager for PHP. To do so, run the command composer require stripe/stripe-php. Once installed, it can be included in your PHP scripts using Composer's autoload, with the line of code require_once 'vendor/autoload.php'.

Here's a simple example of how to create a new customer using stripe/stripe-php:

$stripe = new \Stripe\StripeClient('your_api_key');
$customer = $stripe->customers->create([
    'description' => 'example customer',
    'email' => 'email@example.com',
    'payment_method' => 'your_payment_method',
]);
echo $customer;

This example involves initializing a new Stripe client with your API key and then calling the create() function under customers. This function accepts an array of properties for the new customer. Information about the newly created customer is then printed out.

Remember to replace 'your_api_key' and 'your_payment_method' with your actual stripe API key and payment method respectively.

Where are the stripe/stripe-php docs?

The stripe/stripe-php documentation is an excellent resource for learning more about this library. It consists of detailed information on how to use various features of the Stripe API using the PHP bindings. You can access it at Stripe's PHP API Documentation. The official Github repository also contains a useful README and other helpful resources.