#kirito
1 messages · Page 1 of 1 (latest)
Can you share some snippets from your integration showing what you're doing?
And an example subscription ID I can look at?
creating a subscription with the default payment method from, the start
Can you explain what you expect to be happening? Because you don't specify adefault_payment_methodwhen creating this subscriptions, and the customer does not have a default PM set for invoices, either (or any attached PM at all)
Subscription create request: https://dashboard.stripe.com/test/logs/req_tLwulfTm7pLBf1
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
It looks like you're using default_incomplete already as we suggest in the guide, but you need to continue with the step o collect the payment information to pay that first invoice:
https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#collect-payment
I understand, could I use the customer default payment method then to pay the first subscription?
I want to pay for subscription with existing payment method
If there's already an attached valid payment method, then you would just add that Customer to the Subscription upon creation
I understand thank you
I'm I have used attached a payment method to customer the customer before creating the subscription. but the status of the subscriptions is still incomplete even after that
here is the id of the subscription : sub_1MYzeBFeR0PUZyO7ALxjevh1
Can you try doing that again, but also set default_payment_method on the Customer object?
https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Still getting the same probleme
I don't know can I take the client secret of the subscription and use the payment method to pay from the server ?
What do you mean by "still getting the same problem"? Like, what is the problem? Is it an error code? An unfinished Subscription? Please be specific
incomplete subscription
Do you have an example Subscription that had the default_payment_method set on the Customer before the Subscription was created?
sub_1MZ0D2FeR0PUZyO7tNMDNfcz
The reason your invoice isn’t automatically paid is because you are explicitly passing in a payment_behavior of default_incomplete, which tells Stripe not to pay the invoice and allows you to collect payment details client-side and confirm the payment. Since you have already collected payment details, don’t pass in a payment_bevavior of default_incomplete.
ok
Thanks it is working
would that mean that if the payment method is not working (insufficient resource or declined) the subscription object will throw an error?
Hi 👋
The default behavior is allow_incomplete. We describe what each of the behaviors mean in terms of how the subscription will behave here: https://stripe.com/docs/api/subscriptions/create?lang=go#create_subscription-payment_behavior
It won't error but the subscription won't be active either