21.01.2014 Views

SFMS Bank Application Interface Specifications Document ... - IDRBT

SFMS Bank Application Interface Specifications Document ... - IDRBT

SFMS Bank Application Interface Specifications Document ... - IDRBT

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Document</strong> Number:<br />

Copy Number:<br />

INSTITUTE FOR DEVELOPMENT AND RESEARCH IN<br />

BANKING TECHNOLOGY<br />

HYDERABAD<br />

Structured Financial Messaging System<br />

<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> <strong>Specifications</strong><br />

Version: 3.0<br />

Prepared By<br />

Deccan Park,<br />

#1 Software Layout, Madhapur, Hyderabad-500 081<br />

September 2004<br />

Confidential and controlled document.<br />

Unauthorised access or copying is prohibited.


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> <strong>Specifications</strong> Version 3.0<br />

DOCUMENT RELEASE NOTICE<br />

No.: - 3.0<br />

Client: Institute for Development & Research in <strong>Bank</strong>ing Technology, Hyderabad.<br />

Project: Structured Financial Messaging System (<strong>SFMS</strong>)<br />

<strong>Document</strong> details: <strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> <strong>Specifications</strong>, Version 3.0<br />

Name Version No. Description<br />

<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong><br />

<strong>Interface</strong> <strong>Specifications</strong><br />

PF3020<br />

3.0 <strong>SFMS</strong> <strong>Interface</strong> with External <strong>Bank</strong><br />

<strong>Application</strong>s<br />

Revision details:<br />

Action taken Preceding<br />

(add/del/chg Page No.<br />

)<br />

New<br />

Page No.<br />

Revision<br />

Description<br />

Change Register serial numbers covered:<br />

The documents or revised pages are subject to document control.<br />

Please keep them up-to-date using the release notices from the distributor of the document.<br />

These are confidential documents. Unauthorized access or copying is prohibited.<br />

Approved by:<br />

Authorized by:<br />

Date:<br />

Date:<br />

Confidential<br />

Uncontrolled when Printed<br />

Page i


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

TABLE OF CONTENTS<br />

CHAPTER 1 – INTRODUCTION.................................................................................. 1<br />

1.1 BACKGROUND...................................................................................................... 1<br />

1.2 DEFINITIONS, ACRONYMS, ABBREVIATIONS........................................................ 1<br />

1.3 ORGANISATION OF THE DOCUMENT ..................................................................... 2<br />

CHAPTER 2 – BANKAPI ARCHITECTURE.............................................................. 4<br />

2.1 <strong>SFMS</strong> BANK APPLICATION INTERFACE ............................................................... 4<br />

2.2 MESSAGES FLOW ................................................................................................. 5<br />

2.3 PRE-REQUISITES FOR BANKAPI ........................................................................... 6<br />

2.4 SOFTWARE REQUIREMENTS ................................................................................. 6<br />

2.5 HARDWARE REQUIREMENTS................................................................................ 6<br />

CHAPTER 3 – BANKAPI MESSAGE STRUCTURES ............................................... 7<br />

3.1 USER MESSAGE.................................................................................................... 7<br />

3.2 ACKNOWLEDGEMENT MESSAGE ........................................................................ 10<br />

3.3 NON-DELIVERY WARNING MESSAGE................................................................. 11<br />

3.4 DELIVERY NOTIFICATION MESSAGE .................................................................. 12<br />

3.5 OPEN NOTIFICATION.......................................................................................... 12<br />

3.6 BANKAPI RESPONSE MESSAGE........................................................................ 13<br />

CHAPTER 4 – BANKAPI USAGE WITH EXAMPLES ........................................... 14<br />

4.1 REGISTER EXTERNAL BANK APPLICATION ........................................................ 14<br />

4.2 SET-UP BANK API CLIENT AT EXTERNAL BANK APPLICATION ......................... 14<br />

4.3 START BANK API SERVER AT <strong>SFMS</strong> OFFLINE/ONLINE..................................... 15<br />

4.4 EXTERNAL APPLICATIONS MESSAGE PROCESSING ............................................ 15<br />

4.5 BANKAPI CLIENT INTERFACE THROUGH COMMAND LINE................................. 16<br />

4.6 BANKAPI CLIENT INTERFACE THROUGH PROGRAM METHOD............................ 17<br />

4.7 OVERVIEW OF <strong>SFMS</strong> BANKAPI USAGE ............................................................ 17<br />

CHAPTER 5 – LIST OF EXCEPTIONS AND LIMITATIONS ............................... 19<br />

5.1 LIST OF EXCEPTIONS.......................................................................................... 19<br />

5.2 LIMITATIONS...................................................................................................... 20<br />

APPENDIX A – DIGITAL SIGN AND VERIFICATION ......................................... 21<br />

APPENDIX B – SAMPLE PROGRAM TO CALL BANKAPI CLIENT................. 23<br />

Confidential<br />

Uncontrolled when Printed<br />

Page ii


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

1.1 Background<br />

CHAPTER 1 – INTRODUCTION<br />

The <strong>SFMS</strong> system provides a solution for financial message communication across the<br />

Indian Financial Network (INFINET). The system enables exchange of messages in a<br />

highly secured environment. A message structure in <strong>SFMS</strong> (Structured Financial<br />

Messaging Solution) has been developed to take care of all kinds of Financial<br />

Transactions involved in Indian <strong>Bank</strong>ing System. The message structure is an adoption of<br />

an international standard SWIFT with minor modifications to take care of the additional<br />

messages required for Indian banking needs. The solution will enable the <strong>Bank</strong>s to carry<br />

out Inter-<strong>Bank</strong>/Inter-Branch transactions.<br />

With the Financial Network (INFINET) and a messaging format (<strong>SFMS</strong>) in place, it is<br />

envisaged that the <strong>Bank</strong>s will carry out Inter-bank and Intra <strong>Bank</strong> transactions<br />

automatically. In order to meet the requirements of Inter-bank and Intra bank<br />

transactions, we need to have an interface between <strong>SFMS</strong> and External <strong>Application</strong>s.<br />

This document provides the <strong>SFMS</strong>-External <strong>Application</strong>s interface <strong>Specifications</strong>, along<br />

with the details and functioning of the <strong>SFMS</strong>-External <strong>Application</strong>s Integration.<br />

<strong>SFMS</strong> API is the application interface for External <strong>Bank</strong> <strong>Application</strong>s to send and receive<br />

messages. This is a part of the <strong>SFMS</strong> Online / Offline Server software. The document<br />

