#kirito

1 messages · Page 1 of 1 (latest)

arctic elkBOT
unkempt obsidian
#

Can you share some snippets from your integration showing what you're doing?

#

And an example subscription ID I can look at?

dense harness
#

Sure

#

sub_1MYyDrFeR0PUZyO7d3n645dB

unkempt obsidian
#

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 a default_payment_method when 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

dense harness
#

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

native jay
#

If there's already an attached valid payment method, then you would just add that Customer to the Subscription upon creation

dense harness
#

I understand thank you

dense harness
#

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

native jay
dense harness
#

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 ?

native jay
#

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

dense harness
#

incomplete subscription

native jay
#

Do you have an example Subscription that had the default_payment_method set on the Customer before the Subscription was created?

dense harness
#

sub_1MZ0D2FeR0PUZyO7tNMDNfcz

native jay
#

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.

dense harness
#

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?

marble grail
#

It won't error but the subscription won't be active either