Skip to main content
Skip table of contents

API Basics

Supported Formats

  • All responses from the S3P API are returned as JSON

  • POST requests to the server are to be send as form data - not as JSON

HTTP Response Codes

Status codes are returned as default HTTP codes.

HTTP Status Code

Description

200 OK

Standard response for successful requests. Everything is ok

400 Client Error

Error of client calling the S3P API – please check the error message returned from S3P API in order to correct the wrong request

500 Server Error

The server failed to fulfill an apparently valid request. This indicates an internal S3P API error. If encountered please contact maviance with steps how the error was produced.

Environments

This document will list web services by their relative path (e.g. GET /ping). The Smobilpay operations team will provide you with access to the test environment after registration. Please Open a ticket in case of problems.

Access to the production environment will be granted after successful finalization of the Integration Certification Process

SSL

All requests on the production system are to be sent via HTTPS only to encrypt all messages over the network. The testing environment allows HTTP in order to support easy debugging.

Native client libraries

Native client libraries that implement a fully functional client (including signature generation) are provided by maviance: API Libraries & Sample Code

Client libraries for other languages are continuously being developed and will be made available once implemented.

Generating a client with Swagger Code Generation tool

The S3P API follows the OpenAPI 2.0 Specification (also known as Swagger RESTful API Documentation Specification). By following the specification, the API is documented in a way that code generation tools can understand, saving you time and effort on generating code to build requests or access the response from the API. The API Swagger file resides at API Reference (smobilpay.com)

This page give a quick summary of how to use the Swagger Code Generation tool to generate an S3P API client. We assume that you already have installed Java 8 and Maven. Please note that the auto generated code does not implement the signature generation required by the authorization layer. This is usually the only code that cannot be generated and requires custom coding based on the next section.

Download Swagger Codegen CLI tool

The swagger codegen tool is available here: https://github.com/swagger-api/swagger-codegen

The Swagger Codegen project allows the generation of API client libraries (SDK generation), server stubs and documentation automatically given an OpenAPI Spec. Currently, the following languages/frameworks are supported:

  • API clientsActionScriptAdaApexBashC# (.net 2.0, 3.5 or later), C++ (cpprest, Qt5, Tizen), ClojureDartElixirElmEiffelErlangGoGroovyHaskell (http-client, Servant), Java (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured), KotlinLuaNode.js (ES5, ES6, AngularJS with Google Closure Compiler annotations) Objective-CPerlPHPPowerShellPythonRRubyRust (rust, rust-server), Scala (akka, http4s, swagger-async-httpclient), Swift (2.x, 3.x, 4.x, 5.x), Typescript (Angular1.x, Angular2.x, Fetch, jQuery, Node)

  • Server stubsAdaC# (ASP.NET Core, NancyFx), C++ (Pistache, Restbed), ErlangGoHaskell (Servant), Java (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy, Play Framework, PKMST), KotlinPHP (Lumen, Slim, Silex, SymfonyZend Expressive), Python (Flask), NodeJSRuby (Sinatra, Rails5), Rust (rust-server), Scala (FinchLagom, Scalatra)

  • API documentation generatorsHTMLConfluence Wiki

  • Configuration filesApache2


More information on how to get started can be found here: https://github.com/swagger-api/swagger-codegen#getting-started

JavaScript errors detected

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

If this problem persists, please contact our support.