provides details about the interface Architecture, Message formats and about the interface<br />

examples.<br />

The intended audiences of this document are:<br />

• <strong>Interface</strong> Developers of <strong>Bank</strong>s<br />

• <strong>Bank</strong>ing application Vendors<br />

1.2 Definitions, Acronyms, Abbreviations<br />

API<br />

<strong>Bank</strong>API<br />

CA<br />

CCA<br />

<strong>IDRBT</strong><br />

IFSC<br />

INFINET<br />

LAN<br />

PDE<br />

<strong>Application</strong> Program <strong>Interface</strong><br />

<strong>Bank</strong> <strong>Application</strong> Program <strong>Interface</strong><br />

Certifying Authority<br />

Controller of Certifying Authorities<br />

Institute for development and Research in <strong>Bank</strong>ing Technology<br />

Indian Financial System Code<br />

INdian FINancial NETwork.<br />

Local Area Network<br />

Possible Duplicate Emission<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 1 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

PDM<br />

RA<br />

RTGS<br />

<strong>SFMS</strong><br />

SWIFT<br />

TCP/IP<br />

TCS<br />

SMAC<br />

UMAC<br />

UNAK<br />

Possible Duplicate Message<br />

Registration Authority<br />

Real Time Gross Settlement<br />

Structured Financial Messaging System.<br />

This includes the Branch, Gateway and HUB nodes and the<br />

communication links between them.<br />

Society for World wide Inter-bank Financial Telecommunication<br />

Transmission Control Protocol / Internet Protocol<br />

Tata Consultancy Services<br />

This is the MAC generated with node server certificate<br />

This is the MAC generated with Authorizer’s signature<br />

This is the User NAK and is generated when the UMAC verification fails<br />

at the receiving branch.<br />

1.3 Organisation of the document<br />

The <strong>Bank</strong>API <strong>Specifications</strong> document is organised into the following chapters<br />

including this introduction Chapter:<br />

Chapter 2<br />

Chapter 3<br />

Chapter 4<br />

Chapter 5<br />

Appendix-A<br />

<strong>Bank</strong>API Architecture<br />

This chapter provides information about the <strong>Bank</strong>API Architecture,<br />

message flow, Hardware / Software requirements and pre-requites if<br />

any.<br />

<strong>Bank</strong>API Message Structures<br />

This chapter provides details about the message structures and<br />

provides examples.<br />

<strong>Bank</strong>API Usage with examples.<br />

This chapter explains about <strong>Bank</strong>API Server and usage of <strong>Bank</strong>API<br />

client.<br />

Exceptions and Limitations<br />

This chapter provides a list of <strong>Bank</strong>API Exceptions and Limitations<br />

in Usage.<br />

Digital Signing and Verification<br />

This Appendix provides information about the standards used in<br />

generation of UMAC.<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 2 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

Appendix-B<br />

Sample file to call <strong>Bank</strong>API Client<br />

This Appendix provides a sample program for calling <strong>Bank</strong>API<br />

client method.<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 3 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

2.1 <strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong><br />

CHAPTER 2 – BANKAPI ARCHITECTURE<br />

The context diagram for the <strong>SFMS</strong> – <strong>Bank</strong>API solution is depicted below.<br />

<strong>Bank</strong>API Messages<br />

<strong>SFMS</strong><br />

<strong>SFMS</strong><br />

GW<br />

GW<br />

and<br />

and<br />

HUB<br />

HUB<br />

<strong>SFMS</strong> On-line /<br />

Offline with<br />

<strong>Bank</strong>API Server<br />

<strong>SFMS</strong> On-Line /<br />

Offline with<br />

<strong>Bank</strong>API Server<br />

<strong>Bank</strong> API - Client<br />

<strong>Bank</strong>API Client<br />

<strong>SFMS</strong> architecture primarily consists of the HUB, the <strong>Bank</strong> Gateway sites and the<br />

Branch sites connected to one another in a well-defined hierarchy. The HUB and<br />

the <strong>Bank</strong> Gateway sites are connected via VSAT communication links / leased<br />

lines. The <strong>Bank</strong> Gateways and the Branch Severs can be connected via shared /<br />

dedicated leased lines or Dial Up lines depending on proximity and the volume of<br />

traffic.<br />

In the above architecture, the messages are created from <strong>SFMS</strong> On-line / Offline<br />

clients. In general <strong>Bank</strong>s use different <strong>Bank</strong> applications for internal purposes.<br />

But, the <strong>Bank</strong> external application generated messages have to be sent to<br />

destination branches. For sending messages to destination branches, there should<br />

be a carrier to carry messages to destination. For supporting the above condition,<br />

<strong>SFMS</strong> has provided a secured messages interface module, which is known as the<br />

<strong>Bank</strong>API <strong>Interface</strong>.<br />

The <strong>SFMS</strong> <strong>Bank</strong> API has the following components:<br />

<strong>Bank</strong>API Server<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 4 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

The main function of the <strong>Bank</strong>API Server is to send and receive messages for<br />

requests from <strong>Bank</strong>API Client. The <strong>Bank</strong>API Server continuously runs as a<br />

demon process and waits to serve <strong>Bank</strong>API client requests.<br />

‣ <strong>Bank</strong>API Server validates incoming messages and sends response message<br />

to <strong>Bank</strong>API Client.<br />

‣ <strong>Bank</strong>API server validates user signature with Block 4 content, after<br />

successful validation, the message is processed.<br />

‣ <strong>Bank</strong>API Server sends set of messages to <strong>Bank</strong>API client on request.<br />

The message formats are discussed in the subsequent chapter.<br />

<strong>Bank</strong>API Client<br />

The <strong>Bank</strong>API client methods / programs are provided to External <strong>Application</strong><br />

interface vendor to call <strong>Bank</strong>API Server for purpose of sending and receiving<br />

messages.<br />

The functions available with <strong>Bank</strong>API client are:<br />

‣ Send message using file<br />

‣ Send message as a string<br />

‣ Receive messages as a string<br />

Some of the main activities to be carried out for using <strong>SFMS</strong> – <strong>Bank</strong>API are:<br />

‣ For processing of External <strong>Application</strong> messages, the external application<br />

identification has to be registered with <strong>SFMS</strong> at Online / Offline with unique<br />

<strong>Bank</strong> <strong>Application</strong> ID.<br />

‣ Setup <strong>Bank</strong>API Client as per the instructions provided in subsequent chapters.<br />

