NodeJS Library Reference
To get started with the library first install it in your local project using the following command:
npm i @dapi-co/dapi-node
BaseResponse
All the responses extend BaseResponse interface. Meaning all the responses described below in the document will have following parameters besides the ones described in appropriate response sections.
Parameter | Type | Description |
---|---|---|
operationID | String | Unique ID generated to identify a specific operation. |
success | Boolean | Returns true if request is successful and false for all else. |
status | Enum | The status of the job.done - Operation Completed failed - Operation Failed user_input_required - Pending User Input initialized - Operation In Progress*For further explanation see Operation Statuses |
userInputs | Array<UserInputs> | Specifies the type of further information required from the user before the job can be completed. Is only returned if operation status is `user_input_required |
type | Enum | Type of error encountered Is only returned when operation was not successful |
msg | String | Detailed description of the error Is only returned if the request was not successful |
Auth
auth.exchangeToken
Method is used to obtain user's permanent access token by exchanging it with access code received during the user authentication.
Note
You can read more about how to obtain a permanent token on Obtain an Access Token
Method Description
async exchangeToken(accessCode: string, connectionID: string): Promise<IExchangeTokenResponse>;
Input Parameters
Parameter | Type | Description |
---|---|---|
accessCode REQUIRED | String | Unique code for a user’s successful login to Connect. Returned in the response of UserLogin. |
connectionID REQUIRED | String | The connectionID from a user’s successful log in to Connect |
Response
Parameter | Type | Description |
---|---|---|
accessToken | String | A unique permanent token linked to the user. |
Data
data.getIdentity
Method is used to retrieve personal details about the user.
Method Description
async getIdentity(accessToken: string, userSecret: string, operationID?: string, userInputs?: IUserInputs[])
Input Parameters
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
operationID OPTIONAL | String | The operationID from a previous call's response. Required only when resuming a previous call that responded with user_input_required status, to provided user inputs. |
userInputs OPTIONAL | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
UserInputs Object
id | Enum | Type of input required. Can be one of the following:otp secret_question captcha pin confirmation token You can read more about user input types on User Input Types |
query | String | Textual description of what is required from the user side |
index | Number | Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer | String | User input that must be submitted. In the response it will always be empty. |
Response
Parameter | Type | Description |
---|---|---|
identity | Object<Identity> | An object containing the identity data of the user |
Identity Schema
Parameter | Type | Description |
---|---|---|
nationality | String | User's nationality as reported by the financial institution. |
dateOfBirth | Date | User's date (in YYYY-MM-DD format) of birth as reported by the financial institution. |
emailAddress | String | User's email address as reported by the financial institution. |
name | String | User's full name as reported by the financial institution. |
numbers | Array<PhoneNumbers> | Array of user's phone numbers as provided by the financial institution. |
identification | Array<Identification> | Array of user's identification information as provided by the bank. |
address | Object<Address> | Object containing user's address information. |
PhoneNumbers Schema
Parameter | Type | Description |
---|---|---|
type | Enum | The type of number.mobile home office fax |
value | String | The user's number as provided by the financial institution. |
Identification Schema
Parameter | Type | Description |
---|---|---|
type | Enum | Type of document.passport national_id visa_number |
value | String | User's document number as provided by the financial institution. |
Address Schema
Parameter | Type | Description |
---|---|---|
flat | String | User's flat as provided by the financial institution. |
building | String | User's building as provided by the financial institution. |
full | String | User's full address as provided by the financial institution. |
area | String | User's area as provided by the financial institution. |
poBox | String | User's PO box as provided by the financial institution. |
city | String | User's city as provided by the financial institution. |
state | String | User's state as provided by the financial institution. |
country | String | User's country as provided by the financial institution. |
data.getAccounts
Method is used to retrieve list of all the bank accounts registered on the user. The list will contain all types of bank accounts, including:
- Savings
- Credit
- Current....
Method Description
async getAccounts(accessToken: string, userSecret: string, operationID?: string, userInputs?: IUserInputs[])
Input Parameters
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
operationID OPTIONAL | String | The operationID from a previous call's response. Required only when resuming a previous call that responded with user_input_required status, to provided user inputs. |
userInputs OPTIONAL | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
UserInputs Object
id | Enum | Type of input required. Can be one of the following:otp secret_question captcha pin confirmation token You can read more about user input types on User Input Types |
query | String | Textual description of what is required from the user side |
index | Number | Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer | String | User input that must be submitted. In the response it will always be empty. |
Response
Account | Array | An array containing the accounts data of the user. Is only returned if request was successful |
Account Schema
Note
Routing Number object is only returned for USA banks. For all other banks it will not be provided
Parameter | Type | Description |
---|---|---|
iban | String | The account's IBAN number as provided by the financial institution. |
number | String | The account's number as provided by the financial institution. |
name | String | The account's name. |
isFavourite | Boolean | If the account is the user's favourite account. |
id | String | The account's unique identifier. |
currency | Object<Currency> | An object containing the account's currency information. |
routingNumbers | Array<rountingNumber> | An object containing accounts routing numbers information. Is only returned for US Bank Accounts |
type | Enum | The account type. - current - savings - loan - checking - credit - deposit - other |
Routing Numbers Schema
Parameter | Type | Description |
---|---|---|
type | Enum | Type of routing number provided. - wire - ach |
value | String | Routing number of the account |
Currency Schema
Parameter | Type | Description |
---|---|---|
code | String | The ISO 4217 code of the currency. |
name | String | The full name of the currency. |
data.getAccountBalance
Method is used to retrieve balance on specific bank account of the user
Method Description
async getAccountBalance(accessToken: string, userSecret: string, accountID: string, operationID?: string, userInputs?: IUserInputs[])
Input Parameters
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
accountID REQUIRED | String | Bank account ID which balance is requested |
operationID OPTIONAL | String | The operationID from a previous call's response. Required only when resuming a previous call that responded with user_input_required status, to provided user inputs. |
userInputs OPTIONAL | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
UserInputs Object
id | Enum | Type of input required. Can be one of the following:otp secret_question captcha pin confirmation token You can read more about user input types on User Input Types |
query | String | Textual description of what is required from the user side |
index | Number | Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer | String | User input that must be submitted. In the response it will always be empty. |
Response
Parameter | Type | Description |
---|---|---|
balance | Object< Balance > | Object containing the account's balance information. |
Balance Schema
Parameter | Type | Description |
---|---|---|
amount | Number | Current balance of requested account |
accountNumber | String | The account's number as provided by the financial institution. |
currency | Object<Currency> | An object containing the account's currency information. |
Currency Schema
Parameter | Type | Description |
---|---|---|
code | String | The ISO 4217 code of the currency. |
name | String | The full name of the currency. |
data.getAccountTransactions
Method is used to retrieve transactions that user has performed over a specific period of time from their bank account. The transaction list is unfiltered, meaning the response will contain all the transactions performed by the user (not just the transactions performed using your app).
Date range of the transactions that can be retrieved varies for each bank. The range supported by the users bank is shown in the response parameter transactionRange
of Get Accounts Metadata
endpoint.
Method Description
async getAccountTransactions(accessToken: string, userSecret: string, accountID: string, fromDate: Date, toDate: Date, operationID?: string, userInputs?: IUserInputs[])
Input Parameters
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
accountID REQUIRED | String | Bank account ID which balance is requested |
fromDate REQUIRED | Date | Date to start transactions from. Format as “YYYY-MM-DD”. |
toDate REQUIRED | Date | Date to end transactions on. Format as “YYYY-MM-DD”. |
operationID OPTIONAL | String | The operationID from a previous call's response. Required only when resuming a previous call that responded with user_input_required status, to provided user inputs. |
userInputs OPTIONAL | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
UserInputs Object
id | Enum | Type of input required. Can be one of the following:otp secret_question captcha pin confirmation token You can read more about user input types on User Input Types |
query | String | Textual description of what is required from the user side |
index | Number | Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer | String | User input that must be submitted. In the response it will always be empty. |
Response
transactions | Array<Transaction> | Array containing the transactional data for the specified period. |
Transaction schema
Parameter | Type | Description |
---|---|---|
afterAmount | Number | Account balance after this transaction was executed. |
beforeAmount | Number | Account balance before the transaction was executed. |
amount | Number | Transaction amount. |
date | Date | Transaction timestamp as provided by the financial institution (in the financial institution's timezone). |
description | String | Transaction description as provided by the financial institution. |
details | String | Any extra details provided by the financial institution. |
type | Enum | Specifies if the transaction is debit or credit. - debit -credit |
currency | Object<Currency> | Object containing the transaction's currency information. |
Currency schema
Parameter | Type | Description |
---|---|---|
code | String | ISO 4217 code of the currency. |
name | String | Currency's full name. |
data.getCategorizedAccountTransactions
Method is used to retrieve transactions that user has performed over a specific period of time from their bank account. The transaction list is unfiltered, meaning the response will contain all the transactions performed by the user (not just the transactions performed using your app).
Every transaction in the response is categorized. Transaction categories stay the same across all banks.
Date range of the transactions that can be retrieved varies for each bank. The range supported by the users bank is shown in the response parameter transactionRange
of Get Accounts Metadata
endpoint.
Method Description
async getCategorizedAccountTransactions(accessToken: string, userSecret: string, accountID: string, fromDate: Date, toDate: Date, operationID?: string, userInputs?: IUserInputs[])
Input Parameters
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
accountID REQUIRED | String | Bank account ID which balance is requested |
fromDate REQUIRED | Date | Date to start transactions from. Format as “YYYY-MM-DD”. |
toDate REQUIRED | Date | Date to end transactions on. Format as “YYYY-MM-DD”. |
operationID OPTIONAL | String | The operationID from a previous call's response. Required only when resuming a previous call that responded with user_input_required status, to provided user inputs. |
userInputs OPTIONAL | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
UserInputs Object
id | Enum | Type of input required. Can be one of the following:otp secret_question captcha pin confirmation token You can read more about user input types on User Input Types |
query | String | Textual description of what is required from the user side |
index | Number | Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer | String | User input that must be submitted. In the response it will always be empty. |
Response
transactions | Array<CategorizedTransaction> | Array containing the transactional data for the specified period, plus category data. |
CategorizedTransaction schema
Parameter | Type | Description |
---|---|---|
afterAmount | Number | Account balance after this transaction was executed. |
beforeAmount | Number | Account balance before the transaction was executed. |
amount | Number | Transaction amount. |
date | Date | Transaction timestamp as provided by the financial institution (in the financial institution's timezone). |
description | String | Transaction description as provided by the financial institution. |
details | String | Any extra details provided by the financial institution. |
type | Enum | Specifies if the transaction is debit or credit. - debit -credit |
category | String | Category for the specific transaction. All transaction categories |
currency | Object<Currency> | Object containing the transaction's currency information. |
Currency schema
Parameter | Type | Description |
---|---|---|
code | String | ISO 4217 code of the currency. |
name | String | Currency's full name. |
data.getEnrichedAccountTransactions
Method is used to retrieve transactions that user has performed over a specific period of time from their bank account. The transaction list is unfiltered, meaning the response will contain all the transactions performed by the user (not just the transactions performed using your app).
Every transaction in the response is categorized and has further details about the brand that the transfer is associated with. Transaction categories stay the same across all banks.
Date range of the transactions that can be retrieved varies for each bank. The range supported by the users bank is shown in the response parameter transactionRange
of Get Accounts Metadata
endpoint.
Method Description
async getEnrichedAccountTransactions(accessToken: string, userSecret: string, accountID: string, fromDate: Date, toDate: Date, operationID?: string, userInputs?: IUserInputs[])
Input Parameters
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
accountID REQUIRED | String | Bank account ID which balance is requested |
fromDate REQUIRED | Date | Date to start transactions from. Format as “YYYY-MM-DD”. |
toDate REQUIRED | Date | Date to end transactions on. Format as “YYYY-MM-DD”. |
operationID OPTIONAL | String | The operationID from a previous call's response. Required only when resuming a previous call that responded with user_input_required status, to provided user inputs. |
userInputs OPTIONAL | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
UserInputs Object
id | Enum | Type of input required. Can be one of the following:otp secret_question captcha pin confirmation token You can read more about user input types on User Input Types |
query | String | Textual description of what is required from the user side |
index | Number | Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer | String | User input that must be submitted. In the response it will always be empty. |
Response
transactions | Array<EnrichedTransaction> | Array containing the transactional data for the specified period, plus brand details. |
Transaction schema
Parameter | Type | Description |
---|---|---|
afterAmount | Number | Account balance after this transaction was executed. |
beforeAmount | Number | Account balance before the transaction was executed. |
amount | Number | Transaction amount. |
date | Date | Transaction timestamp as provided by the financial institution (in the financial institution's timezone). |
description | String | Transaction description as provided by the financial institution. |
details | String | Any extra details provided by the financial institution. |
type | Enum | Specifies if the transaction is debit or credit. - debit -credit |
category | String | Category for the specific transaction. All transaction categories |
brandDetails | Object<BrandDetails> | Object containing information about the brand. |
currency | Object<Currency> | Object containing the transaction's currency information. |
BrandDetails schema
Parameter | Type | Description |
---|---|---|
logo | String | URL hosting the logo for the particular brand |
name | String | Official brand name |
Currency schema
Parameter | Type | Description |
---|---|---|
code | String | ISO 4217 code of the currency. |
name | String | Currency's full name. |
data.getCards
Method is used to retrieve list of all the cards registered on the user.
Method Description
async getCards(accessToken: string, userSecret: string, operationID?: string, userInputs?: IUserInputs[])
Input Parameters
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
operationID OPTIONAL | String | The operationID from a previous call's response. Required only when resuming a previous call that responded with user_input_required status, to provided user inputs. |
userInputs OPTIONAL | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
UserInputs Object
id | Enum | Type of input required. Can be one of the following:otp secret_question captcha pin confirmation token You can read more about user input types on User Input Types |
query | String | Textual description of what is required from the user side |
index | Number | Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer | String | User input that must be submitted. In the response it will always be empty. |
Response
Cards | Array | An array containing the cards data of the user. Is only returned if request was successful |
Card Schema
Parameter | Type | Description |
---|---|---|
cardNumber | String | The card's number as provided by the financial institution. |
creditLimit | Number | The account's number as provided by the financial institution. |
name | String | The account's name. |
id | String | The account's unique identifier. |
currency | Object<Currency> | An object containing the account's currency information. |
type | Credit | The account type. - credit |
expiryDate | Date | The expiry date of the card |
status | Enum | The card status: - blocked - active - disabled |
Currency Schema
Parameter | Type | Description |
---|---|---|
code | String | The ISO 4217 code of the currency. |
name | String | The full name of the currency. |
data.getCardBalance
Method is used to retrieve balance on specific card of the user.
Method Description
async getCardBalance(accessToken: string, userSecret: string, cardID: string, operationID?: string, userInputs?: IUserInputs[])
Input Parameters
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
cardID REQUIRED | String | Card ID of the card that the balance is requested for. |
operationID OPTIONAL | String | The operationID from a previous call's response. Required only when resuming a previous call that responded with user_input_required status, to provided user inputs. |
userInputs OPTIONAL | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
UserInputs Object
id | Enum | Type of input required. Can be one of the following:otp secret_question captcha pin confirmation token You can read more about user input types on User Input Types |
query | String | Textual description of what is required from the user side |
index | Number | Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer | String | User input that must be submitted. In the response it will always be empty. |
Response
Parameter | Type | Description |
---|---|---|
balance | Object< Balance > | Object containing the account's balance information. |
Balance Schema
Parameter | Type | Description |
---|---|---|
amount | Number | Current balance of requested account |
accountNumber | String | The account's number as provided by the financial institution. |
currency | Object<Currency> | An object containing the account's currency information. |
Currency Schema
Parameter | Type | Description |
---|---|---|
code | String | The ISO 4217 code of the currency. |
name | String | The full name of the currency. |
data. getCardTransactions
Method is used to retrieve transactions that user has performed over a specific period of time from their bank account. The transaction list is unfiltered, meaning the response will contain all the transactions performed by the user (not just the transactions performed using your app).
Method Description
async getCardTransactions(accessToken: string, userSecret: string, cardID: string, fromDate: Date, toDate: Date, operationID?: string, userInputs?: IUserInputs[])
Input Parameters
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
cardID REQUIRED | String | Card ID of the card that the transactions are requested for. |
fromDate REQUIRED | Date | Date to start transactions from. Format as “YYYY-MM-DD”. |
toDate REQUIRED | Date | Date to end transactions on. Format as “YYYY-MM-DD”. |
operationID OPTIONAL | String | The operationID from a previous call's response. Required only when resuming a previous call that responded with user_input_required status, to provided user inputs. |
userInputs OPTIONAL | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
UserInputs Object
id | Enum | Type of input required. Can be one of the following:otp secret_question captcha pin confirmation token You can read more about user input types on User Input Types |
query | String | Textual description of what is required from the user side |
index | Number | Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer | String | User input that must be submitted. In the response it will always be empty. |
Response
transactions | Array<Transaction> | Array containing the transactional data for the specified period. |
Transaction schema
Parameter | Type | Description |
---|---|---|
afterAmount | Number | Account balance after this transaction was executed. |
beforeAmount | Number | Account balance before the transaction was executed. |
amount | Number | Transaction amount. |
date | Date | Transaction timestamp as provided by the financial institution (in the financial institution's timezone). |
description | String | Transaction description as provided by the financial institution. |
details | String | Any extra details provided by the financial institution. |
type | Enum | Specifies if the transaction is debit or credit. - debit -credit |
currency | Object<Currency> | Object containing the transaction's currency information. |
Currency schema
Parameter | Type | Description |
---|---|---|
code | String | ISO 4217 code of the currency. |
name | String | Currency's full name. |
Payment
payment.getBeneficiaries
Method is used to retrieve list of all the beneficiaries already added for a user within a financial institution.
Method Description
async getBeneficiaries(accessToken: string, userSecret: string, operationID?: string, userInputs?: IUserInputs[])
Input Parameters
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
operationID OPTIONAL | String | The operationID from a previous call's response. Required only when resuming a previous call that responded with user_input_required status, to provided user inputs. |
userInputs OPTIONAL | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
UserInputs Object
id | Enum | Type of input required. Can be one of the following:otp secret_question captcha pin confirmation token You can read more about user input types on User Input Types |
query | String | Textual description of what is required from the user side |
index | Number | Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer | String | User input that must be submitted. In the response it will always be empty. |
Response
Parameter | Type | Description |
---|---|---|
beneficiaries | Array<Beneficiaries> | Returns beneficiary information per beneficiary, such as their name, iban, account number, type, and ID. Is only returned if request was successful |
Beneficiaries schema
Parameter | Type | Description |
---|---|---|
name | String | Beneficiary's name. |
iban | String | Beneficiary's IBAN. *Is returned if accountNumber is null |
accountNumber | String | Beneficiary's account number.Is returned if iban` is null |
status | Enum | Status of beneficiary with the financial institution.approved rejected cancelled waiting_for_confirmation modified_for_pending_approval For further explanation see Beneficiary Statuses |
type | Enum | Type of beneficiarysame local intl |
id | String | Beneficiary's unique identifier. |
payment.createBeneficiary
Method is used to add a new beneficiary to enable transfers from the user's account to the beneficiary's.
Method Description
async createBeneficiary(beneficiary: ICBBeneficiary, accessToken: string, userSecret: string, operationID?: string, userInputs?: IUserInputs[])
Input Parameters
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
beneficiary REQUIRED | Object<Beneficiary> | Beneficiary object that should be added |
operationID OPTIONAL | String | |
userInputs OPTIONAL | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
UserInputs Object
id | Enum | Type of input required. Can be one of the following:otp secret_question captcha pin confirmation token You can read more about user input types on User Input Types |
query | String | Textual description of what is required from the user side |
index | Number | Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer | String | User input that must be submitted. In the response it will always be empty. |
Beneficiary Schema
Parameter | Type | Description |
---|---|---|
name REQUIRED | String | Name of the beneficiary. |
nickname REQUIRED | String | Nickname of the beneficiary. |
accountNumber REQUIRED | String | Account number of the beneficiary. |
type REQUIRED | Enum | Type of beneficiary. - same - beneficiary's bank is the same as the sender's - local - beneficiary's bank is in the same country>br>- intl - beneficiary's bank is in a different countryFor further explanation see Beneficiary Types |
address REQUIRED | Object<Address> | An object containing the address information of the beneficiary. |
country REQUIRED | String | Name of the country in all uppercase letters (e.g. “UNITED ARAB EMIRATES”). |
sortCode OPTIONAL | String | Financial institution’s sort code. |
branchAddress REQUIRED | String | Address of the financial institution’s specific branch. |
branchName REQUIRED | String | Name of the financial institution’s specific branch. |
phoneNumber REQUIRED | String | Beneficiary's phone number. |
iban REQUIRED | String | Beneficiary's IBAN number. |
swiftCode REQUIRED | String | Beneficiary's financial institution's SWIFT code. |
addresses OPTIONAL | Array<String> | Specify which webhook URL(s) defined in app settings to send data to. If empty, an update will be sent to all defined webhook URL(s). |
Address schema
Parameter | Type | Description |
---|---|---|
line1 REQUIRED | String | Street name and number. Note: value should not contain any commas or special characters. |
line2 REQUIRED | String | City name. Note: value should not contain any commas or special characters. |
line3 REQUIRED | String | Country name. Note: value should not contain any commas or special characters. |
Response
Method returns standard Base Response
. You can find description of standard response in the beginning of the document.
payment.createTransfer
Method is used to initiate a new payment from one account to another account.
Important
We suggest you use Transfer Auto Flow method instead to initiate a payment. Auto Flow abstracts all the validations and processing logic, required to initiate a transaction using
createTransfer
method.You can read about
transferAutoFlow
further in the document.
Method Description
async createTransfer(transfer: ITransfer, accessToken: string, userSecret: string, operationID?: string, userInputs?: IUserInputs[])
Input Parameters
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
transfer REQUIRED | Object<Transfer> | Transfer object containing details of the transaction |
operationID OPTIONAL | String | The operationID from a previous call's response. Required only when resuming a previous call that responded with user_input_required status, to provided user inputs. |
userInputs *OPTIONAL** | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
UserInputs Object
id | Enum | Type of input required. Can be one of the following:otp secret_question captcha pin confirmation token You can read more about user input types on User Input Types |
query | String | Textual description of what is required from the user side |
index | Number | Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer | String | User input that must be submitted. In the response it will always be empty. |
Transfer Schema
Parameter | Type | Description |
---|---|---|
receiverID REQUIRED | String | An identifier for the beneficiary that will receive the money. Obtained from the Get Beneficiaries endpoint. Must be specified if the bank requires receiver to be registered as beneficiary to perform a transaction |
amount REQUIRED | Number | Amount of money to be sent. Must be number rounded to up to 2 decimal points. |
senderID REQUIRED | String | An identifier for the bank account the user will send money from. Obtained from the Account - GetAccounts endpoint. |
accountNumber OPTIONAL | String | Account number where the transfer must be performed |
name OPTIONAL | String | Name of the amount receiver |
iban OPTIONAL | String | iban account where the transfer must be performed |
Response
Name | Type | Description |
---|---|---|
reference | String | Transaction reference number returned by the bank |
payment.transferAutoFlow
Method is used to initiate a new payment from one account to another account, without having to care nor handle any special cases or scenarios.
Method Description
async transferAutoFlow(transfer: ITransferAutoflow, accessToken: string, userSecret: string, operationID?: string, userInputs?: IUserInputs[])
Input Parameters
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
transfer REQUIRED | Object<TransferAutoFlow> | TransferAutoFlow object containing details of the transaction |
operationID OPTIONAL | String | The operationID from a previous call's response. Required only when resuming a previous call that responded with user_input_required status, to provided user inputs. |
userInputs OPTIONAL | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
UserInputs Object
id | Enum | Type of input required. Can be one of the following:otp secret_question captcha pin confirmation token You can read more about user input types on User Input Types |
query | String | Textual description of what is required from the user side |
index | Number | Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer | String | User input that must be submitted. In the response it will always be empty. |
Transfer Schema
Parameter | Type | Description |
---|---|---|
amount REQUIRED | Number | Amount of money to be sent. Must be number rounded to up to 2 decimal points. |
senderID REQUIRED | String | An identifier for the bank account the user will send money from. Obtained from the Account - GetAccounts endpoint. |
beneficiary REQUIRED | Object<Beneficiary> | Beneficiary object containing details where the transaction should be transfered |
Beneficiary Schema
Parameter | Type | Description |
---|---|---|
name REQUIRED | String | Name of the beneficiary. |
nickname REQUIRED | String | Nickname of the beneficiary. |
accountNumber REQUIRED | String | Account number of the beneficiary. |
address REQUIRED | Object<Address> | An object containing the address information of the beneficiary. |
country REQUIRED | String | Name of the country in all uppercase letters (e.g. “UNITED ARAB EMIRATES”). |
branchAddress REQUIRED | String | Address of the financial institution’s specific branch. |
branchName REQUIRED | String | Name of the financial institution’s specific branch. |
phoneNumber REQUIRED | String | Beneficiary's phone number. |
iban REQUIRED | String | Beneficiary's IBAN number. |
swiftCode REQUIRED | String | Beneficiary's financial institution's SWIFT code. |
addresses OPTIONAL | Array<String> | Specify which webhook URL(s) defined in app settings to send data to. If empty, an update will be sent to all defined webhook URL(s). |
Address schema
Parameter | Type | Description |
---|---|---|
line1 REQUIRED | String | Street name and number. Note: value should not contain any commas or special characters. |
line2 REQUIRED | String | City name. Note: value should not contain any commas or special characters. |
line3 REQUIRED | String | Country name. Note: value should not contain any commas or special characters. |
Response
Name | Type | Description |
---|---|---|
reference | String | Transaction reference number returned by the bank |
ACH
ach.createPull
Method is used to create an ACH Pull transaction
Method Description
async createPull(accessToken: string, userSecret: string, transfer: IAchPull, operationID?: string, userInputs?: IUserInputs[])
Input Parameters
Name | Type | Description |
---|---|---|
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
transfer REQUIRED | Object<Transfer> | Details of the ACH transfer |
operationID OPTIONAL | String | The operationID from a previous call's response. Required only when resuming a previous call that responded with user_input_required status, to provided user inputs. |
userInputs OPTIONAL | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
Transfer Object
Name | Type | Description |
---|---|---|
senderId | String | senderId of the Account from where the amount must be transferred. |
amount | Number | Amount of the transfer |
description | String | A message associated with the transfer. |
UserInputs Object
Name | Type | Description |
---|---|---|
id | Enum | Type of input required. Can be one of the following:otp secret_question captcha pin confirmation token You can read more about user input types on User Input Types |
query | String | Textual description of what is required from the user side |
index | Number | Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer | String | User input that must be submitted. In the response it will always be empty. |
Response
Method returns standard Base Response. You can find description of standard response in the beginning of the document.
ach.getPull
Method is used to get an existing ACH Pull transaction
Method Description
async getPull(accessToken: string, userSecret: string, operationID: string, userInputs?: IUserInputs[])
Input Parameters
Name | Type | Description |
---|---|---|
accessToken REQUIRED | String | Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret REQUIRED | String | User secret returned during the successful authentication in Connect Layer |
operationID REQUIRED | String | The operationID from a previous call's response. Used to locate the ACH transaction. |
userInputs OPTIONAL | Array<userInputs> | Array of UserInputs object, required only if initial request responded with user inputs specification. You can read more about user inputs specification on Specify User Input |
Response
Name | Type | Description |
---|---|---|
transfer | Object<Transfer> | Details of the ACH transfer |
Transfer Object
Name | Type | Description |
---|---|---|
status | String | Status of the transfer (ENUM: 'pending', 'completed', 'returned', 'rejected') |
amount | Number | Amount of the transfer |
currency | Object<Currency> | Currency type of the transfer |
Currency Object
Name | Type | Description |
---|---|---|
Code | String | Currency code |
Name | String | Full name of the Currency |
Updated 10 months ago