Help & Support Started Mar 14, 2026 11:54 PM

Implementing monero for cart system

2 replies - 30 views - 0 thanks - 0 tippers - 2 watchers

Mar 14, 2026 11:54 PM Last edited Mar 15, 2026 5:19 PM
#1
dev developer development

Halo!!

Trying to implement Monero for my shop as an additional payment method on top of fiat (PayPal and VISA).
Customers can place orders for multiple items and pay for all of them only once.
The problem is: let's say one of the items is cancelled after ordering. My system generates a refund tx for the customer automatically. However multiple items could be cancelled in rapid succession but not quite at the same time, let's say 10 minutes apart from each other.

Then the XMR for the first item will be refunded but the subsequent refund tx's will fail to be generated because the funds are locked, as there was only 1 output and it was spent in the first refund tx!
The customer will have to wait 20 minutes, and then another 20 minutes for the next refund, and so on! Imagine if the cart contains 50 items, this is a lot of time waiting for your own money!

How do other XMR shops deal with this?

0 thanks - 0 tippers - 2 watchers
Monerica 486x60

Replies

Page 1 of 1 - 2 total
Mar 15, 2026 3:03 AM Edited Mar 15, 2026 3:03 AM
#2

Unless you are going to refund using different coins to the ones the users sent, I would just make customers aware that they need to wait this time if they don't cancel all the items they want to cancel in one refund "transaction".

The other option is to "hold" those coins for maybe half an hour to build a backlog of refunds, and only then send them back. But I think that would cause more frustration for everyone else that only cancels one item.

Signature

Ko-Net - Privacy focused, free-speech VPS hosting.

1 thanks - GTyaphil - 0 tippers
Mar 15, 2026 3:26 PM
#3

@Kodomu thanks for your help!
I think my solution is just going to be putting the transactions in a queue and have a loop where i try to transfer the refunds. If the transaction fails to be built because there are no unlocked outputs available it will just try to build it again in the next loop iteration. This will not solve the 10 blocks lock time issue, but it will most of the time if there are enough XMR transactions which generated a lot of outputs... i run a proxy shop and i'm just now trying to incorporate XMR so in the beginning customers will have to wait as there will not be many outputs. But whatever! XMR rocks!

I could detect when the refunds belong to the same order and batch them in the same TX...

0 thanks - 0 tippers

Post A Reply

You must be logged in to reply. Login or register.