‣ Develop interface with <strong>SFMS</strong> <strong>Bank</strong>-API client and External application<br />

‣ For the purpose of sending and receiving messages from <strong>SFMS</strong> Online/<br />

Offline Server, Start <strong>Bank</strong>API Process at <strong>SFMS</strong> Online-Offline Server<br />

‣ Send and receive messages from <strong>SFMS</strong>-<strong>Bank</strong>API server using <strong>SFMS</strong><br />

<strong>Bank</strong>API Client.<br />

2.2 Messages Flow<br />

This section explains the detailed message flow from <strong>SFMS</strong> <strong>Bank</strong>API Server to<br />

External applications.<br />

Outgoing Message Flow<br />

‣ External <strong>Application</strong> creates the message in <strong>SFMS</strong> bank application format<br />

explained in subsequent sections.<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 5 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

‣ External application invokes <strong>SFMS</strong> <strong>Bank</strong>API Client with arguments having<br />

message as string or file. This is explained in <strong>Application</strong> Usage Section. Only<br />

one message can be sent at a time from the <strong>Bank</strong> API client to the <strong>Bank</strong> API<br />

server.<br />

‣ <strong>SFMS</strong> <strong>Bank</strong>API Server process running at <strong>SFMS</strong> Offline / Online server validates<br />

message and populates the data into <strong>SFMS</strong> Offline / Online Server on successful<br />

validation and also sends corresponding response message. The <strong>SFMS</strong> response<br />

message structure is explained in subsequent sections.<br />

‣ During the validation of the message, system verifies for the User Signature<br />

(UMAC).<br />

‣ If a message is not signed, then that message will be forced to be in “PENDING<br />

AUTHORIZATION” state. The user needs to authorize the message at <strong>SFMS</strong><br />

online / offline server manually (using <strong>SFMS</strong> <strong>Application</strong>).<br />

‣ If the message is signed, on successful verification of UMAC the message will be<br />

kept in ‘TO BE SENT” state in <strong>SFMS</strong>. If the verification fails, <strong>SFMS</strong> API returns<br />

the error code to the external application.<br />

2.2.1 Incoming Message Flow<br />

‣ External application invokes <strong>SFMS</strong> <strong>Bank</strong>API Client with receive option.<br />

‣ <strong>SFMS</strong> <strong>Bank</strong>API Server verifies External application request and sends the<br />

messages as a string.<br />

‣ Incoming messages are sent by the <strong>Bank</strong> API server to the client in chunks of ten<br />

each.<br />

‣ Incoming messages are returned in the form of a string with a delimiter $@$.<br />

2.3 Pre-requisites for <strong>Bank</strong>API<br />

‣ Ensure that <strong>SFMS</strong> V 3.0 or subsequent version is installed.<br />

‣ Ensure that Java2 runtime environment with RMI Support is available at External<br />

<strong>Application</strong><br />

2.4 Software Requirements<br />

Software Requirements at<br />

External <strong>Application</strong><br />

Java2 runtime environment<br />

with RMI Support<br />

Software Requirements at Offline/ Online<br />

Server<br />

No additional software required<br />

2.5 Hardware Requirements<br />

No separate Hardware is required for <strong>Bank</strong>API Server. <strong>SFMS</strong> online / offline Server<br />

can be used for <strong>Bank</strong>API Service.<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 6 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

3.1 User Message<br />

CHAPTER 3 – BANKAPI MESSAGE STRUCTURES<br />

The following fields are required for the <strong>Bank</strong> application in order to generate a valid<br />

<strong>SFMS</strong> message.<br />

Inde<br />

x<br />

Mandatory/<br />

Optional<br />

Field Name<br />

1. M Block A Begin<br />

Identifier<br />

2. M Sender <strong>Bank</strong><br />

application<br />

identifier<br />

3. M Message<br />

Identifier<br />

4. M Input/Output<br />

Identifier<br />

5. M Message Type 3 Alpha<br />

Numeric<br />

6. M Sub Message 3 Alpha<br />

Type<br />

Numeric<br />

7. M Sender IFSC 11 Alpha<br />

Numeric<br />

8. M Receiver IFSC 11 Alpha<br />

Numeric<br />

9. M Delivery<br />

Notification Flag<br />

10. M Open<br />

Notification Flag<br />

11. M Non-delivery<br />

warning flag<br />

Field<br />

Length<br />

Data<br />

Type<br />

Description<br />

3 Char Block A begin Identifier. This<br />

