Spree::Core::Engine.routes.draw do namespace :api, defaults: { format: 'json' } do post '/orders/:order_id/refunds/estimate', to: 'refunds#estimate' post '/orders/:order_id/refunds', to: 'refunds#create' end end