Reputation: 277
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?
Upvotes: 3
Views: 3056
Reputation: 277
ugh... I am an idiot... I was missing a line to set my API secret key like so:
StripeConfiguration.SetApiKey(StripePrivateKey);
Upvotes: 6