should be {A:<br />

3 Alpha Uniquely identifies the <strong>Bank</strong><br />

Numeric application.<br />

This is the identifier with which<br />

<strong>Bank</strong> application is registered at<br />

the branch server.<br />

3 Alpha <strong>Application</strong> Identifier<br />

Numeric F01- User to User<br />

1 Char IO Identifier<br />

O-Output<br />

I-Input<br />

INFINET message type<br />

INFINET Sub message type. If<br />

Sub Message Type is blank,<br />

then fill with XXX.<br />

IFSC code of the Sender (IFSC<br />

code to which the bank<br />

application is registered.)<br />

IFSC code of the receiver<br />

1 Number Users to specify whether<br />

delivery notification is required<br />

for the message.<br />

1 – YES<br />

2 – NO<br />

1 Number Users to specify whether open<br />

notification is required for the<br />

message.<br />

1 – YES<br />

2 – NO<br />

1 Number Flag to inform the user whether<br />

the non-delivery warning<br />

message is required or not. The<br />

possible values are: 1 – Yes<br />

2 – No<br />

12. M Obsolescence<br />

Period<br />

The default value for nondelivery<br />

warning flag is ‘2’.<br />

3 Number Users to specify the period after<br />

which a non-delivery warning is<br />

to be sent to the sender,<br />

applicable only if non-delivery<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 7 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

13. M MUR (Message<br />

User Reference)<br />

14. M Possible<br />

Duplicate<br />

Emission Flag<br />

16 Alpha<br />

Numeric<br />

15. M Service Identifier 3 Alpha<br />

Numeric<br />

warning flag is specified.<br />

If Non-delivery warning flag is<br />

2, then this value should be set<br />

to ‘000’.<br />

If Non-delivery warning flag is<br />

1, then obsolescence value<br />

should be greater than or equal<br />

to 002.<br />

Range of the values for this<br />

field can be between 002 to<br />

999.<br />

This is represented in absolute<br />

number of units. Each unit is<br />

internally interpreted as equal to<br />

5 minutes.<br />

For example Obsolescence<br />

period of 003 units is equivalent<br />

of 15 minutes.<br />

<strong>Bank</strong> <strong>Application</strong> uses this field<br />

for identifying the message. If it<br />

is less than 16 then<br />

concatenated with X.<br />

1 Number Flag to indicate possible<br />

duplicate emission<br />

1 – YES<br />

2 – NO<br />

Destination <strong>Bank</strong> <strong>Application</strong><br />

identifier.<br />

If not applicable, it should be<br />

defaulted to XXX.<br />

16. M Originating date 8 Number Date on which the message was<br />

created at <strong>Bank</strong> application –<br />

(YYYYMMDD)<br />

17. M Originating time 4 Number Time on which the message<br />

was created at <strong>Bank</strong> application<br />

–(HHMM)<br />

18.<br />

19. M Testing and<br />

Training flag<br />

20. M Sequence<br />

Number<br />

1 Number Flag to indicate test and training<br />

message.<br />

1 – YES<br />

2 – NO<br />

9 Alpha<br />

Numeric<br />

Unique sequence number<br />

generation by the external<br />

application for the identification<br />

of the message in external<br />

application system. System<br />

messages for the user messages<br />

generated by external<br />

applications will carry this<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 8 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

21. M Filler 9 Alpha<br />

Numeric<br />

22. M UTR (Unique 16 Alpha<br />

Transaction<br />

Numeric<br />

Reference)<br />

sequence number. <strong>SFMS</strong> API<br />

rejects the message if there is<br />

no sequence number.<br />

Ex: If sequence number is 5<br />

then user should send as<br />

‘000000005’<br />

Filler for future use and default<br />

value is XXXXXXXXX.<br />

Unique Transaction Reference<br />

Generated for RTGS. Host<br />

applications should default it to<br />

XXXXXXXXXXXXXXXX<br />

23. M Priority Flag 2 Number This Priority flag is used for<br />

routing the messages in RTGS<br />

messages. For Host applications<br />

the default value is 99<br />

24. M Block A End<br />

Identifier<br />

25. M Block4 Begin<br />

Identifier<br />

26. M Block 4 Alpha<br />

Numeric<br />

27. M Block End<br />

Identifier for<br />

Block 4<br />

28. O Block5A Begin<br />

Identifier<br />

29. O Block 5A Alpha<br />

Numeric<br />

30. O Block5A End<br />

Identifier<br />

1 Char Block End identifier. This<br />

should be }<br />

3 Alpha This block4 begin identifier<br />

Numeric should be<br />

{4:<br />

Text block of the message.<br />

Length of the message cannot<br />

exceed 10 KB.<br />

2 Char Block End identifier should be -<br />

}<br />

6 Char It the <strong>Bank</strong> <strong>Application</strong> can<br />

generate the UMAC then this<br />

should be {UMAC:<br />

If the <strong>Bank</strong> <strong>Application</strong> does<br />

not have the capability to<br />

prepare the signature, this field<br />

can be left blank.<br />

Authorizer Signature. This is an<br />

optional field, which can be<br />

filled by <strong>Bank</strong> applications with<br />

signature prepared in PKCS7<br />

standard on Block4<br />

Information.<br />

If the <strong>Bank</strong> <strong>Application</strong> does<br />

not have the capability to<br />

prepare the signature, this field<br />

can be left blank. If this field is<br />

blank the messages will be<br />

forced to be in “PENDING<br />

AUTHORIZATION” state in<br />

<strong>SFMS</strong> Offline/Branch Server.<br />

1 Char If the <strong>Bank</strong> <strong>Application</strong> can<br />

generate the UMAC then this<br />

should be }<br />

If the <strong>Bank</strong> <strong>Application</strong> does<br />

not have the capability to<br />

prepare the signature, this field<br />

can be left blank.<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 9 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

Note: For straight through processing of messages Block 5A is mandatory.<br />

An example for the incoming message structure to the <strong>SFMS</strong> branch server from <strong>Bank</strong><br />

application is shown below<br />

{A:<br />

Block A begin Identifier<br />

B09<br />

<strong>Bank</strong> <strong>Application</strong> Identifier<br />

F01<br />

Message Identifier<br />

O Input/output Identifier ( either I or O)<br />

100 Message type<br />

XXX<br />

Sub Message type ( For IFN 298C01, this<br />

field should be C01, for IFN100<br />

Message, this field should be XXX)<br />

SBIN0001001<br />

Sender IFSC Code<br />

SBIN0001002<br />

End receiver IFSC Code<br />

1 Delivery notification flag<br />

1 Open Notification flag<br />

2 Non-delivery Warning flag<br />

005 Obsolescence Period<br />

abcdefgh12345678<br />

Message User Reference (MUR)<br />

2 Possible Duplicate flag<br />

XXX<br />

Service Identifier<br />

20030909 Originating date<br />

1020 Originating time<br />

2 Testing and training flag<br />

000012345 Sequence Number<br />

XXXXXXXXXX<br />

Filler<br />

XXXXXXXXXXXXXXXX<br />

Unique Transaction Reference.<br />

99 Priority Flag<br />

} Block A end Identifier<br />

{4: Block 4 Begin Identifier<br />

:20:TT/320<br />

Block 4 text message format<br />

:32A:20030909INR100,<br />

-} Block 4 End Identifier<br />

{UMAC:<br />

Block 5A Begin Identifier<br />

<br />

User Signature for Authorisation<br />

} Block 5A End Identifier<br />

3.2 Acknowledgement Message<br />

Index<br />

Mandato<br />

ry /<br />

Field Name<br />

Field<br />

Length<br />

Data<br />

Type<br />

Description<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 10 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

Optional<br />

1 M Block Identifier 3 Char Block Identifier<br />

2 M <strong>Bank</strong> application Identifier 3 Alpha <strong>Bank</strong> <strong>Application</strong> Identifier<br />

Numeric<br />

3 M Message Identifier 3 Alpha<br />

Numeric<br />

Message Identifier<br />

F20 – Acknowledgement<br />

Message<br />

1 Char Input/Output Identifier<br />

I – Input<br />

4 M Input/Output<br />

Identifier<br />

5 M Sequence number 9 Number External <strong>Application</strong><br />

Sequence Number for which<br />

this acknowledgement is<br />

intended.<br />

7 M Sender IFSC 11 Alpha<br />

Numeric<br />

IFSC code of Originating<br />

<strong>SFMS</strong> branch.<br />

