E9/SQL- AR refundable charge?

Has anyone ever set up a refundable fee? This fee would be charged either on the SO or AR invoice and be refunded when customer returned the product container. Is there a native way to handle this or will it require customization? Linda