## A recurring charge to a pre-made payment plan in Stripe settings
if(!is.null(plan)){
message("Customer created with plan")
customer <- try(create_customer(idempotency=idempotency,
source = token$id,
email = email,
plan = plan,
account_balance = status$account_balance,
coupon = status$coupon,
quantity = status$quantity,
trial_end = status$trial_end,
metadata = metadata))
updateStatus(customer, status)
## TODO: add condition to update customer with new plan