Go Library Reference

BaseResponse

All the responses extend BaseResponse class. Meaning all the responses described below in the document will have following fields besides the ones specific to each response.

ParameterTypeDescription
operationIDstringUnique ID generated to identify a specific operation.
successBoolReturns true if request is successful and false otherwise.
statusAPIStatus
(Enum)
The status of the job.

done - Operation Completed.
failed - Operation Failed.
user_input_required - Pending User Input.
initialized - Operation In Progress.
userInputs[]UserInputSpecifies the type of further information required from the user before the job can be completed.

Note: It's only returned if operation status is user_input_required
typestringType of error encountered.
Note: It's only returned if operation status is failed.
msgstringDetailed description of the error.

Note: It's only returned if operation status is failed.

UserInput Object

ParameterTypeDescription
idUserInputID
(Enum)
Type of input required.

You can read more about user input types on User Input Types.
querystringTextual description of what is required from the user side.
indexintIs used in case more than one user input is requested.
Will always be 0 If only one input is requested.
answerstringUser input that must be submitted. In the response it will always be empty.

Methods

Auth.ExchangeToken

Method is used to obtain user's permanent access token by exchanging it with access code received during the user authentication (user login).

📘

Note

You can read more about how to obtain a permanent token on Obtain an Access Token..

Method Description

func (*Auth) ExchangeToken(accessCode string, connectionID string) (*response.ExchangeTokenResponse, error)

Input Parameters

