Commercial & Corporates

Intelligent banking, built for scale.

  • Integrate banking APIs into your systems to improve efficiency and service delivery.
  • Use Host-to-Host file integrations where secure, file-based processing is required.
  • Connect banking to everyday business tools like ERPs and spreadsheets.
Modern corporate office

These integrations apply to commercial and corporate clients who typically have an annual turnover of > R30m. Visit Individuals & Private Business for individual and private business bank integrations.

Get started


Login to Investec Online and follow the steps below to self-enrol:

  1. Click on the “Investec Developer” tile.
  2. Read and acknowledge the terms and conditions and click “Enroll”.
  3. You are now activated for Investec Developer and will be taken to the Investec Developer home page. Here, you can manage and control your API, card, and Investec Developer community access.

  1. Login to Investec Online and click on “Investec Developer”.
  2. Select “Business Connections”. You will be able to view your credentials (client ID and secret) and any API keys you have created for the app that you have connected. You can toggle between connected apps.
  3. Click on “Create new API key”.
  4. Name your API key by entering a name under “Alias”.
  5. Select the companies that the key will have access to.
  6. Select the permissions for which you would like the API keys to have access to:
    • Your account name and number
    • Your transactions
    • View and update card code
  7. Select continue to create your API key. The new API key will now be available on the Business Connections page.
3

Make your first API call

Call the Business and Commercial Banking API

Don't have an Investec account? You can test out our Sandbox APIs.

Applicable APIs

How-to guides

Step-by-step instructions for using commercial and corporate banking integrations.

Step 1

Get your sandbox details

Get the sandbox base URL and credentials you need to create a token.

Includes client_id, client_secret, x-api-key and auth header format.

View Sandbox Credentials

Step 2

Make your first sandbox call

Follow the Quickstart cURL steps to get a token and call any endpoint.

A clean first success confirms auth, scopes, and endpoint access.

View Quickstart cURL

The Investec Online IDE

The Investec Online IDE (integrated development environment) enables Investec clients to execute custom functionality on their programmable card.

  1. Navigate to the Investec Developer homepage by clicking on “Manage”, followed by “Investec Developer”.
  2. Click on “manage code” on the Programmable Card IDE tile.
  3. You will be presented with a list of your cards. Ensure it is enabled by toggling the card on.
  4. Click on the card to which you would like to add your code.
  5. The IDE or code editor for your card will open up, ready for you to start adding your code.

Pro-Tip: The IDE can be slow to load and you might need to refresh the page.

Adding code to your card via the IDE and running a simulation

There are three main functions that can be used to execute custom functionality on your card:

  • beforeTransaction — Intercepts the authorisation before it is approved. Apply logic to decline or approve based on the card authorisation data. Must return a true or false value. Time is limited for this function so use minimal code.
  • afterTransaction — Executes after every transaction that has been processed by the card.
  • afterDecline — Executes if a transaction has been declined on the card.
  1. Navigate to the main.js file and paste in the code snippet below to test. The code declines card purchases made in bakeries (using a specified merchant code) that are over R50 (or 5000 cents).
const beforeTransaction = async (authorization) => {
  if (authorization.merchant.category.key === 'bakeries') {
    return authorization.centsAmount < 5000
  }
  return true
}

Pro-Tip: When referring to amounts in the code it is the cent value of the transaction. R55 equals 5500 cents.

  1. Click “Save changes”. This won't have an effect on your card until you click “deploy code to card”.
  2. Navigate to the right-hand side of the code editor to the simulator. The simulator allows you to simulate transactions to test out the code on your card before you deploy it.
  3. Type in a value of 5100 cents (R51.00), which is above the R50 limit set in the code.
  4. Click “Simulate card transaction”.
  5. A simulation.json file will be created, showing that the transaction failed (authorizationApproved will be false) because the amount is over the limit specified.
  6. Once you have tested the code and would like to deploy it, click “Deploy code to card”.

Pro-Tip: The log.json file shows all the logs from the code. You can also log certain outcomes using the console.log function.

Connectors

Pre-built integrations to connect Investec banking to your business tools.

Connect to ERPs

With Finzap

Finzap

Integrate with enterprise resource planning systems for end-to-end financial automation.

XeroSage

Connect to Excel

With Spreadsheet Banking

Spreadsheet Banking

Access your Investec data in MS Excel, seamlessly integrated into your spreadsheet.

Microsoft Excel

Programmable card

Write custom code or set card rules that run every time your card is swiped — personal or business.

What is a programmable card?

