Skip to main content
Skip table of contents

Test API Using API Client

To ease implementation the full API description is available as a swagger document.

The Smobilpay for e-commerce Payment API is available as an OpenAPI 2.0 Specification (also known as Swagger RESTful API Documentation Specification) document at API Doc which allows developers to quickly use a code generation tool can understand, saving you time and effort on generating code to build requests or access the response from the API.

The API Swagger can be downloaded in the Document Link found in the API Doc (--> “Download”)
This document is a summary of how to use the Swagger Code Generation tool to generate an client. We assume that you already have installed Java 8 and Maven.

Download Swagger Codegen CLI tool

Generating a client

You can quickly build a fully-featured client using swagger codegen:
Or directly via the online swagger editor:

  1. In the swagger editor, Click on File → Import Url.

  2. Enter the API docs URL that is provided above.

  3. Click on Generate client and select the desired language.

Swagger Codegen allows you to generate a client in a wide variety of languages. You may check if your preferred
programming language is available by executing
java -jar swagger-codegen-cli.jar langs
Here is a sample of the results:

Available Languages:
[android,aspnet5,aspnetcore,async-scala,bash,cwiki,csharp,cpprest,dart,elixir,flash,python-flask,go,groovy,java,jaxrs,jaxrs-cxf-client,jaxrs-cxf,jaxrs-resteasy,jaxrs-resteasy-eap,jaxrs-spec,jaxrs-cxf-cdi,inflector,javascript,javascript-closure-angular,jmeter,nancyfx,nodejs-server,objc,perl,php,python,qt5cpp,ruby,scala,scalatra,finch,silex-PHP,sinatra,rails5,slim,spring,dynamic-html,html,html2,swagger,swagger-yaml,swift,swift3,tizen,typescript-angular2,typescript-angular,typescript-node,typescript-fetch,akka-scala,CsharpDotNet2,clojure,haskell,lumen,go-server,erlang-server,undertow, msf4j, ze-ph]

The client code generation for a given programming language can be customized with several options. You can get a list of available options by executing
java -jar swagger-codegen-cli.jar config-help -l <language>
For example, if you want to know what options are available for the Scala language:
More information can be found here:

Using Maven

The following command uses Maven to download the Swagger Codegen tool.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.