8 M Date and Time 12 Number Date and Time on which<br />

message is acknowledged<br />

9 M Block End Identifier 1 Char Block End Identifier<br />

{A:B09F20O000001000SBIN0001001200103031325}<br />

{A:<br />

Block Identifier<br />

B09<br />

<strong>Bank</strong> <strong>Application</strong> Identifier<br />

F20<br />

Acknowledgment message<br />

I<br />

Input/Output Identifier<br />

000001000 External <strong>Application</strong> Sequence Number<br />

SBIN0001001<br />

Originating IFSC<br />

200309091023 Date and time on which the sender <strong>SFMS</strong> Gateway<br />

acknowledges message<br />

} Block End Identifier<br />

3.3 Non-delivery Warning Message<br />

Index<br />

Manda<br />

tory/O<br />

ptional<br />

Field Name<br />

Field<br />

Length<br />

Field<br />

Type<br />

Description<br />

1 M Block Identifier 3 Char Block Identifier<br />

2 M <strong>Bank</strong> application Identifier 3 Char <strong>Bank</strong> <strong>Application</strong> Identifier<br />

3 M Message Identifier 3 Alpha<br />

Numeric<br />

Message Identifier<br />

F22 - Non-delivery Warning<br />

message<br />

4 M Input/Output<br />

Identifier<br />

1 Char Input/Output Identifier<br />

I – Input<br />

5 M Sequence number 9 Number External <strong>Application</strong><br />

Sequence Number .<br />

7 M Sender IFSC 11 Alpha<br />

Numeric<br />

IFSC code of Originating<br />

<strong>SFMS</strong> branch.<br />

8 M Date and Time 12 Numeric Date and Time at which nondelivery<br />

warning message is<br />

generated.<br />

9 M Block End Identifier 1 Char Block End Identifier<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 11 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

{A: B09F22I000001000SBIN000100200101012227}<br />

{A:<br />

Block Identifier<br />

B09<br />

<strong>Bank</strong> <strong>Application</strong> Identifier<br />

F22<br />

Non-delivery Warning Message<br />

I<br />

Input/Output Identifier<br />

000001000 Creation sequence number of the message<br />

SBIN000100<br />

Originating IFSC<br />

200101012227 Date and time on which non-delivery warning message is<br />

generated.<br />

} Block End Identifier<br />

3.4 Delivery Notification Message<br />

Index Mandatory/Option Field Name Field Field Description<br />

al<br />

Length Type<br />

1 M Block Identifier 3 Char Block Identifier<br />

2 M <strong>Bank</strong> application 3 Alpha <strong>Bank</strong> <strong>Application</strong> Identifier<br />

Identifier<br />

Numeric<br />

3 M Message Identifier 3 Alpha<br />

Numeric<br />

Message Identifier<br />

F23 - Delivery Notification<br />

message<br />

4 M Input/Output<br />

Identifier<br />

1 Char Input/Output Identifier<br />

I – Input<br />

5 M Sequence number 9 Number External <strong>Application</strong><br />

sequence number<br />

7 M Sender IFSC 11 Alpha<br />

Numeric<br />

IFSC code of Originating<br />

<strong>SFMS</strong> branch.<br />

8 M Date and Time 12 Number Date and time on which the<br />

message is delivered.<br />

9 M Block End Identifier 1 Char Block End Identifier<br />

{A: B09F23I000001000SBIN0001002000004000}<br />

{A:<br />

Block Identifier<br />

B09<br />

<strong>Bank</strong> <strong>Application</strong> Identifier<br />

F23<br />

Delivery Notification Message<br />

I<br />

Input/Output Identifier<br />

000001000 Creation sequence number of the message<br />

SBIN0000002<br />

IFSC code of Originating <strong>SFMS</strong> branch.<br />

200101081730 Date and time on which the message is<br />

delivered.<br />

} Block End Identifier<br />

3.5 Open Notification<br />

Index<br />

Mandatory/Option<br />

al<br />

Field Name<br />

Field<br />

Length<br />

Field<br />

Type<br />

Description<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 12 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

1 M Block Identifier 3 Char Block Identifier<br />

2 M <strong>Bank</strong> application 3 Alpha <strong>Bank</strong> <strong>Application</strong> Identifier<br />

Identifier<br />

Numeric<br />

3 M Message Identifier 3 Alpha<br />

Numeric<br />

Message Identifier<br />

F24 - Open Notification<br />

message<br />

4 M Input/Output<br />

Identifier<br />

1 Char Input/Output Identifier<br />

I – Input<br />

5 M Sequence number 9 Number External <strong>Application</strong><br />

sequence number<br />

6. M Sender IFSC 11 Alpha<br />

Numeric<br />

IFSC code of Originating<br />

<strong>SFMS</strong> branch.<br />

7 M Date and Time 12 Number Date and time on which the<br />

message is opened at<br />

destination.<br />

8 M Block End Identifier 1 Char Block End Identifier<br />

{A:B09F24O000001000SBIN000100200101081730}<br />

{A:<br />

Block Identifier<br />

B09<br />

<strong>Bank</strong> <strong>Application</strong> Identifier<br />

F24<br />

Open Notification Message<br />

I<br />

Input/Output Identifier<br />

000001000 Creation sequence number of the message<br />

200103032323 Date and time on which message is opened.<br />

SBIN000100<br />

IFSC code of Originating <strong>SFMS</strong> branch.<br />

} Block End Identifier<br />

3.6 <strong>Bank</strong>API Response Message<br />

Index Mandatory/Option Field Name Field Field Description<br />

al<br />

Length Type<br />

1 M Block Identifier 1 Char Block Identifier Always {<br />

2 M Return Indicator 1 Char P=Passed<br />

F=Failed<br />

3 O Reason Code 10 Alpha<br />

Numeric<br />

Reason code for Failure.<br />

Host applications should<br />

have the mapping screen for<br />

mapping these reason codes<br />

to reason descriptions.<br />

4 M Block End Identifier 1 Char Block End Identifier.<br />

Always }<br />

{FIMRT020021}<br />

{ Block Identifier<br />

F<br />

Failed<br />

IMRT020021 Failed due to the reason sender IFSC doesn’t exist in IIFSC<br />

directory. Reasons codes detailed in subsequent sections.<br />

} Block end identifier.<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 13 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

CHAPTER 4 – BANKAPI USAGE WITH EXAMPLES<br />

This chapter gives a detailed explanation about External application registration, <strong>SFMS</strong><br />

