#Mr.Medi
1 messages · Page 1 of 1 (latest)
I am following the guide in https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#create-subscription to complete the checkout in django
Hi there, this step is just to create a subscription, is your question about what save_default_payment_methodp aram do?
My question is about this error This customer has no attached payment source or default payment method. Please consider adding a default payment method. Im trying to understand how to solve it in the payment flow
Yes
I have python subscription = stripe.Subscription.create( customer=customer_id, items=[{ 'price': price_id, }], payment_behavior='default_incomplete', payment_settings={'save_default_payment_method': 'on_subscription'}, expand=['latest_invoice.payment_intent'], )
Can you share with me the request ID?
req_tYSvwPNR6YkTKT
it should be sent in this js line? ```javascript
stripe.confirmPayment(...
Hey! Taking over for my colleague. Let me catch up.
No when you are calling POST /v1/subscriptions
but im sending it in python
According to the requestId req_tYSvwPNR6YkTKT you are not sending it...
it should be like that?
subscription = stripe.Subscription.create( customer=customer_id, items=[{ 'price': price_id, }], payment_behavior='default_incomplete', payment_settings={'save_default_payment_method': 'on_subscription'}, expand=['latest_invoice.payment_intent'], )
I think that I managed to do it
now is correct, right? req_7MU1cvY8iBwH2G
Yes exactly!
Perfect, thank you! 🙂