I got charge.php making my subscription. The issue I noticed is the period is from today -> the following date the next year.
What happens at the end of the period:
screenshot: http://d.pr/i/6MEn
Does stripe make another invoice from feb 2017 - feb 2018? Or do I need to do some coding to make sure a users subscription never stops until they cancel it?
Thanks! Sorry if its been asked, but I searched.
Here is my code for a new user, to make the user - make the plan - add the user to the custom plan (since it's a donation form, user picks the amount and the term to run (every month, 3 months, 6 months, etc)
$stripe_new_customer = \Stripe\Customer::create(array(
"source" => $token,
"description" => $name,
"email" => $email,
"metadata" => array("order_id" => $order_id, "source" => "Website Online Donation")
));
$customer_id = $stripe_new_customer->id;
$stripe_plan = \Stripe\Plan::create(array(
"amount" => $amount,
"interval" => "month",
"interval_count" => $term,
"name" => "Recurring Donation",
"currency" => "usd",
"id" => $plan_name
)
);
$customer_made = \Stripe\Customer::retrieve($customer_id);
$customer_made->subscriptions->create(array("plan" => $plan_name));
$plan_remove = \Stripe\Plan::retrieve($plan_name);
$plan_remove->delete();