ParameterTypeDescription
accessCode
REQUIRED
stringUnique code for a user’s successful login to Connect. Returned in the response of UserLogin.
connectionID
REQUIRED
stringThe connectionIDz from a user’s successful log in to Connect`.

Response
In addition to the fields described in the BaseResponse, it has the following fields, which will only be returned if the status is done:

ParameterTypeDescription
accessTokenstringA unique permanent token linked to the user.

Data.GetIdentity

This method is used to retrieve personal details about the user.
Method Description

func (*Data) GetIdentity(accessToken string, userSecret string, userInputs []response.UserInput, operationID string) (*response.IdentityResponse, error)

Method Description

ParameterTypeDescription
accessToken
REQUIRED
stringAccess Token obtained using the exchangeToken method.
userSecret
REQUIRED
stringThe userSecret from a user’s successful log in to Connect.
operationID
OPTIONAL
stringThe 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
[]UserInputArray of UserInput object, that are needed to complete this operation.
Required only if a previous call responded with user_input_required status.

You can read more about user inputs specification onSpecify User Input

UserInput Object

ParameterTypeDescription
idUserInputID
(Enum)
Type of input required.

You can read more about user input types on User Input Types.
indexintIs used in case more than one user input is requested.
Will always be 0 If only one input is requested.
answerStringUser input that must be submitted. In the response it will always be empty.

Response
In addition to the fields described in the BaseResponse, it has the following fields, which will only be returned if the status is done:

ParameterTypeDescription
identityIdentityAn object containing the identity data of the user.

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.

Method Description

func (*Data) GetAccounts(accessToken string, userSecret string, userInputs []response.UserInput, operationID string) (*response.AccountsResponse, error)

Input Parameters

ParameterTypeDescription
accessToken
REQUIRED
stringAccess Token obtained using the exchangeToken method.
userSecret
REQUIRED
stringThe userSecret from a user’s successful log in to Connect.
operationID
REQUIRED
stringThe 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[]UserInputArray of UserInput object, that are needed to complete this operation.
Required only if a previous call responded with user_input_required status.

You can read more about user inputs specification on Specify User Input

UserInput Object

ParameterTypeDescription
idUserInputID
(Enum)
Type of input required.

You can read more about user input types on User Input Types.
indexintIs used in case more than one user input is requested.
Will always be 0 If only one input is requested.
answerStringUser input that must be submitted. In the response it will always be empty.

Response
In addition to the fields described in the BaseResponse, it has the following fields, which will only be returned if the status is done:

ParameterTypeDescription
accountsAccount[]An array containing the accounts data of the user.

Data.GetBalance

This method is used to retrieve balance on specific bank account of the user.

Method Description

func (*Data) GetBalance(accessToken string, userSecret string, accountID string, userInputs []response.UserInput, operationID string) (*response.BalanceResponse, error)

Input Parameters

ParameterTypeDescription
accountID
REQUIRED
StringThe bank account ID which its balance is requested.
Retrieved from one of the accounts returned from the getAccounts method.
accessToken
REQUIRED
StringAccess Token obtained using the exchangeToken method.
userSecret
REQUIRED
StringThe userSecret from a user’s successful log in to Connect.
operationID
OPTIONAL
StringThe 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
[]UserInputArray of UserInput object, that are needed to complete this operation.
Required only if a previous call responded with user_input_required status.

You can read more about user inputs specification on Specify User Input

UserInput Object

ParameterTypeDescription
idUserInputID
(Enum)
Type of input required.

You can read more about user input types on User Input Types.
indexintIs used in case more than one user input is requested.
Will always be 0 If only one input is requested.
answerStringUser input that must be submitted. In the response it will always be empty.

Response
In addition to the fields described in the BaseResponse, it has the following fields, which will only be valid if the status is done:

ParameterTypeDescription
balanceBalanceAn object containing the account's balance information.

Data.GetTransactions

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

func (*Data) GetTransactions(accessToken string, userSecret string, accountID string, fromDate time.Time, toDate time.Time, userInputs []response.UserInput, operationID string) (*response.TransactionsResponse, error)

Input Parameters

ParameterTypeDescription
accountID
REQUIRED
StringThe bank account ID which its transactions are requested.
Retrieved from one of the accounts returned from the getAccounts method.
fromDate
REQUIRED
LocalDateThe start date of the transactions wanted.
toDate
REQUIRED
LocalDateThe end date of the transactions wanted.
accessToken
REQUIRED
StringAccess Token obtained using the exchangeToken method.
userSecret
REQUIRED
StringThe userSecret from a user’s successful log in to Connect.
operationID
OPTIONAL
StringThe 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
UserInput[]Array of UserInput object, that are needed to complete this operation.
Required only if a previous call responded with user_input_required status.

You can read more about user inputs specification on Specify User Input

UserInput Object

ParameterTypeDescription
idUserInputID
(Enum)
Type of input required.

You can read more about user input types on User Input Types.
indexintIs used in case more than one user input is requested.
Will always be 0 If only one input is requested.
answerStringUser input that must be submitted. In the response it will always be empty.

Response
In addition to the fields described in the BaseResponse, it has the following fields, which will only be valid if the status is done:

ParameterTypeDescription
transactionsTransaction[]Array containing the transactional data for the specified account within the specified period.

Data.GetCategorizedTransactions

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

func (*Data) GetCategorizedTransactions(accessToken string, userSecret string, accountID string, fromDate time.Time, toDate time.Time, userInputs []response.UserInput, operationID string) (*response.CategorizedTransactionsResponse, error)

Input Parameters

ParameterTypeDescription
accountID
REQUIRED
StringThe bank account ID which its transactions are requested.
Retrieved from one of the accounts returned from the getAccounts method.
fromDate
REQUIRED
LocalDateThe start date of the transactions wanted.
toDate
REQUIRED
LocalDateThe end date of the transactions wanted.
accessToken
REQUIRED
StringAccess Token obtained using the exchangeToken method.
userSecret
REQUIRED
StringThe userSecret from a user’s successful log in to Connect.
operationID
OPTIONAL
StringThe 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
UserInput[]Array of UserInput object, that are needed to complete this operation.
Required only if a previous call responded with user_input_required status.

You can read more about user inputs specification on Specify User Input

UserInput Object

ParameterTypeDescription
idUserInputID
(Enum)
Type of input required.

You can read more about user input types on User Input Types.
indexintIs used in case more than one user input is requested.
Will always be 0 If only one input is requested.
answerStringUser input that must be submitted. In the response it will always be empty.

Response
In addition to the fields described in the BaseResponse, it has the following fields, which will only be valid if the status is done:

ParameterTypeDescription
transactionsCategorizedTransaction[]Array containing the transactional data for the specified account within the specified period, plus category of each transaction.

Data.GetEnrichedTransactions

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

func (*Data) GetEnrichedTransactions(accessToken string, userSecret string, accountID string, fromDate time.Time, toDate time.Time, userInputs []response.UserInput, operationID string) (*response.EnrichedTransactionsResponse, error)

Input Parameters

ParameterTypeDescription
accountID
REQUIRED
StringThe bank account ID which its transactions are requested.
Retrieved from one of the accounts returned from the getAccounts method.
fromDate
REQUIRED
LocalDateThe start date of the transactions wanted.
toDate
REQUIRED
LocalDateThe end date of the transactions wanted.
accessToken
REQUIRED
StringAccess Token obtained using the exchangeToken method.
userSecret
REQUIRED
StringThe userSecret from a user’s successful log in to Connect.
operationID
OPTIONAL
StringThe 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
UserInput[]Array of UserInput object, that are needed to complete this operation.
Required only if a previous call responded with user_input_required status.

You can read more about user inputs specification on Specify User Input

UserInput Object

ParameterTypeDescription
idUserInputID
(Enum)
Type of input required.

You can read more about user input types on User Input Types.
indexintIs used in case more than one user input is requested.
Will always be 0 If only one input is requested.
answerStringUser input that must be submitted. In the response it will always be empty.

Response
In addition to the fields described in the BaseResponse, it has the following fields, which will only be valid if the status is done:

ParameterTypeDescription
transactionsEnrichedTransaction[]Array containing the transactional data for the specified account within the specified period, plus brand details (logo, name) of each transaction.

Payment.GetBeneficiaries

This method is used to retrieve a list of all the beneficiaries already added for a user within a financial institution.
Method Description

func (*Payment) GetBeneficiaries(accessToken string, userSecret string, userInputs []response.UserInput, operationID string) (*response.BeneficiariesResponse, error)

Input Parameters

ParameterTypeDescription
accessToken
REQUIRED
StringAccess Token obtained using the exchangeToken method.
userSecret
REQUIRED
StringThe userSecret from a user’s successful log in to Connect.
operationID
OPTIONAL
StringThe 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
[]UserInputArray of UserInput object, that are needed to complete this operation.
Required only if a previous call responded with user_input_required status.

You can read more about user inputs specification on Specify User Input

UserInput Object

ParameterTypeDescription
idUserInputID
(Enum)
Type of input required.

You can read more about user input types on User Input Types.
indexintIs used in case more than one user input is requested.
Will always be 0 If only one input is requested.
answerStringUser input that must be submitted. In the response it will always be empty.

Response
In addition to the fields described in the BaseResponse, it has the following fields, which will only be returned if the status is done:

ParameterTypeDescription
beneficiaries[]BeneficiaryAn array containing the beneficiary information.

Payment.CreateBeneficiary

This method is used to retrieve a list of all the beneficiaries already added for a user within a financial institution.
Method Description

func (*Payment) CreateBeneficiary(accessToken string, userSecret string, beneficiary request.CreateBeneficiaryInfo, userInputs []response.UserInput, operationID string) (*response.BaseResponse, error)

Input Parameters

ParameterTypeDescription
beneficiary
REQUIRED
request.CreateBeneficiaryInfoAn object that contains info about the beneficiary that should be added.
accessToken
REQUIRED
StringAccess Token obtained using the exchangeToken method.
userSecret
REQUIRED
StringThe userSecret from a user’s successful log in to Connect.
operationID
OPTIONAL
StringThe 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
[]UserInputArray of UserInput object, that are needed to complete this operation.
Required only if a previous call responded with user_input_required status.

You can read more about user inputs specification on Specify User Input

UserInput Object

ParameterTypeDescription
idUserInputID
(Enum)
Type of input required.

You can read more about user input types on User Input Types.
indexintIs used in case more than one user input is requested.
Will always be 0 If only one input is requested.
answerStringUser input that must be submitted. In the response it will always be empty.

request.CreateBeneficiaryInfo Object

ParameterTypeDescription
name
REQUIRED
stringName of the beneficiary.
nickname
REQUIRED
stringNickname of the beneficiary.
accountNumber
REQUIRED
stringAccount number of the beneficiary.
iban
REQUIRED
stringBeneficiary's IBAN number.
swiftCode
REQUIRED
stringBeneficiary's financial institution's SWIFT code.
type
REQUIRED
response.BeneficiaryType (Enum)Type of beneficiary.
For further explanation see Beneficiary Types.
address
REQUIRED
response.BeneficiaryAddressAn object containing the address information of the beneficiary.
country
REQUIRED
stringName of the country in all uppercase letters.
branchAddress
REQUIRED
stringAddress of the financial institution’s specific branch.
branchName
REQUIRED
stringName of the financial institution’s specific branch.
phoneNumber
OPTIONAL
stringBeneficiary's phone number.
routingNumber
OPTIONAL
stringBeneficiary's Routing number, needed only for US banks accounts.

address Object

ParameterTypeDescription
line1
REQUIRED
stringStreet name and number. Note: value should not contain any commas or special characters.
line2
REQUIRED
stringCity name. Note: value should not contain any commas or special characters.
line3
REQUIRED
stringCountry name. Note: value should not contain any commas or special characters.

Response
Method returns only the fields defined in the BaseResponse.

Payment.CreateTransfer

This method is used to initiate a new payment from one account to another account.

🚧

Note

We suggest you use transferAutoflow method instead to initiate a payment. transferAutoflow 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

func (*Payment) CreateTransfer(accessToken string, userSecret string, transfer CreateTransfer, userInputs []response.UserInput, operationID string) (*response.TransferResponse, error)

Input Parameters

ParameterTypeDescription
transfer
REQUIRED
CreateTransferAn object that contains info about the transfer that should be initiated, and any other details that's used to automate the operation.
accessToken
REQUIRED
StringAccess Token obtained using the exchangeToken method.
userSecret
REQUIRED
StringThe userSecret from a user’s successful log in to Connect.
operationID
OPTIONAL
StringThe 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
[]UserInputArray of UserInput object, that are needed to complete this operation.
Required only if a previous call responded with user_input_required status.

You can read more about user inputs specification on Specify User Input

UserInput Object

ParameterTypeDescription
idUserInputID
(Enum)
Type of input required.

You can read more about user input types on User Input Types.
indexintIs used in case more than one user input is requested.
Will always be 0 If only one input is requested.
answerStringUser input that must be submitted. In the response it will always be empty.

CreateTransfer Object

ParameterTypeDescription
senderID
REQUIRED
StringThe id of the account which the money should be sent from.
Retrieved from one of the accounts array returned from the getAccounts method.
amount
REQUIRED
float64The amount of money which should be sent.
receiverID
OPTIONAL
StringThe id of the beneficiary which the money should be sent to.
Retrieved from one of the beneficiaries array returned from the getBeneficiaries method.
Needed only when creating a transfer from a bank that requires the receiver to be already registered as a beneficiary to perform a transaction.
name
OPTIONAL
StringThe name of receiver.
Needed only when creating a transfer from a bank that handles the creation of beneficiaries on its own, internally, and doesn't require the receiver to be already registered as a beneficiary to perform a transaction.
accountNumber
OPTIONAL
StringThe Account Number of the receiver's account.
Needed only when creating a transfer from a bank that handles the creation of beneficiaries on its own, internally, and doesn't require the receiver to be already registered as a beneficiary to perform a transaction.
iban
OPTIONAL
StringThe IBAN of the receiver's account.
Needed only when creating a transfer from a bank that handles the creation of beneficiaries on its own, internally, and doesn't require the receiver to be already registered as a beneficiary to perform a transaction.

Response
In addition to the fields described in the BaseResponse, it has the following fields, which will only be returned if the status is done:

ParameterTypeDescription
referenceStringTransaction reference string returned by the bank.

Payment.TransferAutoflow

This 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

func (*Payment) TransferAutoflow(accessToken string, userSecret string, transfer TransferAutoflow, userInputs []response.UserInput, operationID string) (*response.TransferResponse, error)

Input Parameters

ParameterTypeDescription
transfer
REQUIRED
TransferAutoflowAn object that contains info about the transfer that should be initiated, and any other details that's used to automate the operation.
accessToken
REQUIRED
StringAccess Token obtained using the exchangeToken method.
userSecret
REQUIRED
StringThe userSecret from a user’s successful log in to Connect.
operationID
OPTIONAL
StringThe 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
[]UserInputArray of UserInput object, that are needed to complete this operation.
Required only if a previous call responded with user_input_required status.

You can read more about user inputs specification on Specify User Input

UserInput Object

ParameterTypeDescription
idUserInputID
(Enum)
Type of input required.

You can read more about user input types on User Input Types.
indexintIs used in case more than one user input is requested.
Will always be 0 If only one input is requested.
answerStringUser input that must be submitted. In the response it will always be empty.

TransferAutoflow Object

ParameterTypeDescription
senderID
REQUIRED
StringThe id of the account which the money should be sent from.
Retrieved from one of the accounts array returned from the getAccounts method.
amount
REQUIRED
float64The amount of money which should be sent.
beneficiary
REQUIRED
request.BeneficiaryInfoAn object that holds the info about the beneficiary which the money should be sent to.
bankID
REQUIRED
StringThe bankID of the user which is initiating this transfer.

beneficiary Object

ParameterTypeDescription
name
REQUIRED
StringName of the beneficiary.
nickname
REQUIRED
StringNickname of the beneficiary.
accountNumber
REQUIRED
StringAccount number of the beneficiary.
iban
REQUIRED
StringBeneficiary's IBAN number.
swiftCode
REQUIRED
StringBeneficiary's financial institution's SWIFT code.
address
REQUIRED
response.BeneficiaryAddressAn object containing the address information of the beneficiary.
country
REQUIRED
StringName of the country in all uppercase letters.
branchAddress
REQUIRED
StringAddress of the financial institution’s specific branch.
branchName
REQUIRED
StringName of the financial institution’s specific branch.
phoneNumber
OPTIONAL
StringBeneficiary's phone number.
routingNumber
OPTIONAL
StringBeneficiary's Routing number, needed only for US banks accounts

address Object

ParameterTypeDescription
line1
REQUIRED
StringStreet name and number. Note: value should not contain any commas or special characters.
line2
REQUIRED
StringCity name. Note: value should not contain any commas or special characters.
line3
REQUIRED
StringCountry name. Note: value should not contain any commas or special characters.

Response
In addition to the fields described in the BaseResponse, it has the following fields, which will only be returned if the status is done:

ParameterTypeDescription
referenceStringTransaction reference string returned by the bank.