I'm using .NET and Stripe Checkout to handle payments.
I've recieved a payment, but it says that it is "Incomplete," and that the PaymentIntent requires a payment method.
I'm using Stripe Checkout and I didn't see anywhere that declaring payment method is required. Only that the following code relating to payment method is requied when creating the Session object:
PaymentMethodTypes = new List<string> {
"card",
},
I've tried creating a payment method using the API in the follwing way:
StripeConfiguration.ApiKey = {MY_STRIPE_API_KEY};
var options = new PaymentMethodCreateOptions
{
Type = "card",
};
var service = new PaymentMethodService();
var response = service.Create(options);
And attaching the response to the Customer object using:
StripeConfiguration.ApiKey = {MY_STRIPE_API_KEY};
var options = new PaymentMethodAttachOptions
{
Customer = customerId
};
var service = new PaymentMethodService();
service.Attach(
CreatePaymentMethod(),
options
);
But when I create the payment method, it says that I'm missing the parameter Card containing the customer's card details, which I don't have. I thought that was something the redirection to Stripe Checkout took care of.