Generate access token
To generate an access token use API POST/authorization
and provide the received credentials in the request:
In the response, you will receive token
along with other user’s parameters.
Refreshing access token
In order to refresh an access token just simply request a new access token as described above.
Using access token
Once you obtain an access token, it can be used to access SDK APIs. Token should be passed in the Authorisation
header:
Example:
If the access token is valid, a success or error response will be returned. If the access token is expired or invalid, the API will return an HTTP 401.
NextBefore starting creating customers and performing transactions initial setup should be done according to your business needs.
Create a currency
You are able to create any currency you need – it can be real currency or any entity which you are going to count in SDK platform.
To call the listed below APIs, authorisation as administrator is required.
Create new currency
With the Administrator’s rights you can create a new currency. Use the POST /currencies API endpoint requesting the values:
Create a new issuer
Create the new issuer with the Admin’s rights using the POST /issuers endpoint.
Same the response value (ID). This issuer’s ID will be used in the following use cases where it is required to specify currency. Issuer is used because you are able to create several issuers for the same currency.
Use case flow visualised:
NextCreate the Bank within the system
If you are going to use banks to top-up user accounts or to perform withdrawals from user accounts it is required to add banks you are going to use.
To call the listed below APIs, authorisation as administrator is required.
- To add the bank with the Administrator’s rights, use the POST /bank-catalog requesting the values (Note! Bic and Swift values should be unique):
You will get the bankId value in response and use it in the top-up, transfer to bank account and withdraw functionality.
- To get the list of banks use the GET /bank-catalog endpoint in case you need to receive the bank parameters.
Use case flow visualised:
NextTo call the listed below APIs, authorisation as administrator is required.
The service user should be linked to the system organisation. System organisation is a technical entity which is created during system deployment.
By default, system organisation is only one, but if more than one system organisation was created anyone can be chosen to link service users.
- To view the list of organisations, use the POST /api/v1/organizations API endpoint to request the values then:
If you want to filter only the system organisations in the request, use the system type.
- To register a new service user with the API endpoint POST /api/v1/users send the next values:As a organizationId should be provided id from the previous response.
- To perform the self-registration, use the POST /registration API endpoint to request the values for the individual user:
or for the merchant user:
There can be the roles of the merchant and individual. Provide legalType for the merchant role and value it as individual. OTP to confirm registration is sent to the provided as login email or phone.
- To confirm self-registration, use POST /registration/confirm endpoint and send the next values: In response you will get the members.user.id and members.organization.id. When creating the password value, follow the next requirements:
-
One uppercase letter
-
One digit
-
One lowercase letter
-
At least 8 characters
-
One special character such as # $ ! @ * & %
-
If it is required – user or organisation id can be saved.
-
- To register a new customer use the POST /api/v1/users API endpoint, requesting the following values for merchant:
and for individual: You should save the next received values: user.id and user.members.organization.id. As with the self-registration case, there can be roles of merchant and individual for the user. legalType should be provided for merchant role and should be individual.
If it is required – user or organisation id can be saved, but it can be also received anytime using the following APIs.
- To view list of the users, use the POST /users/view endpoint and request the next values:
Doing a top-up, the customer performs a normal bank transfer to the special transit account with specifying in-system account identifier. These transfers are processed on the bank side manually or using bank integration and the requested account is topped up using SDK Cloud wallet APIs.
- To validate in-system account, use the POST/coins/validate endpoint and request the next values:
- To calculate the commission use POST /bank-top-ups/calculate endpoint and request: This step can be skipped if the commission is not set up in the system.
- To top-up the account use the POST /bank-top-ups/with-bank endpoint and request:
This use case flow with possible integrations:
Next- If you want to get the list of your accounts, use Get/coins endpoint. You will get the coinSerial value then.
- When you have the commission set up in the system, use the POST /bank-withdrawals/calculate endpoint to calculate the commissions.
- To create the withdrawal request, use POST /bank-withdrawals/with-bank endpoint. Request this values: Save the requestIdentifier response value then.
- To accept the request, use POST /bank-withdrawals/{requestIdentifier}/accept endpoint and request values by requestIdentifier.
- To decline the request, use POST /bank-withdrawals/{requestIdentifier}/decline and request requestIdentifier then.
The use case flow visualisation with possible integrations:
NextIn this case, any transit account should be specified for top-up in the system and using integrations with card payment provider payment card is debited.
If it is required, integration with the bank can be also built to perform transfer between transit accounts.
- To see the list of your accounts, use GET/coins and save the response value coinSerial.
- Calculate commission using POST /bank-top-ups/calculate endpoint. Request the values with: Save the requestIdentifier received value.
- Accept top-up request with POST/bank-top-ups/{requestIdentifier}/accept API endpoint and receive the requestIdentifier value then.
- Decline top-up request with POST/bank-top-ups/{requestIdentifier}/decline API endpoint, receiving the requestIdentifier value.
Use case visualisation with possible integrations:
NextIn this case, any transit account should be specified for withdrawal in the system and using integrations with card payment provider payment card is credited.
If it is required, integration with the bank can be also built to perform transfer between transit accounts or to perform settlement with the card payment provider.
- To see the list of your accounts, use GET/coins and save the response value coinSerial.
- Calculate commission using POST /bank-withdrawals/calculate endpoint. This step can be skipped if the commission is not set up in the system.
- To create the withdrawal request, use POST /bank-withdrawals/with-bank endpoint, requesting values: Save the requestIdentifier value then.
- Accept withdrawal request with POST /bank-withdrawals/{requestIdentifier}/accept API endpoint and receive the requestIdentifier value then.
- Decline withdrawal request with POST /bank-withdrawals/{requestIdentifier}/decline API endpoint, receiving the requestIdentifier value.
- Use case visualisation with possible integrations:
List of your accounts
GET /coins
List of saved accounts as destination
POST /templates/transfer/view
paymentToolType:”COIN”
Calculate commission for transfer from template
POST /templates/transfer/{transferTemplateId}/calculate
Perform transfer
POST templates/transfer/{transferTemplateId}/execute
Save from response: businessProcessId
Save transfer template after the operation
POST /templates/transfer/operation/{businessProcessId}
NextList of your cards
GET /smart-cards/my
List of saved cards as destination
POST /templates/transfer/view
aymentToolType:”SMART_CARD”
Calculate commission for transfer from template
POST /templates/transfer/{transferTemplateId}/calculate
Perform transfer
POST templates/transfer/{transferTemplateId}/execute
Save from response: businessProcessId
Save transfer template after the operation
POST /templates/transfer/operation/{businessProcessId}
NextThis use case can be built using integration with any payment provider. All accounting should be performed using the company’s bank account. Using SDK APIs accounting can be decoupled by customers’ virtual accounts.
Money should be withdrawn from user virtual account in the system to the company’s bank account from which further settlement with the provider can be performed.
- To see the list of your accounts, use GET/coins and save the response value coinSerial.
- Calculate commission using POST /bank-withdrawals/calculate endpoint.
- To create the withdrawal request use the POST /bank-withdrawals/with-bank endpoint. Request the values with:Save the requestIdentifier received value.
- Accept top-up request with POST /bank-withdrawals/{requestIdentifier}/accept API endpoint and receive the requestIdentifier value then.
- Decline top-up request with POST /bank-withdrawals/{requestIdentifier}/decline API endpoint, receiving the requestIdentifier value.
Use case visualisation with possible integrations:
NextAlong with integration with AML provider integration with any payment provider can be embedded before Accept/Decline top-up request. Accept or Decline can be chosen based on the 3rd party responses.
- To see the list of your accounts, use GET/coins and save the response value coinSerial.
- Calculate commission using POST /bank-top-ups/calculate endpoint. This step can be skipped if the commission is not set up in the system.
- To create the top-up request use the POST /bank-top-ups/create-request/with-bank endpoint. Request the values with:Save the requestIdentifier received value.
- Accept top-up request with POST/bank-top-ups/{requestIdentifier}/accept API endpoint and receive the requestIdentifier value then.
- Decline top-up request with POST/bank-top-ups/{requestIdentifier}/decline API endpoint, receiving the requestIdentifier value.
Use case visualisation with possible integrations:
NextAlong with integration with AML provider integration with any payment provider can be embedded before Accept/Decline withdrawal request. Accept or Decline can be chosen based on the 3rd party responses.
- To see the list of your accounts, use GET/coins and save the response value coinSerial.
- Calculate commission using POST /bank-withdrawals/calculate endpoint. This step can be skipped if the commission is not set up in the system.
- To create the withdrawal request, use POST /bank-withdrawals/with-bank endpoint, requesting values:Save the requestIdentifier value then.
- Accept request with POST /bank-withdrawals/{requestIdentifier}/accept API endpoint and receive the requestIdentifier value then.
- Decline request with POST /bank-withdrawals/{requestIdentifier}/decline API endpoint, receiving the requestIdentifier value.
- Use case visualisation with possible integrations: