#bragma_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1285500545343422514
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- bragma_unexpected, 3 days ago, 33 messages
- bragma_best-practices, 3 days ago, 27 messages
- bragma_code, 6 days ago, 25 messages
Hmm, what did you try and what didn't go as expected?
Honestly I didn't try anything. I create the invoice, add an item, finalize it. But I am not sure how to configure it and what to check on the API responses.
I.e. I am not sure if I just need to check the result of the finalize, or call the pay endpoint directly and what to check
For sure, collection_method=charge_automatically
But I am not sure about auto_advance
I just want to try once and do not retry if first attempt fails
I am not sure how to combine auto_advance with the finalize and pay endpoints
Okie first payment_behavior = error_if_complete is a Subscription field, not an Invoice field
But looks like you are testing one-off Invoice
And if you want to test Invoice behavior, you can use Test Mode and inspect the Invoice status, and its underlying PaymentIntent status, to see if it's paid successfully
Yes, In fact I am trying to emulate the error_if_complete behavior which is available for subscriptions, but for invoices
well you could use invoice.pay I suppose, that has the effect that it returns a 400 and an error if there's any problem doing the immediate payment, but that's not usually what we suggest(since it means you can't handle 3D Secure which is a normal part of a payment flow).
Ok
But how payment_behavior = error_if_complete for subscription handles 3DS? Does it work with it?
it's error_if_incomplete , to be clear. And no, it doesn't handle it(the point of that parameter is if you want to use legacy behaviour/don't care about handling this)