#Uche-subscription-creation
1 messages ยท Page 1 of 1 (latest)
HI ๐ that depends, what type of behavior are you specifying via the payment_behavior parameter?
https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_behavior
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Gotcha, so as mentioned in the spec, the request will return a 402 status/error when the first invoice cannot be paid on the subscription if you use error_if_incomplete.
It doesn't seem to work that way right now
Can you provide the ID of a request where you're seeing the contradictory behavior?
pi_3KqFVaJOFr5bbosl0VXx2Lts
in this case the payment failed but a subscription with "status": "incomplete" was still created before later being cancelled when the payment failed webhook was fired
When that subscription was created, the payment_behavior parameter wasn't specified so it would use the default behavior of allow_incomplete
https://dashboard.stripe.com/test/logs/req_4iQCpDQOQ9rMUX
it wasn't specified? give me some time to try this again. Please dont archive the chat yet
i just realized the the new logic path we were testing didnt have that field set. My bad. Thanks for your help
Any time!
@autumn reef Checking in. Are you in a good place with this now? Are we okay to archive this thread in a bit?