#chooke-setupIntent

1 messages ยท Page 1 of 1 (latest)

sly laurel
#

Did you set the PaymentMethod as the default payment method for the Customer?

viscid ore
#

ohh , so i do that when i create the subscription and i pass the default_payment_method parm ,

#

so should i update the customer instead of doing it this way

sly laurel
#

Umm no this should also work

#

Can you paste here the Subscription Id?

viscid ore
#

sub_1LXE9YC68fMI8JtvoMZqKTQg

sly laurel
#

Did you create this via API or Dashboard?

viscid ore
#

API

#

only the products through api

#

sorry dashboard

sly laurel
#

Okie, I thought you were referring to a Subscription from the code above?

viscid ore
#

the code above is where i create the subsection , and i set the default_payment_method

#

but on the dashboard when i check the customer , he dose not have default payment Method even though i added that param when i created the subscription , also in the subscription , the payment method is empty , so could that be the problem ?

sly laurel
#

Let's take a step back and avoid mixing things up

#

Can you provide a Subscription created via API, that you saw an incomplete Payment?

#

sub_1LXE9YC68fMI8JtvoMZqKTQg is a Dashboard created Subscription and it has collection_method=send_invoice, which is why its Invoice is sent out and waiting for Customer to pay. Normally you would have collection_method=charge_automatically, and the default payment methods should be used

#

And btw Subscription's default payment method != customer default payment method

viscid ore
#

i used postman to call my backend server to create the subscription , and the default payment method id is what i get from the setupIntent after confirm the card details using stripe SDK confirmSetupIntent()

#

so maybe i need to pass more Parameters like collection_method

#

but im still unsure about the default payment method

sly laurel
#

Your code looks correct btw, collection_method should default to charge_automatically

#

But we need an example Id to investigate why its payment is incomplete

viscid ore
#

pi_3LXbbgC68fMI8Jtv1P7Vcp4Q

#

this is the payment id thats incomplete

#

this happens only when i have trial period

sly laurel
#

This PI is incomplete because it's generated from a Subscription sub_1LXE9YC68fMI8JtvoMZqKTQg which is created via Dashboard

#

I believe this is not created via your code above

viscid ore
#

yea i checked the logs and it says from dashboard , i never used the dashboard to create a subscription , i will try to create a new subscription and see how it goes , btw thank you for your time and effort ๐Ÿ™Œ

sly laurel
#

Np and good luck! If you come back and need further help please ask again in the channel!