Investec Programmable Card allows you to customise and control your Investec Bank card(s) using code or simple card rules. You can automatically approve or decline transactions, apply dynamic spending limits, log activity, and trigger downstream processes, whether you prefer a fully coded integration or a simple rules-based setup.

  1. Login to Investec Online. Ensure you are enrolled for Investec Developer.
  2. Navigate to the Investec Developer homepage by clicking on “Manage”, followed by “Investec Developer”.
  3. Click on “manage code” on the Programmable Card IDE tile.
  4. You will be presented with a list of your cards. Below the card is a toggle. Switch the toggle to activate the card. Toggle the switch again to deactivate the card.

ProTip: You can access the card toggle on/off via the mobile app if you need to do so while at the shop till.

There are three ways to program your card:

Card Rules, no coding required (Investec Online)

Set spending controls and behavioural rules through a simple interface, with no coding required.

Card IDE (Investec Online)

Write, test, and publish your card logic directly within your banking profile, without building a separate integration.

Card API

Retrieve and manage cards and deploy custom JavaScript that runs before and after your transactions.

  1. On Investec Online, ensure you are activated for Investec Developer (see how to activate your account).
  2. Navigate to Low-code quickstart.
  3. Here you can choose from 3 different card rules, no coding required. You can set a transaction limit on the card, limit usage of the card to a specific merchant or limit usage of the card to a merchant category. You can only choose one of these rules at a time at present.

The online IDE is a JS code editor based on Monaco Editor, the same editor that powers VS Code.

  • There are 3 methods which you can access for each card transaction: beforeTransaction, afterTransaction and afterDecline
  • Intercept card transactions and decline based on your code with the beforeTransaction hook
  • Publish code to a securely hosted VM instance
  • Perform transaction simulations using the online simulator
  • Enable/disable the code executing against a specific card
  • Access the card authorisation object and meta-data
  • Call external APIs using node-fetch

The functionality consists of 2 parts: main.js is where you update your code, and env.json is where you save your environment variables. These files are encrypted during network communications for security reasons.

main.js

main.js requires two methods for card transaction interception:

beforeTransaction

Every time you execute a transaction from your Investec card, the beforeTransaction method intercepts the authorisation object before it is approved by Investec. You can apply logic to either decline or approve the transaction. You must return a boolean: return true to approve, return false to decline.

Note: beforeTransaction has a limited window of 2 seconds to execute.

afterTransaction

Executed once beforeTransaction has completed. This method has a longer window of 15 seconds, giving you time to communicate with external data sources such as updating a database.

Examples

Approve a transaction

const beforeTransaction = async () => {
  return true; // always APPROVE
};

Decline a transaction

const beforeTransaction = async () => {
  return false; // always DECLINE
};

Apply conditional logic

const beforeTransaction = async (authorization) => {
  return authorization.centsAmount < 5000;
};

Log transaction object

const afterTransaction = async (transaction) => {
  console.log(transaction);
};

env.json

Within env.json, you can save environment variables — name/value pairs available for reference in main.js via process.env. These files are encrypted during network communications for security.

// env.json
{
  "foo": "bar"
}

// Access in main.js
const value = process.env.foo; // "bar"

Simulating a transaction

You can differentiate between a simulated transaction and a production transaction by the transaction reference.

const afterTransaction = async (transaction) => {
  if (transaction.reference === 'simulation') {
    // This is a simulated transaction
  }
};

Traditional Host-to-Host

File-based integration (SFTP)

Securely exchange structured payment and reporting files with Investec via SFTP for automated, batch-based processing between systems.

Contact us to discuss your host-to-host integration needs at bankintegrations@investec.com

SWIFT integrations and SWIFT FileAct

Integrate with Investec over the SWIFT network, including FileAct, to securely send payments and receive financial messages in globally recognised banking formats.

Contact us to discuss your host-to-host integration needs at bankintegrations@investec.com

FAQs

Frequently asked questions about commercial and corporate bank integrations.

Commercial and corporate clients have access to the Business and Commercial Banking API, Authorisation API and Card API.

Yes. You can explore our APIs using the sandbox environment, which lets you test endpoints with mock data before going live. See the Sandbox guide for details.

Log onto Investec Online, then click Investec Developer and follow the on screen steps to activate your account. Once activated, follow the steps to get your credentials. You can create multiple keys to share with your development team, with specific permissions defined.

Host-to-host (H2H) is a direct, system-to-system integration between your organisation and Investec that enables secure, automated exchange of payment instructions and reporting data without manual intervention. Unlike real-time APIs, which are typically used for on-demand data access and transaction processing, host-to-host integrations are often file-based and designed for high-volume, batch processing. They are commonly implemented via secure file transfer (SFTP) or through the SWIFT network, including SWIFT FileAct, and are well suited to large corporates or enterprises with established ERP or treasury systems that require structured, bulk financial processing.

Downloads

Sample files and technical documents.

pain.001 Sample File

Customer Credit Transfer Initiation - sample XMLfor submitting payment instructions.

XML

pain.002 Sample File

Customer Payment Status Report - sample XML for receiving payment status responses.

XML