Find all SDKs on GitHub

API Libraries and Plugins

We work hard to keep our underlying HTTP API simple, and there are also lots of libraries for interacting with Mondido. If you write your own library and would like us to link to it, just let us know!

We publish all our libraries on GitHub: https://github.com/Mondido

IOS

The IOS SDK and example app can be found at GitHub:
https://github.com/Mondido/ios-sdk

$ git clone git@github.com:Mondido/ios-sdk.git

The IOS SDK use a UIVWebView to POST order data to a Hosted Window on Mondido. The hosted window is fully customizable by the merchant so you can style it any way you want.

First include the library:

#import "MondidoBase.h"

Then initialize the MondidoBase class to set your order parameters:

mondido = [[MondidoBase alloc] init];
//mondido.template_id = @"1"; //to hard code the payment template
[mondido.meta_data setObject:@"productName" forKey:@"metadata[products][1][name]"];
[mondido.meta_data setObject:@"red" forKey:@"metadata[products][1][color]"];

mondido.payUrl = @"https://pay.mondido.com/v1/form";
mondido.amount = @"1.00";
mondido.currency = @"SEK";
mondido.merchant_id = @"5";
mondido.secret = @"$2a$10$5OGLq7v86uROMbF3Yfa3kO"; // should not store secret in app. Should be fetched in a call to yor backend.
mondido.order_id = @"test1";
mondido.hash = @"";
mondido.success_url = @"https://mondido.com/success";
mondido.error_url = @"https://mondido.com/fail";
mondido.test = @"true";
mondido.order_id = mondido.randomOrderId; //just for testing. remove in production.
mondido.hash = mondido.createHash; //should be loaded from backend
paymentView = mondido.createWebView; //create one here instead of storyboard/xib
[self.view addSubview:paymentView]; //add view to stage. default is streatched over the whole screen.

Either you can create the UIWebView in the library or use something you have added to your Storyboard.

To determine if a transaction was successful you will use a callback block:

[mondido makeHostedPayment:paymentView withCallback:^(PaymentStatus status) {
if(status == SUCCESS){
    //success
  }else{
    //problems
  }
}]; 

Android

The Android SDK and example app can be found at GitHub:
https://github.com/Mondido/android-sdk

$ git clone git@github.com:Mondido/android-sdk.git

PHP

The PHP SDK and example app can be found at GitHub:
https://github.com/Mondido/php_sdk

$ git clone git@github.com:Mondido/php_sdk.git

Ruby

The Ruby SDK (for Rails) is installed through RubyGems. Just put the following line in your Gemfile:

gem 'mondido'

And run:

$ bundle install

Put your credentials in config/mondido.yml in the following format:

merchant_id: 10
secret: $2a$10$KVM1QFvYL/6/GvCXWg0VLO
password: YourAwesomePassphrase

You can also find the source at https://github.com/Mondido/ruby-sdk

.NET

The .NET SDK and example app can be found at GitHub:
https://github.com/Mondido/net-sdk

$ git clone git@github.com:Mondido/net_sdk.git