<strong>Bank</strong>API startup and shutdown and usage of <strong>Bank</strong>API Client.<br />

4.1 Register External <strong>Bank</strong> <strong>Application</strong><br />

First step in the <strong>Bank</strong>API process is the registration of an external application at<br />

<strong>SFMS</strong> Offline/ Online Server. The registration process is as follows:<br />

Click Message Routing Register <strong>Bank</strong> <strong>Application</strong> to access the Register<br />

External <strong>Application</strong> screen. Enter unique External <strong>Application</strong> Id, description and<br />

password to register an External <strong>Application</strong>.<br />

The Register screen has the following entries.<br />

Items<br />

Description<br />

External <strong>Application</strong> Id A Text Box to enter a valid External <strong>Application</strong> Id.<br />

External <strong>Application</strong> Description A Text Box to enter description for an External<br />

<strong>Application</strong><br />

Password<br />

A Text Box to enter a Password.<br />

Click Save button to register the external application.<br />

Click Reset button to reset values.<br />

For more information on <strong>Bank</strong> <strong>Application</strong> registration details refer to the Offline<br />

and Online User Manuals.<br />

4.2 Set-up <strong>Bank</strong> API Client at External <strong>Bank</strong> <strong>Application</strong><br />

For sending and receiving messages successfully using <strong>Bank</strong> API Server, the<br />

following steps need to be carried out at <strong>SFMS</strong> Client Server:<br />

‣<br />

‣<br />

‣ At <strong>SFMS</strong> <strong>Bank</strong>API client, create a folder by name ‘sfmsbr’ and sub folder by<br />

name ‘bankapi’<br />

‣ Copy <strong>Bank</strong>APIClient.class, <strong>Bank</strong>APIImpl_Stub.class, and<br />

<strong>Bank</strong>API<strong>Interface</strong>.class from C:\<strong>SFMS</strong>\jakarta-tomcat-<br />

3.2.3\webapps\ROOT\WEB-INF\classes\sfmsbr\bankapi folder of <strong>SFMS</strong> Online<br />

/Offline Server to the bankapi folder at the External <strong>Bank</strong> <strong>Application</strong>.<br />

‣ Set CLASSPATH environment variable to include the class files<br />

<strong>Bank</strong>APIClient.class, <strong>Bank</strong>APIImpl_Stub.class, and <strong>Bank</strong>API<strong>Interface</strong>.class<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 14 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

‣ Copy <strong>Bank</strong>APIConfig.properties from C:\<strong>SFMS</strong>\jakarta-tomcat-<br />

3.2.3\webapps\ROOT\WEB-INF\classes\sfmsbr\coms\core\utils folder of <strong>SFMS</strong><br />

Online / Offline server to bankapi folder of External <strong>Bank</strong>API client server.<br />

4.3 Start <strong>Bank</strong> API Server at <strong>SFMS</strong> Offline/Online<br />

The following steps are required for executing the <strong>Bank</strong> API Server:<br />

‣ The RMI Client will request for reference of component at the Online / Offline<br />

Server.<br />

‣ The Registry will send back the reference of component.<br />

‣ The client will invoke methods (send & receive) of the component<br />

After successful execution of <strong>Bank</strong> API server, follow the steps given below:<br />

‣ Click Start on your Windows desktop. Select Run.<br />

‣ Enter cmd. Click Ok.<br />

‣ At the command prompt type rmiregistry and press enter<br />

‣ Again Click Start on your Windows desktop. Select Run<br />

‣ Enter cmd. Click Ok.<br />

‣ At the command prompt type java sfmsbr.bankapi.<strong>Bank</strong>APIServer and press<br />

enter.<br />

Example : C:\>java sfmsbr.bankapi.<strong>Bank</strong>APIServer<br />

The message Server Started indicates successful execution of <strong>Bank</strong> API server.<br />

4.4 External <strong>Application</strong>s Message Processing<br />

External applications can send and receive messages by using the following methods:<br />

‣ Command line argument<br />

‣ <strong>SFMS</strong> <strong>Bank</strong>API program method.<br />

The details of the above process are explained in subsequent sections.<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 15 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

4.5 <strong>Bank</strong>API client <strong>Interface</strong> through Command Line<br />

<strong>Bank</strong>API File Send Option<br />

Using this option external applications can send messages as files.<br />

java sfmsbr.bankapi.<strong>Bank</strong>APIClient filesend filename.txt <br />

Example: C:\> java sfmsbr.bankapi.<strong>Bank</strong>APIClient filesend filename.txt <br />

Message Send option<br />

Using this option, external applications can send a message as a string.<br />

Example: C:\> java sfmsbr.bankapi.<strong>Bank</strong>APIClient msgsend <br />

Filename is an optional argument, if the user selects filename, then the status of the<br />

message will be written to file. Otherwise the status will be displayed on output<br />

device.<br />

Message receive option<br />

For receiving a message from <strong>SFMS</strong> <strong>Bank</strong>API server, the external application<br />

invokes <strong>Bank</strong>API from the command line arguments as<br />

java sfmsbr.bankapi.<strong>Bank</strong>APIClient receive <br />

<br />

Example: java sfmsbr.bankapi.<strong>Bank</strong>APIClient receive API BANKAPI<br />

IFSC0000001<br />

Filename is an optional argument, if the user selects filename, then the status of the<br />

message will be written to file. Otherwise the status will be displayed on output<br />

device.<br />

IFSC is the IFSC code of the Online/Offline server where the External <strong>Bank</strong><br />

<strong>Application</strong> has been registered.<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 16 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

4.6 <strong>Bank</strong>API client <strong>Interface</strong> through Program Method<br />

<strong>SFMS</strong> <strong>Bank</strong>API client can be called using <strong>SFMS</strong> <strong>Bank</strong>API Client program<br />

methods. The client method returns a string to the external application.<br />

The following methods are available for external programming interface:<br />

‣ executeRemoteProcess(java.lang.String[] args)<br />

• This method should be called from another program with the<br />

following arguments to send a message to <strong>SFMS</strong> <strong>Bank</strong>API Server.<br />

Parameters:<br />

String - should be either filesend or msgsend or receive<br />

String - if filesend input absolute path of file, if msgsend input content<br />

of the message, if receive External<strong>Application</strong>Id.<br />

String - Password.<br />

String - if receive IFSC.<br />

‣ getResponse()<br />

• This method returns the response message when a file is sent.<br />

‣ getReceivedMessages()<br />

