Skip to content

Instantly share code, notes, and snippets.

@LarryUllman
Created July 23, 2014 03:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LarryUllman/86b67f3f3b7e969604c8 to your computer and use it in GitHub Desktop.
Save LarryUllman/86b67f3f3b7e969604c8 to your computer and use it in GitHub Desktop.
Stripe - PHP - Create Customer with Subscription
// Create a customer, subscribe them to a plan, with a 7 day trial:
$cu = Stripe_Customer::create(array(
'email' => $email,
'card' => $token,
'plan' => '10_monthly'
'trial_end' => time() + (7 * 24 * 60 * 60), // 7 days
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment