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.
Parameter | Type | Description |
---|---|---|
operationID |
| Unique ID generated to identify a specific operation. |
success |
| Returns |
status |
| The status of the job.
|
userInputs |
| Specifies the type of further information required from the user before the job can be completed. Note: It's only returned if operation status is |
type |
| Type of error encountered. |
msg |
| Detailed description of the error. Note: It's only returned if operation status is |
UserInput Object
Parameter | Type | Description |
---|---|---|
id |
| Type of input required. You can read more about user input types on User Input Types. |
query |
| Textual description of what is required from the user side. |
index |
| Is used in case more than one user input is requested. |
answer |
| User 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
Parameter | Type | Description |
---|---|---|
accessCode REQUIRED |
| Unique code for a user’s successful login to |
connectionID |
| The |
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
:
Parameter | Type | Description |
---|---|---|
accessToken |
| A 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
Parameter | Type | Description |
---|---|---|
accessToken REQUIRED |
| Access Token obtained using the |
userSecret |
| The |
operationID |
| The |
userInputs |
| Array of You can read more about user inputs specification onSpecify User Input |
UserInput Object
Parameter | Type | Description |
---|---|---|
id |
| Type of input required. You can read more about user input types on User Input Types. |
index |
| Is used in case more than one user input is requested. |
answer |
| User 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
:
Parameter | Type | Description |
---|---|---|
identity |
| An 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
Parameter | Type | Description |
---|---|---|
accessToken REQUIRED |
| Access Token obtained using the |
userSecret |
| The |
operationID |
| The |
userInputs |
| Array of You can read more about user inputs specification on Specify User Input |
UserInput Object
Parameter | Type | Description |
---|---|---|
id |
| Type of input required. You can read more about user input types on User Input Types. |
index |
| Is used in case more than one user input is requested. |
answer |
| User 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
:
Parameter | Type | Description |
---|---|---|
accounts |
| 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
Parameter | Type | Description |
---|---|---|
accountID REQUIRED |
| The bank account ID which its balance is requested. |
accessToken |
| Access Token obtained using the |
userSecret |
| The |
operationID |
| The |
userInputs |
| Array of You can read more about user inputs specification on Specify User Input |
UserInput Object
Parameter | Type | Description |
---|---|---|
id |
| Type of input required. You can read more about user input types on User Input Types. |
index |
| Is used in case more than one user input is requested. |
answer |
| User 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
:
Parameter | Type | Description |
---|---|---|
balance |
| An 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
Parameter | Type | Description |
---|---|---|
accountID REQUIRED |
| The bank account ID which its transactions are requested. |
fromDate |
| The start date of the transactions wanted. |
toDate |
| The end date of the transactions wanted. |
accessToken |
| Access Token obtained using the |
userSecret |
| The |
operationID |
| The |
userInputs |
| Array of You can read more about user inputs specification on Specify User Input |
UserInput Object
Parameter | Type | Description |
---|---|---|
id |
| Type of input required. You can read more about user input types on User Input Types. |
index |
| Is used in case more than one user input is requested. |
answer |
| User 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
:
Parameter | Type | Description |
---|---|---|
transactions |
| 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
Parameter | Type | Description |
---|---|---|
accountID REQUIRED |
| The bank account ID which its transactions are requested. |
fromDate |
| The start date of the transactions wanted. |
toDate |
| The end date of the transactions wanted. |
accessToken |
| Access Token obtained using the |
userSecret |
| The |
operationID |
| The |
userInputs |
| Array of You can read more about user inputs specification on Specify User Input |
UserInput Object
Parameter | Type | Description |
---|---|---|
id |
| Type of input required. You can read more about user input types on User Input Types. |
index |
| Is used in case more than one user input is requested. |
answer |
| User 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
:
Parameter | Type | Description |
---|---|---|
transactions |
| 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
Parameter | Type | Description |
---|---|---|
accountID REQUIRED |
| The bank account ID which its transactions are requested. |
fromDate |
| The start date of the transactions wanted. |
toDate |
| The end date of the transactions wanted. |
accessToken |
| Access Token obtained using the |
userSecret |
| The |
operationID |
| The |
userInputs |
| Array of You can read more about user inputs specification on Specify User Input |
UserInput Object
Parameter | Type | Description |
---|---|---|
id |
| Type of input required. You can read more about user input types on User Input Types. |
index |
| Is used in case more than one user input is requested. |
answer |
| User 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
:
Parameter | Type | Description |
---|---|---|
transactions |
| 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
Parameter | Type | Description |
---|---|---|
accessToken REQUIRED |
| Access Token obtained using the |
userSecret |
| The |
operationID |
| The |
userInputs |
| Array of You can read more about user inputs specification on Specify User Input |
UserInput Object
Parameter | Type | Description |
---|---|---|
id |
| Type of input required. You can read more about user input types on User Input Types. |
index |
| Is used in case more than one user input is requested. |
answer |
| User 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
:
Parameter | Type | Description |
---|---|---|
beneficiaries |
| An 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
Parameter | Type | Description |
---|---|---|
beneficiary REQUIRED |
| An object that contains info about the beneficiary that should be added. |
accessToken |
| Access Token obtained using the |
userSecret |
| The |
operationID |
| The |
userInputs |
| Array of You can read more about user inputs specification on Specify User Input |
UserInput Object
Parameter | Type | Description |
---|---|---|
id |
| Type of input required. You can read more about user input types on User Input Types. |
index |
| Is used in case more than one user input is requested. |
answer |
| User input that must be submitted. In the response it will always be empty. |
request.CreateBeneficiaryInfo Object
Parameter | Type | Description |
---|---|---|
name REQUIRED |
| Name of the beneficiary. |
nickname |
| Nickname of the beneficiary. |
accountNumber |
| Account number of the beneficiary. |
iban |
| Beneficiary's IBAN number. |
swiftCode |
| Beneficiary's financial institution's SWIFT code. |
type |
| Type of beneficiary. |
address |
| An object containing the address information of the beneficiary. |
country |
| Name of the country in all uppercase letters. |
branchAddress |
| Address of the financial institution’s specific branch. |
branchName |
| Name of the financial institution’s specific branch. |
phoneNumber |
| Beneficiary's phone number. |
routingNumber |
| Beneficiary's Routing number, needed only for US banks accounts. |
address Object
Parameter | Type | Description |
---|---|---|
line1 REQUIRED |
| Street name and number. Note: value should not contain any commas or special characters. |
line2 |
| City name. Note: value should not contain any commas or special characters. |
line3 |
| Country 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 usingcreateTransfer
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
Parameter | Type | Description |
---|---|---|
transfer REQUIRED |
| An object that contains info about the transfer that should be initiated, and any other details that's used to automate the operation. |
accessToken |
| Access Token obtained using the |
userSecret |
| The |
operationID |
| The |
userInputs |
| Array of You can read more about user inputs specification on Specify User Input |
UserInput Object
Parameter | Type | Description |
---|---|---|
id |
| Type of input required. You can read more about user input types on User Input Types. |
index |
| Is used in case more than one user input is requested. |
answer |
| User input that must be submitted. In the response it will always be empty. |
CreateTransfer Object
Parameter | Type | Description |
---|---|---|
senderID REQUIRED |
| The id of the account which the money should be sent from. |
amount |
| The amount of money which should be sent. |
receiverID |
| The id of the beneficiary which the money should be sent to. |
name |
| The name of receiver. |
accountNumber |
| The Account Number of the receiver's account. |
iban |
| The IBAN of the receiver's account. |
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
:
Parameter | Type | Description |
---|---|---|
reference |
| Transaction 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
Parameter | Type | Description |
---|---|---|
transfer REQUIRED |
| An object that contains info about the transfer that should be initiated, and any other details that's used to automate the operation. |
accessToken |
| Access Token obtained using the |
userSecret |
| The |
operationID |
| The |
userInputs |
| Array of You can read more about user inputs specification on Specify User Input |
UserInput Object
Parameter | Type | Description |
---|---|---|
id |
| Type of input required. You can read more about user input types on User Input Types. |
index |
| Is used in case more than one user input is requested. |
answer |
| User input that must be submitted. In the response it will always be empty. |
TransferAutoflow Object
Parameter | Type | Description |
---|---|---|
senderID REQUIRED |
| The id of the account which the money should be sent from. |
amount |
| The amount of money which should be sent. |
beneficiary |
| An object that holds the info about the beneficiary which the money should be sent to. |
bankID |
| The bankID of the user which is initiating this transfer. |
beneficiary Object
Parameter | Type | Description |
---|---|---|
name REQUIRED |
| Name of the beneficiary. |
nickname |
| Nickname of the beneficiary. |
accountNumber |
| Account number of the beneficiary. |
iban |
| Beneficiary's IBAN number. |
swiftCode |
| Beneficiary's financial institution's SWIFT code. |
address |
| An object containing the address information of the beneficiary. |
country |
| Name of the country in all uppercase letters. |
branchAddress |
| Address of the financial institution’s specific branch. |
branchName |
| Name of the financial institution’s specific branch. |
phoneNumber |
| Beneficiary's phone number. |
routingNumber |
| Beneficiary's Routing number, needed only for US banks accounts |
address Object
Parameter | Type | Description |
---|---|---|
line1 REQUIRED |
| Street name and number. Note: value should not contain any commas or special characters. |
line2 |
| City name. Note: value should not contain any commas or special characters. |
line3 |
| Country 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
:
Parameter | Type | Description |
---|---|---|
reference |
| Transaction reference string returned by the bank. |
ACH
ach.createPull
Method is used to create an ACH Pull transaction
Method Description
func (a *Ach) CreatePull(accessToken string, userSecret string, pullTransfer CreatePull, userInputs []response.UserInput, operationID string) (*response.BaseResponse, error)
Input Parameters
Name | Type | Description |
---|---|---|
accessToken REQUIRED |
| Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret |
| User secret returned during the successful authentication in |
transfer |
| Details of the ACH transfer |
operationID |
| The |
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 |
| senderId of the Account from where the amount must be transferred. |
amount |
| Amount of the transfer |
description |
| A message associated with the transfer. |
UserInputs Object
Name | Type | Description |
---|---|---|
id |
| Type of input required. Can be one of the following:
You can read more about user input types on User Input Types |
query |
| Textual description of what is required from the user side |
index |
| Is used in case more than one user input is requested. will always be 0 If only one input is requested. |
answer |
| 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
func (a *Ach) GetPull(accessToken string, userSecret string, userInputs []response.UserInput, operationID string) (*response.GetAchPullResponse, error)
Input Parameters
Name | Type | Description |
---|---|---|
accessToken REQUIRED |
| Access Token obtained using Exchange Token method. You can read more about how to obtain a permanent token on Obtain an Access Token |
userSecret |
| User secret returned during the successful authentication in |
operationID |
| The |
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 |
| Details of the ACH transfer |
Transfer Object
Name | Type | Description |
---|---|---|
status |
| Status of the transfer (ENUM: 'pending', 'completed', 'returned', 'rejected') |
amount |
| Amount of the transfer |
currency |
| Currency type of the transfer |
Currency Object
Name | Type | Description |
---|---|---|
Code |
| Currency code |
Name |
| Full name of the Currency |
Updated 4 days ago