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