#miaina_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/1360282162003316857
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi! What exception are you getting? What Stripe SDK (or programming language) are you using?
hello
Cannot cancel a refund unless it has a status of requires_action.
{
"error": {
"message":
"Cannot cancel a refund unless it has a status of requires_action.",
"request_log_url":
"https://dashboard.stripe.com/test/logs/req_wgqYZ15Xkfe4Tm?t=1744386353",
"type":
"invalid_request_error",
},
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I just executed a refund
That Refund was in a 'submitted' state, so you can't cancel it.
Can you tell me more about the underlying thing you're trying to accomplish here?
Well
I did not want to cancel it
I just want to create a refund
i did it
but
automaticaly a cancel request is raised
1 second later
i'm working on the testing environment
with the PHP SDK
Version de l'API
2025-02-24.acacia
Par défaut
I ask myself if it's an bug from the test environment.
I will test on Production Test environment
I got an exception with an erreur
{
"error": {
"message":
"Cannot cancel a refund unless it has a status of requires_action.",
"request_log_url":
"https://dashboard.stripe.com/test/logs/req_PgBjOIYH6ob1yx?t=1744379277",
"type":
"invalid_request_error",
},
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
every time i execute a Refund::create I get this error
Right. What is the status of the Refund that you are trying to cancel?
The refund works well
the error is raised right after (1 second according to the stripe log) I execute the refund request
The Refund object has a status field; what is the content of that status field? https://docs.stripe.com/api/refunds/object#refund_object-status
I don't know to check that
succeeded
I checked the "refund.updated" event and it's succeeded
"id": "pyr_1RCjm8PZRhwkJRa3IQGs8S5x",
"object": "refund",
"payment_intent": "pi_3RByANPZRhwkJRa32LhPYeTh",
"status": "succeeded",
Then you can't cancel it, because it's not in a requires_action state.
https://dashboard.stripe.com/test/logs/req_wgqYZ15Xkfe4Tm is a request to cancel the refund.
Ok
the only thing I do is
try {
$refund = Refund::create(
[
"charge" => $paymentOrder->getStripeChargeId(),
"amount" => $amount * 100
]
);
An exception is raised
automatically
with this error
I don't get why
That code is not what is causing this error.