• This method returns the string of received messages.<br />

For the sample program provided for developers, refer Appendix B.<br />

4.7 Overview of <strong>SFMS</strong> <strong>Bank</strong>API Usage<br />

S.No. Program Arguments Description<br />

1 <strong>Bank</strong>APIClient msgsend<br />

<br />

<br />

<br />

First argument “msgsend” indicates<br />

that the system is trying to send a<br />

message in the form of a string.<br />

Second argument is the string<br />

containing the actual message to be<br />

transmitted to <strong>SFMS</strong>. This method<br />

will return a string either in file or<br />

on the output device. The filename is<br />

an optional argument where the<br />

2. <strong>Bank</strong>APIClient Filesend<br />

<br />

<br />

incoming messages are to be saved.<br />

First argument “filesend” indicates<br />

that the system is trying to send a<br />

message in the form of a file.<br />

Second argument is the string<br />

containing the filename of the<br />

message to be transmitted to <strong>SFMS</strong>.<br />

This method will return a string<br />

either in file or on the output device.<br />

The filename is optional argument.<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 17 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

3. <strong>Bank</strong>APIClient Receive <br />

“receive” argument receives<br />

messages in the form of a string at<br />

that instance from <strong>SFMS</strong> and $@*<br />

as a delimiter with limit of maximum<br />

no. of ten messages .<br />

4. executeRemotePro<br />

cess (Arguments)<br />

msgsend<br />

<br />

<br />

Filesend<br />

<br />

Receive <br />

If there are no messages, the system<br />

gives status as ‘No Messages<br />

Received’.<br />

This method will return a string<br />

either in file or on the output device.<br />

The filename is an optional<br />

argument.<br />

This method is called from another<br />

program with required Arguments<br />

and responses will be received by<br />

calling the following methods:<br />

For file send / message Send:<br />

- getResponse()<br />

For message receive<br />

- getReceivedMessages()<br />

Note: Sample program provided at<br />

Appendix-B.<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 18 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

5.1 List of Exceptions<br />

CHAPTER 5 – List of Exceptions and Limitations<br />

The following are <strong>Bank</strong>API Error Messages and their corresponding descriptions<br />

S No Error Code and Description<br />

1. PBAPI000000=Message sent successfully<br />

2. FBAPI000001=Invalid Block-A Begin Identifier. (Prescribed format is {A:)<br />

3. FBAPI000002=Invalid Sender <strong>Bank</strong> <strong>Application</strong> identifier. (eg : APP)<br />

4. FBAPI000003=Invalid Message Identifier. (eg : F01)<br />

5. FBAPI000004=Invalid Input/Output identifier. (Always O)<br />

6. FBAPI000005=Invalid Message Type. (eg 100)<br />

7. FBAPI000006=Invalid Sub Message Type. (For IFN298C01, this field should be<br />

C01, for IFN100 message, this field should be XXX)<br />

8. FBAPI000007=Invalid Sender IFSC. (eg : CNRB0000001)<br />

9. FBAPI000008=Invalid Receiver IFSC. (eg : CNRB0000001)<br />

10. FBAPI000009=Invalid Delivery Notification Flag. (either 1 or 2)<br />

FBAPI000010=Invalid Open Notification Flag. (either 1 or 2)<br />

11. FBAPI000011=Invalid Obsolescence Period. (Range of values for this filed<br />

should be between 002 to 999)<br />

12. FBAPI000012=Invalid Message User Reference (eg: abcdefgh12345678)<br />

13. FBAPI000013=Invalid Possible Duplicate Emission Flag. (either 1 or 2)<br />

14. FBAPI000014=Invalid Receiving <strong>Bank</strong> <strong>Application</strong> Identifier (eg: TBA if<br />

present or XXX if not present)<br />

15. FBAPI000015=Invalid Originating Date.(Format should be YYYYMMDD)<br />

16. FBAPI000016=Invalid Originating Time.(Format should be HHMM)<br />

17. FBAPI000017=Invalid Delayed Message Flag.(Either 1 or 2)<br />

18. FBAPI000018=Invalid Testing & Training Flag. (Either 1 or 2)<br />

19. FBAPI000019=Invalid Sequence Number or duplicate sequence number. (eg :<br />

000000001)<br />

20. FBAPI000020=Invalid Filler. (default should be XXXXXXXXX)<br />

21. FBAPI000021=Invalid User Transaction Reference.(default should be<br />

XXXXXXXXXXXXXXXX)<br />

22. FBAPI000022=Invalid Priority Flag. (Default should be 00)<br />

23. FBAPI000023=Invalid Block-A End identifier. (should be })<br />

24. FBAPI000024=Invalid Block4 Begin identifier. (should be {4:)<br />

25. FBAPI000025=Invalid Block4. (Length of the message cannot exceed 10 KB)<br />

26. FBAPI000026=Invalid Block4 End identifier. (Block end identifier should be})<br />

27. FBAPI000027=Invalid Block5A Begin identifier.(Should be {UMAC:)<br />

28. FBAPI000028=Invalid Block5A.<br />

29. FBAPI000029=Invalid Block5A End identifier.(Should be })<br />

30. FBAPI000030=Sender & Receiver IFSC should not be same.<br />

31. FBAPI000031=Invalid Header Length<br />

32. FBAPI000100=Invalid UserId.<br />

33. FBAPI000101=Invalid Password<br />

34. FBAPI000102=Error in Deformatter.<br />

35. FBAPI000103=Error in Syntax Check.<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 19 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

36. FBAPI000104=Error in Conditional rules.<br />

37. FBAPI000105=Error in Check UMAC.<br />

5.2 Limitations<br />

‣ External <strong>Bank</strong> <strong>Application</strong>s can send one message at a time through <strong>Bank</strong>API.<br />

‣ External <strong>Bank</strong> <strong>Application</strong>s can receive a maximum of 10 messages at a time<br />

including User and system messages.<br />

‣ The <strong>SFMS</strong> <strong>Bank</strong>API Server and Client should be on the same Local area network.<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 20 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

Appendix A – Digital Sign and Verification<br />

For straight through processing of a message, <strong>Bank</strong>API requires Block 5A with UMAC<br />

information. This section provides information on message signing and algorithms<br />

required.<br />

SIGNATURE<br />

TCS uses PKCS#7 specifications for Digital signatures. This standard describes a general<br />

syntax for data that may have cryptography applied to it, such as digital signatures and<br />

digital envelopes. Even though PKCS#7 specification specifies syntax for Signed data,<br />

