zip_money

ZipMoney - the Ruby gem for the Merchant API

ZipMoney Merchant API Initial build

  • API version: 2017-03-01
  • Package version: 1.0.1

Installation

Build a gem

To build the Ruby code into a gem:

gem build zipmoney_merchantapi.gemspec

Then either install the gem locally:

gem install ./zipmoney_merchantapi.gem

(for development, run gem install --dev ./zipmoney_merchantapi.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'zipmoney_merchantapi', '~> 1.0.1'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'zipmoney_merchantapi', :git => 'https://github.com/zipMoney/merchantapi-ruby.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'zipmoney_merchantapi'

# Setup authorization
ZipMoney.configure do |config|
  # Configure API key authorization: Authorization
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Authorization'] = 'Bearer'
end

Documentation for API Endpoints

All URIs are relative to https://api.sandbox.zipmoney.com.au/merchant/v1

Class Method HTTP request Description
ZipMoney::ChargesApi charges_cancel POST /charges/id/cancel Cancel a charge
ZipMoney::ChargesApi charges_capture POST /charges/id/capture Capture a charge
ZipMoney::ChargesApi charges_create POST /charges Create a charge
ZipMoney::ChargesApi charges_list GET /charges List charges
ZipMoney::ChargesApi charges_retrieve GET /charges/id Retrieve a charge
ZipMoney::CheckoutsApi checkouts_create POST /checkouts Create a checkout
ZipMoney::CheckoutsApi checkouts_get GET /checkouts/id Retrieve a checkout
ZipMoney::CustomersApi customers_get GET /customers/id Retrieve customer
ZipMoney::CustomersApi customers_list GET /customers List customers
ZipMoney::RefundsApi refunds_create POST /refunds Create a refund
ZipMoney::RefundsApi refunds_list GET /refunds List refunds
ZipMoney::RefundsApi refunds_retrieve GET /refunds/id Retrieve a refund
ZipMoney::SettlementsApi settlements_get GET /settlements/id Retrieve a settlement
ZipMoney::SettlementsApi settlements_list GET /settlements List settlements
ZipMoney::TokensApi tokens_create POST /tokens Create token

Documentation for Models

Documentation for Authorization

Authorization

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header