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?

1
  • if you require more information to figure it out I will make edits
    – Alex Rohr
    Jul 18, 2016 at 20:22

1 Answer 1

6

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

StripeConfiguration.SetApiKey(StripePrivateKey);
1
  • 1
    First time I didn't notice - PRIVATE key not set.
    – niico
    Apr 29, 2017 at 8:53

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.