enveloped data, signed and enveloped data, encrypted data etc, only PKCS#7 Signed<br />

Data is used in <strong>SFMS</strong>. The PKCS#7 data structure is shown below.<br />

PKCS#7 (CONTENT INFO)<br />

Content Type<br />

Content<br />

Indicates the type of content. It is an object identifier,<br />

which means it is a unique string of integers assigned by<br />

the authority that defines the content type. The value set<br />

by TCS is 1.2.840.113549.1.7.2<br />

Content. It consists of Signed – data Content Type<br />

PKCS#7(SIGNED DATA )<br />

Version The syntax version number. It shall be 1<br />

DigestAlgorithms<br />

Collection of message-digest algorithm identifiers.<br />

ContentInfo<br />

The content that is signed. The Content Type value set by TCS is<br />

1.2.840.113549.1.7.1 and the Content is “NULL” (detached Signature)<br />

Set Of Certificates<br />

TCS sets the Signer Digital Certificate<br />

Set of CRLs<br />

This optional field is not used by TCS<br />

Stack of Signer Info<br />

algorithm ID<br />

Algorithm identifier<br />

Parameters<br />

Algorithm used to sign certificate. TCS<br />

use either SHA1 or MD5<br />

Should not be used.<br />

Signer Info<br />

Version The syntax version number. It shall be 1<br />

IssuerAndSerialNumber<br />

Specifies the signer's certificate<br />

algorithm ID<br />

Identifies the message-digest algorithm (and<br />

Any associated parameters) under which the content and<br />

Authenticated attributes (if present) are digested. TCS uses<br />

SHA1 or MD5 algorithm<br />

AuthenticatedAttributes<br />

Set of attributes that are signed<br />

(i.e., authenticated) by the signer. TCS sets the following<br />

attributes 1) A PKCS #9 content-type attribute having as its<br />

value the content type of the Content Info value being signed 2)<br />

A PKCS #9 message-digest attribute, having as its value the<br />

message digest of the content 3) The signing-time at which the<br />

signer performed the signing process.<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 21 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

digestEncryptionAlgorithm<br />

EncryptedDigest<br />

unauthenticatedAttributes<br />

Identifies the digest-encryption algorithm (and any associated<br />

parameters) under which the message digest and associated<br />

information are encrypted with the signer's private key. TCS<br />

uses “RSA Encryption” (1.2.840.113549.1.1.1)<br />

The result of encrypting the message digests and associated<br />

information with the signer's private key.<br />

Set of attributes that are not signed by the Signer. This optional<br />

field is not used by TCS<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 22 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

Appendix B – Sample Program to call <strong>Bank</strong>API client<br />

A sample Java Program to call <strong>Bank</strong>API server for sending and receiving of external<br />

application messages is shown below:<br />

package sfmsbr.bankapi;<br />

import sfmsbr.bankapi.<strong>Bank</strong>APIClient;<br />

public class Call<strong>Bank</strong>APIClient<br />

{<br />

public static void main(String[] args)<br />

{<br />

String[] arguments = new String[4];<br />

String response = "";<br />

<strong>Bank</strong>APIClient bankAPIClient = null;<br />

if(args[0].equalsIgnoreCase("filesend"))<br />

{<br />

try{<br />

//argument specifying FILE SEND process.<br />

arguments[0] = "filesend";<br />

//input file<br />

arguments[1] = "c:\\APITestMessage.txt";<br />

//password<br />

arguments[2] = "123456";<br />

//instantiating <strong>Bank</strong>APIClient object<br />

bankAPIClient = new <strong>Bank</strong>APIClient();<br />

//calling executeRemoteProcess method in <strong>Bank</strong>APIClient class.<br />

bankAPIClient.executeRemoteProcess(arguments);<br />

//response msg after executeRemoteProcess method<br />

response = bankAPIClient.getResponse();<br />

System.out.println("response for filesend = "+response);<br />

}catch(Exception e){}<br />

}<br />

else if(args[0].equalsIgnoreCase("msgsend"))<br />

{<br />

try{<br />

//argument specifying MESSAGE SEND process.<br />

arguments[0] = "msgsend";<br />

//input message<br />

arguments[1] =<br />

"{A:ABCF01O100XXXCNRB0000001CNRB0000002112005abcdefgh123456782APP2003092<br />

315352000000008XXXXXXXXXXXXXXXXXXXXXXXXXXX}{4:~:20:TRA-<br />

008~:32A:20040901INR200,~:50:DINESH~HYD~:59:/RAJA~HYD~-}";<br />

//password<br />

arguments[2] = "123456";<br />

//instantiating <strong>Bank</strong>APIClient object<br />

bankAPIClient = new <strong>Bank</strong>APIClient();<br />

//calling executeRemoteProcess method in <strong>Bank</strong>APIClient class.<br />

bankAPIClient.executeRemoteProcess(arguments);<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 23 of 24


<strong>SFMS</strong> <strong>Bank</strong> <strong>Application</strong> <strong>Interface</strong> specifications Version 3.0<br />

}<br />

}<br />

//response message after executeRemoteProcess method<br />

response = bankAPIClient.getResponse();<br />

System.out.println("response for msgsend = "+response);<br />

}catch(Exception e){}<br />

}<br />

else if(args[0].equalsIgnoreCase("receive"))<br />

{<br />

try{<br />

//argument specifying MESSAGE RECEIVE process.<br />

arguments[0] = "receive";<br />

//External<strong>Application</strong>Registered at Receive side<br />

arguments[1] = "APP";<br />

//password<br />

arguments[2] = "123456";<br />

//IFSC Code at Receiving side.<br />

arguments[3] = "CNRB0000002";<br />

//instantiating <strong>Bank</strong>APIClient object<br />

bankAPIClient = new <strong>Bank</strong>APIClient();<br />

//calling executeRemoteProcess method in <strong>Bank</strong>APIClient class.<br />

bankAPIClient.executeRemoteProcess(arguments);<br />

//received messages after executeRemoteProcess method<br />

response = bankAPIClient.getReceivedMessages();<br />

System.out.println("response for Receive = "+response);<br />

}catch(Exception e){}<br />

}<br />

else<br />

{<br />

System.out.println("*****************Usage*****************");<br />

System.out.println("incorrect usage:Refer Follow <strong>Bank</strong>API client<br />

Usage");<br />

}<br />

Confidential<br />

Uncontrolled when Printed<br />

Page 24 of 24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!