#yuwen_unexpected

1 messages ¡ Page 1 of 1 (latest)

somber leafBOT
#

👋 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/1287673862942752769

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

blissful acorn
fair ocean
#

but we didn't call confirmed. we use invoice.pay. Is this same?

blissful acorn
#

Yes you are right, paying an invoice triggers payment confirmation.

fair ocean
#

oh ok. BTW. want to check if this part behavior changed? Because in 1 years ago if we call invoice.pay and payment is canceled it will return error code: payment_intent_unexpected_state but now it's error code is null.

blissful acorn
fair ocean
#

req_hP23m37vsXek81
this is current behavior
and at Thu, 03 Aug 2023 04:11:43 GMT response look like

{
          "error": {
            "code": "payment_intent_unexpected_state",
            "doc_url": "https://stripe.com/docs/error-codes/payment-intent-unexpected-state",
            "message": "This PaymentIntent's payment_method could not be updated because it has a status of canceled. You may only update the payment_method of a PaymentIntent with one of the following statuses: requires_payment_method, requires_confirmation, requires_action.",
            "param": "payment_method",
            "request_log_url": "https://dashboard.stripe.com/[SQUARESPACE_CLIENT_ID]/logs/req_PS6CTQq6w3ZpPj?t=1691035899",
            "type": "invalid_request_error"
          }
        }
somber leafBOT
tepid sonnet
#

there are limits on how many times you can attempt to confirm a PaymentIntent before we cancel it, I think you ran into that.

fair ocean
#

yes, we want to handle this behavior. For example, subscription id: sub_1Q26KPHvACJF9tb8xc96yW5D it need to pay the invoice to make subscription become active but the payment intent under subscription was canceled. What should we do for the next step? void invoice and create one or create another payment intent for this invoice

tepid sonnet
#

unfortunately it's not handled very well in the Invoicing product right now. I believe all you can do is void and create a new Invoice

fair ocean
#

is there a way to create invoice that can related to subscription?

tepid sonnet
#

not that I know of, no

#

I don't think there's a good solution here really. You could I think create a separate one-off invoice, have the customer pay that, and then void the original invoice on the subscription.

This case only really happens in cases like fraud, it's unusual to have so many attempts. If you had this happen to a real subscription for a real customer, I would raise the feedback to our support team.