Skip to content

Instantly share code, notes, and snippets.

@cjavilla-stripe
cjavilla-stripe / index.php
Created December 11, 2020 19:11
Simple one button Checkout with php
<?php
require_once('vendor/autoload.php');
\Stripe\Stripe::setApiKey('sk_test_...');
$session = \Stripe\Checkout\Session::create([
'payment_method_types' => ['card'],
'line_items' => [[
'price_data' => [
'currency' => 'usd',