I am using Stripe Asp.net C# to charge customers for subscriptions when they sign up. I have multiple products (created inside stripe) that I pull from to assign to that customer's subscription. It successfully
- Creates the customer
- Assigns the subscriptions to the customer
The only thing that I am noticing is that it really does not charge the customer up front, it looks like it invoices the customer a $0.00 amount and carries over the subscription amount to the next bill which would be a month from the date created. For example if the customers subscription is $5.00 a month it will charge $0.00 and carry over the $5.00 to the next billing cycle which would make it a total of $10.00
I have tried to update the "BillingCycleAnchor" I have noticed through the errors that is has to be a future time stamp which I just added 2 minutes. This was unsuccessful as well below is the code that creates the subscription. Any help is appreciated.
if (numberOfUsersMinusBase > 0)
{
var items = new List<SubscriptionItemOptions>
{
//Subscription Price
new SubscriptionItemOptions
{
Price = "SubscriptionPriceId"
},
//Additional Users Subscription
new SubscriptionItemOptions
{
Price = "AdditionalUsersSubscriptionPriceId"
Quantity = numberOfUsersMinusBase,
},
};
var options = new SubscriptionCreateOptions
{
Customer = customer.Id,
Items = items,
BillingCycleAnchor = DateTime.Now.AddMinutes(2),
};
var service = new SubscriptionService();
Subscription subscription = service.Create(options);
}