• Hello,

    I’m experiencing an issue when trying to process a refund via PayPal in WooCommerce. The website shows the error message: “An error occurred while attempting to create the refund using the payment gateway API.”

    I am using Stripe for payments in WooCommerce, and I do not encounter any issues with Stripe refunds. There is sufficient balance in the PayPal account to process the refund.

    Could you help me understand what might be happening and how we can resolve this issue?

    Thank you.

    Best regards,

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Support Krystian Syde

    (@inpsydekrystian)

    Hello @osheta

    There is definitely a logical explanation for why this refund is failing, but the frontend doesn’t provide that information, but the logs will. So please follow the instructions.

    To investigate this issue further, we’d like to examine your plugin log files. Please note that these log files are only generated if “Logging” is activated in your plugin settings.

    You can enable this feature from the “Connection” tab in your plugin settings. Once “Logging” is enabled, every transaction will generate a log entry. It’s important to understand that if “Logging” wasn’t enabled before, there will be no previous records of the transactions. In that situation, you’ll need to create another refund attempt to generate new log entries.

    You can retrieve these logs from the path:
    Access the WooCommerce > Status > Logs section, and proceed to choose the most recent “woocommerce-paypal-payments” file associated with the date of the failed order.

    Please provide those log entries on our PrivateBin. After uploading, send us the link, so we can review them in detail.

    Looking forward to your feedback.

    Kind Regards,
    Krystian

    Thread Starter osheta

    (@osheta)

    Hi @inpsydekrystian,

    Here is the link https://privatebin.syde.com/?647255b935f3eb25#BeFC3tkLEwUpKZ3MG6S4jUt4dc7yZG51TbnSenXCMn2u

    Order ID in WC: 52442364
    Paypal: 7M101575U2794473C

    Product in order: SKU: SRP-001
    Name: Regenera Prime (suscripción anual)

    Time: around 10:53 Spain time (right now is 11:30)

    Thanks,

    Plugin Support Krystian Syde

    (@inpsydekrystian)

    Hello @osheta

    To help you more effectively, please follow these steps:

    1. Remove the current log file from:
      WooCommerce → Status → Logs → Select woocommerce-paypal-payments log for today → Delete
    2. Go to the order (52442364) in your WooCommerce dashboard and attempt the refund again using the “Refund via PayPal” button.
    3. Once you’ve tried the refund, open the new log (same location as above), and share the updated link here so we can analyze only the refund-related entries without any prior noise from onboarding attempts.

    This will give us a clean trace of the API call and any response/error received directly from PayPal.

    Let us know once done.

    Kind Regards,
    Krystian

    Thread Starter osheta

    (@osheta)

    Hello Krystian,

    I’ve followed the steps you suggested and removed the log file. However, my colleagues have already processed the refund via another method, so I’m unable to replicate the process with the same order (52442364).

    I did test by making a new purchase via PayPal and processing a refund, and everything worked without any issues. Therefore, I would appreciate it if you could review the original log since, as per your instructions, it has been deleted from the platform.

    Thank you for your assistance.

    Plugin Support Krystian Syde

    (@inpsydekrystian)

    Hello @osheta

    The log did not contain any data related to refunds. Instead, it was focused on onboarding API calls and webhook status checks. There were no references to refund endpoints.

    The only noticeable issues in that log were a couple of timeout errors (cURL error 28) and a 503 Service Unavailable response when attempting to connect to the WooCommerce API server. These appear to be server-side or connectivity-related problems, not faults in the plugin itself.

    If you encounter a similar issue again, feel free to reach out.

    Kind Regards,
    Krystian

    Thread Starter osheta

    (@osheta)

    Hi @inpsydekrystian

    Today we could replicate the issue with another order. I cleaned logs for today related to paypal and then tried a refund from Woocommerce to a Paypal payment. WordPress notified about api issue. Here is the clean log after failing the refund. https://privatebin.syde.com/?92b310e5fc6449ac#JAyZuFAHfFwoDqb7nmoRvx7D5qiL75KD5jXH15cH4A9Q

    Thanks,

    Plugin Support Krystian Syde

    (@inpsydekrystian)

    Hello @osheta

    The log confirms that the refund attempt triggered an API error, but the full context of the log for that day would help us see the sequence of events.

    If you’re comfortable sharing it here, please send the entire log from that day (ideally from the start of the day until after the failed refund attempt). If you’d prefer to keep this private, we recommend opening a support ticket with us directly. You can do that here: Request Support

    Please include:

    • The full log file (or a PrivateBin link to it)
    • The URL of this thread for reference

    This will help us investigate and follow up more efficiently.

    Kind Regards,
    Krystian

    Thread Starter osheta

    (@osheta)

    Hi @inpsydekrystian

    Just to clarify: by “full log for that day,” are you referring to more than the specific error instance? In this case, the only relevant log available is from the moment of the error itself, as the environment was cleared earlier today and no other related events occurred.

    Plugin Support Krystian Syde

    (@inpsydekrystian)

    Hello @osheta

    Yes, ideally, I would prefer to see the entire log for that day rather than just the specific error entry. Even if it seems unrelated, surrounding entries can often reveal subtle context or earlier issues that lead to the failure. Having the full picture helps us identify edge cases or misfires more accurately.

    My main recommendation at this stage would be to reach out to us privately. Most likely, we’ll attempt to reproduce the issue based on your order parameters, plugin configuration, and environment.

    Let me know once you have those ready.

    Kind Regards,
    Krystian

    Thread Starter osheta

    (@osheta)

    Hi @inpsydekrystian

    Here is the full log for today. I tried to make the refund again https://privatebin.syde.com/?121f694fb00add51#78zMd7Uytd42vqkz8vzdJPYsCW9FhMHsNJSiKDnm24C5

    Thanks,

    Plugin Support Krystian Syde

    (@inpsydekrystian)

    Hello @osheta

    Please follow the steps below to share your full system status report:

    1. Go to WooCommerce → Status in your WordPress admin
    2. Click Get system report, then click Copy for support
    3. Paste the copied content into PrivateBin
    4. Share the generated link here

    Additionally, please also include the PayPal Payments plugin log from the day the original order was processed, along with a screenshot of the entire page for that order, I suggest to censor some customer data. That would help us correlate the initial transaction with the refund attempt.

    Once we have those details, we’ll review and advise on the next steps.

    Kind Regards,
    Krystian

    Thread Starter osheta

    (@osheta)

    Thread Starter osheta

    (@osheta)

    Hi @inpsydekrystian

    Have you seen my last message?

    Thanks,

    Maria

    Plugin Support Krystian Syde

    (@inpsydekrystian)

    Hello @osheta

    I checked the plugin logs and at this moment there is no trace of the PayPal Order ID 7M101575U2794473C that you mentioned. However, we did find three completed PayPal orders that include the product with SKU SRP-001:

    • 0UJ38526EG5028***
    • 04A26029CX7829***
    • 1C165742RR0175***

    All three were captured successfully and handled correctly by the webhook. There is no indication of issues like payment failures or missing metadata in any of them.

    To assist you further, could you please provide a screenshot of the full WooCommerce order page for order ID 52442364? You can censor any private customer data, but we’d need to clearly see the status, order notes, and the payment method section to compare it with expected webhook behavior.

    Kind Regards,
    Krystian

    Thread Starter osheta

    (@osheta)

    Hi @inpsydekrystian https://snipboard.io/qz5nrx.jpg

    • This reply was modified 1 year ago by osheta.
Viewing 15 replies - 1 through 15 (of 22 total)

The topic ‘Issue with Refunds via PayPal in WooCommerce’ is closed to new replies.