Stripe-PHP

Stripe-PHP

Language
PHP
Category
3
Version
8.12.0
Authors
Stripe
Description
The Stripe PHP library provides convenient access to the Stripe API from applications written in the PHP language. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses which makes it compatible with a wide range of versions of the Stripe API.
Install Instructions
  • Using composer:
composer require stripe/stripe-php
  • If you don't want to use composer, you can download the latest release and include the init.php file:
require_once('/path/to/stripe-php/init.php');
Usage
$stripe = new \Stripe\StripeClient('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
$customer = $stripe->customers->create([
'description' => 'example customer',
'email' => 'email@example.com',
'payment_method' => 'pm_card_visa',
]);
echo $customer;
Links