Community FAQs

Common questions asked in the community

We collated a list of some of the most common questions community members are asking. We'll grow this list with your support ๐Ÿ‘

If you have a question that isn't covered by these FAQs, post it on the Slack channel ๐Ÿ’ฌ

And if you find the solution to an error or a bug, write it down, post it in the Slack channel or record a quick video. Chances are other developers are having the same issue, and you might save them a lot of time ๐Ÿ’œ

๐Ÿ–ฅ๏ธ Investec API FAQs

How do I create a new or multiple Investec API key(s)?

You can create API keys for your account by logging into the Investec Online Portal. Navigate to "Tools" --> โ€œProgrammable Bankingโ€ to access your API credentials and create API key(s).

Check out How to Get your API key for more details.

How do I authenticate and obtain an access token to use the Investec Programmable Banking APIs?

The authentication process involves obtaining an access token using the OAuth 2.0 Authorisation Framework. You'll need to make a request to the authentication endpoint with your client credentials to receive the access token.

Check out How to authenticate for more details.

What are the main API endpoints and methods available for accessing account and transaction information?

The API provides several endpoints, such as "Get Accounts," "Get Account Balance," and "Get Account Transactions," which allow you to retrieve account details, balances, and transaction information. These endpoints support HTTP methods like GET and POST.

Check out How to get your transaction history for more details.

How do I obtain a list of accounts associated with a profile?

You can use the "Get Accounts" endpoint (GET /za/pb/v1/accounts) to obtain a list of accounts associated with a profile. This endpoint requires the authorisation bearer token.

Check out How to get your transaction history for more details.

How do I retrieve the balance of a specific account?

You can use the "Get Account Balance" endpoint (GET /za/pb/v1/accounts/{accountId}/balance) to retrieve the balance of a specific account. Replace {accountId} with the actual account ID.

Check out How to get your transaction history for more details.

How do I fetch transactions for a specific account within a specified date range?

You can use the "Get Account Transactions" endpoint (GET /za/pb/v1/accounts/{accountId}/transactions) to fetch transactions for a specific account. You can provide optional query parameters such as fromDate, toDate, and transactionType to filter the transactions.

Check out How to get your transaction history for more details.

How do I list transactions on the API that have not moved to POSTED yet (ie. pending transactions)?

It is not currently possible to list pending transactions on the API, however, you can calculate pending transactions using the following formula:

[Available balance] - [Actual balance] - [Overdraft limit value] = Pending transactions

Why is the Posted Order of my transactions =0 ?

The Posted Order of a transaction may start out listed as 0 and then change to the correct number once it has settled. To be safe, ignore transactions while their Posted Order =0.

What is the difference between the fields transactionDate and postingDate?

transactionDate is the date that you swiped your card or issued a payment. postingDate is the date that the amount was deducted from your balance.

What are the main API endpoints and methods available for making account transfers and beneficiary payments?

Transfer Multiple v2

  • Endpoint: โ€˜POST /za/pb/v1/accounts/{acountId}/transfermultipleโ€™

  • Method: POST

  • Description: Allows you to transfer funds to one or multiple accounts.

  • Request body: The request body should include an array of transfer objects specifying the beneficiary account, amount, and reference details.\

Pay Multiple:

  • Endpoint: โ€˜POST /za/pb/v1/accounts/{accountId}/paymutipleโ€™

  • Method: POST

  • Description: Enables you to pay funds to one or multiple beneficiaries.

  • Request Body: The request body should include an array of payment objectives specifying the beneficiary, amount, and reference details. \

To initiate transfers and payments, make a HTTP POST request to the respective endpoints mentioned above. Ensure that you include the necessary authorisation and authentication headers, and the Bearer token obtained through the OAuth process, to authenticate your API request.

View the Investec Developer Docs for more details.

Can I create a beneficiary via the API?

Currently, the API does not support direct creation of beneficiaries. To create a beneficiary, use the Investec Online Portal or other standard methods provided by Investec.

Once you have created a beneficiary, make at least one payment to that beneficiary using Investec Online before initiating a payment via the API. This ensures that the beneficiary is properly set up and ready to receive payments via the API.

Is there a payment limit on the Beneficiary Payments API?

The payment limit via the API is currently R20 000.00. You must have made a payment to the beneficiary via Investec Online before making a payment to a beneficiary via the API.

Check out How to make a payment for more details.

๐Ÿ’ณ Card FAQs

Where do I access the Online IDE to program my card?

Login to the Investec Online Portal and navigate to Programmable Banking. Navigate to the desired card on your profile and ensure that you have enabled it for Programmable Banking by toggling the button below the card. Click on the card to open up the Online IDE.

Check out How to activate your card for Programmable Banking for more details.

How do I intercept and modify card transactions using custom code?

You can use the beforeTransaction method in the main.js file to intercept the authorization object before it is approved by Investec. Within this method, you can apply logic to either approve or decline the transaction based on the authorization data or external data sources.

Check out How to add code to your card for more details.

Can I approve or decline a transaction based on specific conditions?

Yes, you can apply conditional logic within the beforeTransaction method to approve or decline a transaction based on specific criteria. For example, you can check the transaction amount, beneficiary details, or other factors to determine the appropriate action.

Check out How to add code to your card for more details.

How do I perform actions or communicate with external resources after a transaction is completed?

You can use the afterTransaction method to perform actions or communicate with external resources after processing the transaction. For example, you could set up email notifications every time you swipe your card.

Are there any limitations or time constraints on executing custom code for card transactions?

The beforeTransaction method has a limited window of 2 seconds to execute, so it's important to ensure your code is efficient and responds within that timeframe. However, the afterTransaction method provides a larger window of 15 seconds for post-transaction actions.

How do I securely manage and reference environment variables for my custom code on the card?

Environment variables can be defined and saved in the env.json file. These variables can then be accessed within the main.js file using process.env.variableName. This allows you to securely store and reference sensitive information or configuration details.

How do I differentiate between simulated transactions and production transactions?

You can differentiate between simulated transactions and production transactions by checking the transaction reference. In the afterTransaction method, you can compare transaction.reference with a specific value (e.g., "simulation") to identify simulated transactions.

Check out How to simulate a transaction for more details.

๐Ÿ’ก It's always recommended to consult the official documentation provided by Investec for detailed instructions and specific technical guidance

Last updated