#Pastelito - nodejs subscriptions

1 messages · Page 1 of 1 (latest)

hollow island
#

You can check your params with that

narrow sky
#

hey bro, look

hollow island
#

Otherwise, can you share a request ID for a failure? I can check what you're doing wrong

narrow sky
#

this is what i got, and i have a question

#

i want to conform and charge automatically the invoice

#

but if fails, i dont want to create the subscription,

#

the only way it works is passing allow-incomplete to the payment_behavior

hollow island
narrow sky
#

no, i am not getting an error, sorry i didnt say to you

#

i am creating a subscription, but if fails because the status is 'requires_payment_method', i was looking for a flow to do it and i found this

hollow island
#

Yeah you didn't pass a payment method to the request

narrow sky
#

i think there is something missing here, an action or something , but i want to do this in just 1 step

hollow island
narrow sky
#

oh, i already pass the parameters, i was testing

#

i try with default_source and default_payment_method

#

and its the same

hollow island
#

Can you share the request id?

narrow sky
#

req_7zFDQKKcHoncam

#

this is the request id

#

the customer has a payment method by default

#

if not, i can send another with the payment method and share to you the req id

hollow island
#

Use default_incomplete to create Subscriptions with status=incomplete when the first invoice requires payment, otherwise start as active. Subscriptions transition to status=active when successfully confirming the payment intent on the first invoice.

#

It's because you pass default_incomplete

#

You probably want allow_incomplete

narrow sky
#

yeah, it works with allow incomplete, can you explain me how it works? i didnt get it when read the docs, what happen if the charge fails (for example if the card cant affort the charge)

hollow island
#

With allow_incomplete subscription will be incomplete in that case

narrow sky
#

okey, thanks you man, i will read the link

#

you can close the thread if you want