Here's an example of how I implemented a coupon input in a recent project, see if this can help you :) taking note of the withCoupon($coupon) method.
public function subscribe($token)
{
$id = Auth::id();
$user = User::find($id);
$coupon = Input::get('coupon');
// Check if a coupon is present
if (isset($coupon))
{
$user->subscription('test-sub')->withCoupon($coupon)->create($token,
['tax_percent' => 20.0,
'email' => $user->email,
'description' => 'Subscription'],
null);
}
// If there's no coupon, continue with ordinary subscription
else {
$user->subscription('test-sub')->create($token,
['tax_percent' => 20.0,
'email' => $user->email,
'description' => 'Subscription'],
null);
}
// Update the database with the returned StripeToken, that Stripe provide us with, to be used later
// for resuming subscriptions etc.
$user->stripe_token = $token;
$user->update();
return true;
}