#john_api
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/1465422610870567098
π 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.
Hi π
For this specific Payment Intent, yes you can cancel it. You can see in our Payment Intent lifecycle that, in general, you cannot cancel a Payment Intent once it enters a processing status
how can I cancel it? I do not see the option in the dashboard
But, in this case, the payment method is a us_bank_account and we do allow cancelling those payment intents
The API is how I would recommend it: https://docs.stripe.com/api/payment_intents/cancel?api-version=2025-12-15.preview&rds=1
the charge is currently in pending state:
https://dashboard.stripe.com/acct_1P9WfP2LjNH6sc0X/payments/pi_3Stu5z2LjNH6sc0X0DpX2mCw
can we still cancel it?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You can cancel the Payment Intent because this situation matches the caveat in the documentation I provided. Unfortunately, I cannot tell you why the button is not present in the dashboard. This server focuses on helping developers coding integrations with Stripe APIs so that is what we are experts on. We know very little about the Dashboard.
You can cancel a PaymentIntent object when itβs in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, in rare cases, processing.
I am missing the caveat that you are referring to. Can you please give that detail?
It's in the first document I provided you, in the section on the canceled lifecycle states:
2 You can cancel a PaymentIntent in the processing state when the associated Payment Method is ACH, ACSS, AU BECS, BACS, NZ BECS, and SEPA. However, it might fail due to a limited and varying cancellation time window.
Unfortunately, we don't have insight into the limited time window so it's possible this payment is outside that time window but it's worth a shot
got it. thank you!!
I will let you know how it goes
Best of luck!
thanks, @night vector
one more question:
few years ago, if I remember correct, we could refund a charge that is in pending status. Can we still do that?
Hmmm I'm not sure I follow. Until a charge has succeeded, there is nothing to refund. You don't have the money.
We document this here
You can refund charges after they succeed
got it...
Prior to that, you are just cancelling the payment
This might look like a refund on a Customer's statement because their bank places a hold on the funds while it processes the payment.
But really it's just their bank releasing the hold when the payment is cancelled
Sorry but that term does not match anything at Stripe. Do you mean your Stripe API version?
You can find your default version in the Stripe dashboard
I am not able to
But you can also specify API versions for each API call
I cannot see the version in the dashboard
There should be a developer overview in the Stripe dashboard where this value is present.
Looking at the request that created the Payment Intent you are concerned about, it looks like your Java integration is specifically setting 2025-01-27.acacia as the Stripe API version
But your account default API version is 2024-04-10
For the Java SDK, the API version is pinned to the SDK version so this is expected
ok
I tried running but it is asking for the host password. what does that mean?
@night vector
Enter host password for user 'sk_live_51P9WfP2LjNH6sc0X4RDRPtnueqC..........
curl -X POST https://api.stripe.com/v1/payment_intents/pi_3Stu602LjNH6sc0X0o3D8Ymq/cancel \
-u "sk_live_51P9WfP2LjNH6sc0X4RDRPtnueqC..............
π Snufkin had to step away. We have an example for cURL request here: https://docs.stripe.com/api/payment_intents/cancel?lang=curl
I'd recommend making sure that you're providing the exact API key followed by :
@gusty lion
is ':' required after the -u value?
also, is 2024-04-10 the correct API version?
is ':' required after the -u value?
yes
also, is 2024-04-10 the correct API version?
When you say correct, what does that mean?
Do you mean is it a valid API version? If so, yes - https://docs.stripe.com/changelog/2024-04-10