Ruby on Rails gateway for SIPS/ATOS french online payments API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Atos, a Ruby on Rails gateway for SIPS/ATOS french online payments API

Build Status


Add this to your Gemfile (prefer the Github version over the RubyGem one for updates)

gem 'atos', :git => ''

then run bundle install


1.Create an Atos directory inside your /lib and drop the files given by your bank into it, so it should look like this :


2.To perform a payment, instanciate a request :

@request =
  :merchant_id            => '014295303911111',
  :customer_id            => 'YOUR_CUSTOMER_ID',
  :amount                 => '1500',
  :automatic_response_url => '',
  :normal_return_url      => '',
  :cancel_return_url      => ''

3.You can now show the @request content in your view (it's an HTML form)

----- Let the customer pay on the bank platform, then listen to its response ----

4.Now, you can catch the DATA parameter in response by listening to the 'automatic_response_url' you gave above (not a tipo, DATA is upcase)

response =[:DATA])

5.Finally, you get a hash in 'response', that follows the API specs :



  • The following parameters are required to perform a request :
(string) merchant_id
(string) customer_id
(string) amount
(string) automatic_response_url
(string) normal_return_url 
(string) cancel_return_url

Above those required parameters, you can freely add any other parameter that follows the API specs (shopping cart, customer email, customer_ip_address...). Order and position in the hash doesn't matter at all.

  • I prefer conventions over configuration, but you can also override with your own path dirs while instanciating the Atos class. You just add one step to the shortand way :
@request =
  :root_path     => '/where',
  :request_path  => '/where/ever',
  :response_path => '/where/ever/you',
  :pathfile_path => '/where/ever/you/want'

...And then...

  :merchant_id       => '014295303911111',
  :amount            => '1500',
  :customer_id       => YOUR_CUSTOMER_ID,
  :normal_return_url => '',
  :cancel_return_url => ''
  • Default language is set to 'fr' and currency to 'Euro', simply pass your own 'locale/currency' in the request to override, as shown above.

  • Don't forget to check at the 'pathfile' Atos file, and fill requested paths according to your app absolute location on the server

  • Drop the credit card logos in a public dir, then fill this directory's absolute location on the server in the '/lib/atos/param/pathfile' file

  • The '014295303911111' merchant_id I use all the way here is the test merchant_id, obviously, use your own.