A Step-by-Step Guide for Integrating with Registry Service.
The Registry Service handles critical functionalities such as authentication, authorization, and the creation of tenant spaces within the platform. Integrating with Registry at its core services allows you to access other suites of API services. The suites of APIs include:
-
The Wallet Service
-
Merchant Service
-
Logistics Service
-
Trace Service
Each of the above mentioned services are designed for reusability and allows for easy third party integration.
At the end of this guide, you will be able to:
-
Integrate with Registry service
-
Enable Tenant API service
-
Enable Wallet API service
Requirement
- A knowledge of secure coding
Before your integration journey begins, get familiar with some of the following discussion around the Registry service.
-
Staging and Live Base URL
-
Onboarding a new user
-
Authorization: API Keys & Access Token
-
Understaning the Registry Webhook
Staging and Live Base URL
The API is accessed by making HTTP requests to the Registry endpoint URL. Every (methods, parameters, etc.) is fixed to no version number, and every request don't have to contain one.
We have provided a different base URL for both Test and Live environment. You can switch from the test environment to the live environment on your dashboard whenever needed, provided you have completed all compliance requirements.
The stable HTTP endpoint for the latest version is:
| URL | Environment |
|---|---|
| https://dfs-registry-dev.sabi.am | Live Environment |
| https://api-stage-platform.sabi.am/platform/registries | Staging Environment |
It's important to note that any transactions conducted in the live environment are considered live transactions, meaning they have actual financial implications. Take caution when performing actions in the live environment to ensure accuracy and validity.
Onboarding
Upon registration, an email One-Time-Password (OTP) will be sent to the email address you provided during registration. Enter the OTP to sign into your account. Once you are signed in, subsequent access to your account will only require your email and password, without any additional OTP entry.
Authorization: API Keys & Access Token
When you sign up, Registry creates API keys for you to use when making and verifying requests. You can find these keys by reaching out to our support. There are two types of API keys on Registry:
-
API Key: The registry api key is included in the headers for both sign-up and login requests to ensure the request is coming from an authorized client. You are required to include the secret key in the header of each API request in this format: header: apiKey:apiKey value
-
Access Token: The public key is specifically designed to integrate the Problem ooler Inline Javascript to access. It is important to note that these public keys can not be used to create accounts or transactions via APIs. They are only for integrating with the frontend.
To get the Registry Service API keys:
- Reach out to our support
To get your Access token
Create an account and log in with your creditials, at a successful log in, you will see a generated access code for authentication.
�� WARNING: Ensure to safeguard your API keys and avoid any disclosure or exposing it in any way.
Understanding the Registry Webooks
In addition to the Transfer Status Query endpoint, we highly recommend that you verify the status to every transfer processed using the webhook notifications sent to your webhook URL. These notifications include details of the transfer status and its corresponding value, which will provide you with adequate information on the status of your transfer.
On Registry , there are three key transfer statuses that are returned for each transfer transaction:
-
Completed
-
Reversed
-
Failed
For a comprehensive understanding of these statuses and their associated values, the section below contains sample webhooks for each transfer status and detailed description to ensure you have a good understanding of each transfer webhook.
Successful transfer
For each successfully processed transfer, the table below contains actions and their response.
| Status | Value | Description |
|---|---|---|
| completed | false | The transfer was not successful, either failed or has been reversed. Check is_reversed and failed status to confirm. |
| failed | true | The transfer was unsuccessful and could not be processed. Check is_reversed status if the transfer has been reversed. |
| is_reversed | true | The transfer was not successful, and the funds have been reversed to the sender's account. |
Reversed Transfer
| Value | Description | |
|---|---|---|
| completed | false | The transfer was not successful, either failed or has been reversed. Check is_reversed and failed status to confirm. |
| failed | true | The transfer was unsuccessful and could not be processed. Check is_reversed status if the transfer has been reversed. |
| is_reversed | true | The transfer was not successful, and the funds have been reversed to the sender's account. |
Webhook notifications are also sent for transfers that have been reversed due to failure to complete or process. The table below contains the status and value returned for a reversed transfer.