#Koa-retrieve-pi-connected-account
1 messages · Page 1 of 1 (latest)
Hello, you'll need to pass the stripeAccount parameter in your request to retrieve objects from connected accounts: https://stripe.com/docs/api/connected_accounts
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Can you paste the request ID in the error screenshot please? req_xxx
com.stripe.exception.InvalidRequestException: No such payment_intent: 'pi_3K552HQkFg8PiFA61XvekcsV'; code: resource_missing; request-id: req_QvXFssSOVUtoXj
Taking a look
Seems there was a successful request to retrieve this PI about ~10 minutes ago: https://dashboard.stripe.com/test/logs/req_ArA7JFnYphrbPH
Are you still having problems?
yes
Aha, I just noticed that you're also calling to cancel the Payment Intent
You'll need to pass the stripeAccount parameter there, too
Can you share the request ID again please?
com.stripe.exception.InvalidRequestException: You cannot perform this action on PaymentIntents created by Checkout. (Hint: The feature you are trying to use is deprecated.); request-id: req_wfkWoppaKZHTZk
You can't cancel a successful Payment Intent: https://stripe.com/docs/refunds#canceling-a-paymentintent
Are you trying to refund?
no im trying to cancel
Well you can't cancel that Payment Intent as it's been processed. You can only cancel a PI that has been authorised
how can I provide info that transaction needs to be confirmed or something like that?
A PaymentIntent can only be canceled when it has one of the following statuses: requires_payment_method, requires_capture, requires_confirmation, or requires_action—a PaymentIntent can’t be canceled while it’s actively processing or after it has succeeded.
Sounds like you want auth and capture? https://stripe.com/docs/payments/capture-later
You'd pass payment_intent_data.capture_method: 'manual' when creating your Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-capture_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
But this is for auth and capture, which may not be suitable for your business:
Place a hold on a card to reserve funds now, but capture them only after you complete a service. For example, a hotel may authorize a payment in full prior to a guest’s arrival, then move the money when the guest checks out.
When a payment is authorized, the bank guarantees the amount and holds it on the customer’s card for up to 7 days, or 2 days for in-person payments using Terminal.
Failure to capture the payment by this time cancels the authorization and releases the funds. When this happens, the PaymentIntent status transitions to canceled.
you are great support, thanks
Sure, np!