#CapitanRex-subs
1 messages · Page 1 of 1 (latest)
"This customer has no attached payment source or default payment method."
Only tells me this
if i write the payment method ID in the subscription then runs without problem
var options = new SubscriptionCreateOptions
{
Customer = customerId,
DefaultPaymentMethod = PaymentId
Items = subs
};
var subCreated = service.Create(options);
But im trying now to get the payment methods of a customer and the API is returning nothing when listing
for the default_payment_method [0] parameter, you should either input the ID of the default payment method for the subscription - it must belong to the customer associated with the subscription, or if that's not set, the invoice will attempt to use the customer’s invoice_settings.default_payment_method [1]
[0]https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method
[1] https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
Solved, thx