0
votes

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);
        }
1
This should in fact be the default behaviour when starting a subscription without a trial or billing date adjustment for license-based Prices. You should remove the billing cycle anchor shift. Are you using metered usage, or any other non-default options not shown here? - Nolan H
If you are looking the latest solution of Stripe integration in ASP.NET, check out the demo for One Time payments >>> techtolia.com/Stripe - the demo for Subscriptions/Recurring payments >>> techtolia.com/StripeSubscriptions - Leo

1 Answers

0
votes

It had something to do with the amount I was charging as a test. It looks like stripe automatically rolls over the amount until it hits the amount necessary for them to create a transaction. It says $.50, but I was doing $.80 maybe it is anything over the amount that they take such as the .30 per transaction plus the 1.9% of the transaction amount