Before starting the registration process your organisation must meet several prerequisites in order to be successfully onboarded as a customer for Coop Pank Gateway API:
On-boarding process for starting to use live environment:
For additional help, please contact your personal Business Client Manager or the IT Support Team gateway@cooppank.ee.
It's possible to use the Gateway API services as a single client or as an operator.
Single clients
Using it as a single client means that client itself is the owner of the authentication certificate and connection software. Certificate provides access to one customer or legal entity only.
Operators/service providers and end users using their services
Operators or service providers are the intermediary. They themselves own a certificate and provide the service to multiple customers or legal entities. It is usually for accounting software providers and other similar business cases.
In this scheme there are two kinds of clients:
Only service provider connection software is using Gateway API services directly. End users are using the service provider software. For all requests we also need to know the end user - the actual client that uses the service provider. For this we require two HTTP headers in addition to regular expected input:
If these are missing from the request, you will get a corresponding error.
Authentication (connection) certificates are necessary for both test and live environments. Certificates are necessary for single clients and operators/service providers. Certificate identifies and confirms on transport layer that messages were sent by customer's software to the Bank.
Alternatively you can request the certificates from Coop Pank CA, you need test certificate for Sandbox and the other one for Live environment. It is an SSL Base64 PEM certificate that also requires a key.
Process for Coop Pank CA certificate generation (ignore if you are using SK ID Solution AS certificate):
To verify your certificates and test the basic connection to the API you can use the Communication Test services service in both Live and Sandbox.
It is possible to add the digital stamp of Coop Pank to the following messages:
Digital stamp can be added to all contract types, the use of the digital stamp in services must be agreed upon in the Coop Pank Gateway contract.
A digital stamp is added to all messages, as agreed upon in the contract, except for error type of messages presented in XML format. Adding a digital stamp creates an ASICE container. Each XML file is placed in a separate digital container. This means that one digital container can contain one XML file.
File names are assigned to the digital container and the file inside as follows:
Message | Name of the ASICE container | Name of the file inside the ASICE container |
Automatic Account Statement | statement.asice | statement.xml |
Account Statement | statement.asice | statement.xml |
Payment Status Report | response.asice | response.xml |
Depending on whether the response is digitally stamped or not, Content_Type in Header of the response may vary accordingly. See more details: Messaging.
Gateway has two environments:
Live
Live base URL is: https://cpgw.cooppank.ee/
Sandbox
Sandbox can be used to test your integrations when on-boarding or also any additional developments. It is technically also very similar to Live environment - the services, messages structure etc. is the same.
Sandbox base URL is: https://cpgw-sandbox.cooppank.ee/
List of services which are available in the Gateway API.
SERVICE | DESCRIPTION AND PURPOSE | SERVICES | FORMATS |
Generic Services | |||
Communication Test | For testing the connection and credentials (certificates). | GET gateway/api/heartbeat GET gateway/api/heartbeat/mq POST gateway/api/heartbeat | XML |
Messaging | For managing the messages (reading, deleting). | GET gateway/api/messages GET gateway/api/messages/next GET gateway/api/messages/count POST gateway/api/messages/delete | Response varies according to messages |
AIS Services | |||
Account Statement | Getting an account statement or list of transactions for a selected period | POST gateway/api/account-statement | XML camt.060.001.06 / camt.053.001.02 |
Account Balance | Getting account balances | POST gateway/api/account-balance | XML camt.060.001.06 / XML camt.052.001.02 |
Automatic Account Statement | Generated every midnight for the previous twenty-four hours. It's generated for every account separately. For customers with contracts.
| Message in the response table | XML camt.053.001.02 |
Debit Credit Notification | For every transaction a new message will be generated immediately (in the response table).
| Message in the response table | XML camt.054.001.02 |
PIS Services | |||
Payment Initiation | Service for Payment initiation. Service is used to initiate return payments. | POST gateway/api/payment | XML pain.001.001.03 / pain.002.001.12 |
One of the main functions of Coop Pank Gateway is the messaging service. On the database side, it consists of two tables - request table and response table. Customer posts its requests to request table and gets its messages from response table. By default the response table returns oldest unread first. Messaging process consists of three steps: posting a request, getting the response and deleting the response.
Flow of API requests:
POST [base-url]/gateway/api/payment # initiate payment request
GET [base-url]/gateway/api/messages/next # receive response message
# handle message on customer side
DELETE [base-url]/gateway/api/messages/[Message-Response-Id] # delete read message to confirm it's received
POST [base-url]/gateway/api/account-statement # initiate account statement request
GET [base-url]/gateway/api/messages/next # receive response message with account statement data status
# handle message on customer side
DELETE [base-url]/gateway/api/messages/[Message-Response-Id] # delete read message to confirm it's received
POST [base-url]/gateway/api/account-balance # initiate account balance request
GET [base-url]/gateway/api/messages/next # receive response message with account balance data status
# handle message on customer side
DELETE [base-url]/gateway/api/messages/[Message-Response-Id] # delete read message to confirm it's received
GET [base-url]/gateway/api/messages/next # receive the oldest unread/undeleted message
# handle message on customer side
DELETE [base-url]/gateway/api/messages/[Message-Response-Id] # delete read message to confirm it's received