// Set your secret key: remember to change this to your live secret key in production // See your keys here: https://dashboard.stripe.com/account/apikeys \Stripe\Stripe::setApiKey("sk_test_THf3QHV6Rokm41kEmuWll6dZ"); // Create a Customer: $customer = \Stripe\Customer::create([ 'source' => 'tok_mastercard', 'email' => 'paying.user@example.com', ]); // Charge the Customer instead of the card: $charge = \Stripe\Charge::create([ 'amount' => 1000, 'currency' => 'usd', 'customer' => $customer->id, ]); // YOUR CODE: Save the customer ID and other info in a database for later. // When it's time to charge the customer again, retrieve the customer ID. $charge = \Stripe\Charge::create([ 'amount' => 1500, // $15.00 this time 'currency' => 'usd', 'customer' => $customer_id, // Previously stored, then retrieved ]);