woocommerce-plugin icon indicating copy to clipboard operation
woocommerce-plugin copied to clipboard

Automatic refunds for WooCommerce

Open zachherbert opened this issue 5 years ago • 1 comments

This is a feature request for the WooCommerce integration. I'd like to propose a path to automatically create a refund within BTCPay from within WooCommerce.

This would help immensely for WooCommerce stores. Currently, with the Stripe plugin, you can issue refunds from within WooCommerce. When you click "Refund" when viewing order details, the following is displayed:

CleanShot 2020-12-10 at 22 59 21@2x

Clicking "Refund $XX.XX via Stripe" calls the Stripe API and issues a refund, without requiring me to manually go into the Stripe Dashboard.

I think it should be possible to create a similar flow for the WooCommerce plugin, as follows:

  1. User clicks the "Refund $XX.XX via BTCPay"
  2. BTCPay automatically creates a refund for that specified dollar amount. Refund is dictated by the local currency used in the WooCommerce store; in my example the refund would be based in dollars.
  3. BTCPay creates a pull payment request and copies the URL of that request.
  4. BTCPay provides that URL to WooCommerce, either in a private order note or a note to the customer.
  5. WooCommerce marks the refund as complete and sends a refund email to the customer.

Ideally, BTCPay would send a note directly to the customer. Here's an example of what I've sent out previously:

To receive your $20 Bitcoin refund, please enter your withdrawal address at the following link: https://btcpay.foundationdevices.com/pull-payments/XXXXXXXXXXX

The only thing I'd then have to process manually is the payouts themselves, which I can batch into a single transaction on a regular basis.

Please let me know if this is possible, and what you might need to make this happen! Would save us a ton of time and make for a much more streamlined experience. Thanks for your hard work!

zachherbert avatar Dec 11 '20 04:12 zachherbert

Great feature suggestion, however I believe for this to happen we'd have to re-write the plugin entirely from scratch based on our new API.

pavlenex avatar Dec 11 '20 08:12 pavlenex