3

My program successfully creates a token and passes it. It then creates all of the relevant information for a customer for Stripe.

                var customer = new StripeCustomerCreateOptions();

            customer.Email = $"{user.Email}";
            customer.Description = $"{user.Email} [{userId}]";
            customer.PlanId = planId;
            customer.SourceToken = stripeToken;
            customer.Quantity = 1;
            var customerService = new StripeCustomerService();
            StripeCustomer stripeCustomer = customerService.Create(customer);

I confirmed that all of those are passing their values properly to the customer object but, I get the error in the title. What am I missing?

Alex Rohr
  • 277
  • 4
  • 14

1 Answers1

6

ugh... I am an idiot... I was missing a line to set my API secret key like so:

StripeConfiguration.SetApiKey(StripePrivateKey);
Alex Rohr
  • 277
  • 4
  • 14