Working with internal API

Introduction

Internal API provides CRUD operations for general objects such as Customers, Accounts, Balances, Transactions, Tx. Rules

Additionally there are SEPA Credit money transfer, SEPA Direct debit and SEPA Mandates.

Here’s a link to Swagger on internal API

https://api.mockbank.io/swagger-ui.html#/Decoupled_Authorizations

 

Prerequisites

  1. Complete registration Quick start

  2. Make sure you have set client_id and client_secret for your organisation

     

Authentication

Request example:

Note: Client ID and Secret are set on the screen above and YOUR_USERNAME / YOUR_PASSWORD are respectively an Email address and password you use to login to MockBank Admin UI.

curl --location --request POST 'https://api.mockbank.io/oauth/token' \ --header 'Authorization: Basic {YOUR_CLIENT_ID:CLIENT_SECRET}' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'username={YOUR_USERNAME}' \ --data-urlencode 'password={YOUR_PASSWORD}' \ --data-urlencode 'grant_type=password'

Response example:

{ "access_token": "{YOUR_CLIENT_ACCESS_TOKEN}", "token_type": "bearer", "refresh_token": "{YOUR_CLIENT_REFRESH_TOKEN}", "expires_in": 3564, "scope": "all" }

Add customer

Request example:

curl --location --request POST 'https://api.mockbank.io/customers' \ --header 'Authorization: Bearer {YOUR_CLIENT_ACCESS_TOKEN}' \ --header 'Content-Type: application/json' \ --data-raw '{ "address": "Mohrenstrasse 37", "city": "Berlin", "zip": "10115", "countryCode": "de", "fullName": "Alex", "msisdn": "+491703555555", "password": "test", "username": "test@mockbank.io" }'

Response example:

Update customer

Request example:

Update SCA methods

Request example:

Response example:

Status: 200 OK

Add account

Request example:

Response example:

Add account balance

Request example:

Response example:

Status: 200 OK

Add transaction

Request example:

@Andrei Galitski make data more realistic?

Response example:

Add transaction rule

Request example:

Response example:

Make SEPA Credit transfer

Request example:

Response example:

 

Add SEPA mandate

Request example:

Response example:

 

Execute SEPA direct debit

Request example:

Response example:

Â