Tutorial
How the Batch Transaction Details API works
- Request an access token.
- Request the batch booking information using the Business Account Insight service getAccountTransaction (see getAccountTransaction).
- Use the transactionId from the batch booking to retrieve the details of the transactions in the batch.
Requirements
Note: The Batch Transaction Details service can be freely used by ABN AMRO business account holders. For third parties providing bank connectivity services there are restrictions. Please contact us to review your use case.
To use this API in a production environment, you must have the following:
- Access to the Business Account Insight API
Sandbox access
The sandbox and production environments are functionally identical. The sandbox is static, which means that you can perform all operations without making any transactions on an account. Transactions posted in the sandbox environment are cleaned daily.
Note: Since the Batch Transaction Details is an add-on to the Business Account Insight API, the registration is for the Business Account Insight API.
To use the Batch Transaction Details service in a sandbox environment, complete the following steps:
- Register and create an account:
- Click Sign up.
- Enter your details, and click Create new account.
- Developer Support will send you an activation link by email.
- Click the activation link.
- Create an register application:
- Log in to your account.
- In the left-side navigation click Apps.
- Click Add app.
- In the App name field, enter a name for your application.
- In the APIs field, select Business Account Insight API, and click Add app.
- Complete the steps from How to use this API.
To provide feedback on this API, see Contact.
Sandbox access details
The following accounts are available for testing batch transaction details:
| IBAN | Batch Transaction Id | Description |
|---|---|---|
| NL62ABNA9999841479 | GB036000001922220AP | Returns the details of 30 transactions for SCT batch. Use this to test the Next Page key. |
| NL12ABNA9999876523 | GB036000001934240AE | Returns the details of 20 transactions for SDD batch. |
| NL58ABNA9999142181 | GT036000276072180AP | Returns error - "No records found for the input provided." |
- Sandbox URL: https://api-sandbox.abnamro.com
- Sandbox token URL: https://auth-mtls-sandbox.abnamro.com
Use the following credentials for the sandbox:
| Attribute | Value |
|---|---|
| client_id | test_client |
| API-Key | API Key for your application on the Developer Portal |
Certificates
| Certificate files |
|---|
| Download public certificate: Download |
| Download private key: Download |
Note: The sandbox environment handles functional error scenarios only.
Production access
Note: Since the Batch Transaction Details is an add-on to the Business Account Insight API, registration for the Business Account Insight API is required.
To get access to production:
- Log in to your account.
- In theleft-side navigation, click Apps.
- Click Request Production Access.
- Select the API category that you want to request production access for.
- Fill in the form, and click Submit.
- You receive a confirmation email and ticket-ID.
- ABN AMRO Developer Support validates the form.
- When the form is validated and the setup is complete, ABN AMRO Developer Support contacts you and supplies you with a client_id.
- A new app is added in Apps. This new app contains your API key.
Production access details
- Production URL: https://api.abnamro.com
- Production Token URL: https://auth-mtls.abnamro.com/as/token.oauth2
Use the following credentials for production:
| Attribute | Value for Production |
|---|---|
| client_id | As supplied to you by ABN AMRO |
| API-Key | The API Key for your production application on the Developer Portal |
Certificates
| Certificate files: |
|---|
| Certificate file : Your OV or EV SSL certificate |
| Private key : Your private key |
How to use this API
This instruction describes how to connect an application to the Batch Transaction Details service in the sandbox environment.
Note: Before you start this process, you must complete the steps described in Sandbox access.
Postman collection
Use the following Postman collections to try out the functionality of this API:
- This collection combines individual operations to try out usage scenarios: run this API in Postman
For additional information on how to configure Postman and import a collection, see Postman.
Step 1 - Request an access token
In this step, the OAuth 2.0 client credentials flow is used to obtain access to the Business Account Insight API.
Request attributes
The table below defines the usage of attributes in a request.
| Attribute | Value |
|---|---|
| client_id | test_client |
| API-Key | The API Key for your application on the Developer Portal |
Certificates
| Certificate files |
|---|
| Download public certificate: Download |
| Download private key: Download |
Sample request
Request an access token using the following sample:
curl -X POST "https://auth-mtls-sandbox.abnamro.com/as/token.oauth2" \
-v \
--cert CertificateCommercial.crt \
--key PrivateKeyCommercial.key \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials&client_id=test_client&scope=account:transaction:read'
Sample response
{
"token_type": "Bearer",
"access_token": "X1PTWZre0fnW72l263yrhAWB2FDwx3tg",
"expires_in": 7199
}
Step 2 - Call the Batch Transaction Details API
To retrieve a list of individual transactions and their details within a particular batch, see the getBatchTransactions operation.
Sample request
curl -X GET "https://api-sandbox.abnamro.com/v1/accounts/NL12ABNA9999876523/batch-transactions/0209K1821035223B0AO" \
-H 'Authorization: Bearer X1PTWZre0fnW72l263yrhAWB2FDwx3tg' \
-H 'API-Key: YourApiKeyHere'
Sample response
{
"batchTransactionId": "0209K1821035223B0AO",
"accountNumber": "NL12ABNA9999876523",
"transactionsAmount": 20,
"totalIndividualTransactions": 10000,
"transactionDate": "2020-07-28",
"bookDate": "2020-07-28",
"serviceLevelCode": "CORE",
"localInstrument": "INST",
"batchType": "SEPA_CREDIT_TRANSFER",
"nextPageKey": "2020-10-08-00.16.01.51144820201007",
"individualTransactions": [
{
"referenceId": "0209K1821142081I0AO",
"paymentStatus": "OK",
"reasonCode": "X0009",
"sourceId": "AO",
"productId": "DCCI",
"endToEndIdentificationId": "E2E-REF-1",
"externalIdentificationId": "REF-EXT-MARNIX2",
"instrumentId": "P30818",
"executionDate": "2020-07-28",
"amount": 200,
"ISOCurrencyCode": "EUR",
"localInstrumentId": "CORE",
"remittanceInformation": "FOR IB TEAM TESTING",
"creditor": {
"creditorId": "12345",
"creditorName": "Eric Xyz",
"creditorAccount": "NL52ABNA0999546789",
"creditorAgent": "ABNANL2",
"ultimateCreditorId": "12345",
"ultimateCreditorName": "John D"
},
"debtor":
{
"debtorId": "12345",
"debtorName": "Richard Abc",
"debtorAccount": "NL13ABNA0999225888",
"debtorAgent": "ABNANL2",
"ultimateDebtorId": "12345",
"ultimateDebtorName": "Frank Unknown"
},
"batchSequenceNumber": 51,
"mandateId": "MANDATE-ID-2"
}
]
}
Note: You can store the IBAN and scopes for your own administration, and for access to the Business Account Insight API.
Additional operations
Get transactions using nextPageKey
Transaction results are paginated. In each response, a max of 25 transactions are returned. If a response contains a nextPageKey property, it indicates that the result set for the request is larger than 25 transactions. This enables you to get the complete result set by performing multiple queries.
This nextPageKey value is null when no more transactions are present. There is an exception when the total number of transactions is a factor of 25. In such cases a nextPageKey will be provided while the last page will not contain any transactions.
The nextPageKey of the previous response can be used as input.
Note: If filters were used in your initial request, for example, bookDateFrom or bookDateTo, these must be repeated in the
nextPageKeyquery.
Note: The initial response will contain batch level information like batchTransactionId after which an array of individualTransactions will follow. The batch level information will only be returned in the first response. If the nextPageKey is used to retrieve more transactions, the batch level information will not be repeated.
Sample request
curl -X GET -k https://api-sandbox.abnamro.com/v1/accounts/{accountNumberRequested}/batch-transactions/GB020001234512345AO?nextPageKey=2024-04-11-22.33.48.59063020240111 \
-H 'Authorization: Bearer GPgYglX4sO1WhzfChx4tmjr4y7Qg' \
-H 'API-Key: X1QTWZre0fnW72l263yrhAWB2FDwx3tg'
Need help?