System Integrator (SI) ToolkitSystem Integrator (SI) Toolkit
Introduction
Management
Business Operations
Technical Integration Guide
Deployment
Technical Reference
Scheme Designs
Introduction
Management
Business Operations
Technical Integration Guide
Deployment
Technical Reference
Scheme Designs
  • Introduction

    • System Integrator (SI) Toolkit
    • DFSP Onboarding Guide and Roadmap
    • Customer Journey
  • Management
  • Business Operations
  • Technical Integration Guide

    • Technical Integration
    • Inclusive Instant Payment System (IIPS) Integration
    • Development guide for building core-connectors
    • Core Connector Testing Harness
    • Core Connector Template
    • ISO20022 and Merchant Payments.
  • Deployment

    • Overview
    • Docker Compose

      • Payment Manager Deployment Guide
      • Core Connector Guide
      • Deploying Payment Manager
      • Configuring the core connectors
      • Connecting to a Hub
      • Securing the Docker Daemon
      • Firewall Configuration in Ubuntu and AWS EC2 (t2.large)
      • Test Transfer Process
  • Technical Reference

    • API Service
    • Routing and API Specifications
    • Networking
    • Core Banking Solution (CBS) Client
    • Mojaloop Connector Client (SDK Client)
    • Configuration.
    • Core Connector Aggregate (Business Logic)
    • Error Handling
    • Integration Accounts
    • Request Handling Lifecycle
  • Scheme Designs

    • Foreign Exchange - Currency Conversion
    • Interscheme

API Service

The api service is the component of the core connector that exposes all the functionality of the connector over a RESTFUL interface.

Service code is located in the src/core-connector-svc and it contains the following files.

  • BaseRoutes.ts: Contains shared functions for responding to requests.
  • Service.ts
  • dfspCoreConnectorRoutes.ts: Contains request handlers for outgoing payments functionality
  • sdkCoreConnectorRoutes.ts: Contains request handlers for incoming payments functionality
  • index.ts: Exports Service class

The files that need no changing are Service.ts, index.ts, sdkCoreConnectorRoutes.ts and BaseRoutes.ts because they will always be the same for all connectors.

Inside Service.ts is where the servers are actually run.

static async setupAndStartUpServer() {
    ...
    await this.sdkServer.start();
    logger.info(`SDK Core Connector Server running at ${this.sdkServer.info.uri}`);
    await this.dfspServer.start();
    logger.info(`DFSP Core Connector Server running at ${this.dfspServer.info.uri}`);
}

Learn more

Last Updated:
Contributors: Paul Baker
Next
Routing and API Specifications