API guide — React to incoming transactions

Before you start

This guide walks you through an example of usage of the Memo Bank API webhooks.

đź“‘ For an in-depth understanding of the Memo Bank API resources and how you can interact with them, take a tour of our Memo Bank API Reference.

Transactions

Transactions are any debit and credit operations on a given account. In the Memo Bank API, all transfers and direct debit collections resources have a corresponding transactions representation.

Setup your webhooks

Memo Bank uses webhooks to inform your system on transaction statuses. Understanding how our webhooks function is essential for tracking the status of incoming/outgoing operations and managing any necessary follow-up after execution.

đź“‘ Follow the API Reference | Webhooks to configure them for your API application and find all the details on the webhooks events structure.

React to incoming transactions: hands on

API clients receive real time notifications from Memo Bank about debit and credit operations through webhooks.

In particular, operations such as incoming credit transfers or incoming direct debits can be tracked through transactions notifications sent to the configured webhook URL.

POST your/webhook.uri HTTP 1.1

{
  "id": "this-is-a-notification-id",
  "date": "2024-11-12T11:14:03+00:00",
  "event_type": "transaction_confirmed",
  "resource_type": "transaction",
  "resource_id": "7ad37a52-8f48-4c70-bc38-269a1133ea2f"
}

Incoming transfers

A transaction_confirmed event type indicates that an operation has been executed. Use the value of the resource_id field to get additional details through a GET to /v2/transactions/7ad37a52-8f48-4c70-bc38-269a1133ea2f .

{
	"id": "7ad37a52-8f48-4c70-bc38-269a1133ea2f",
	"reference": "11fd1082-cafa-4432-a7dd-b4d1af4a3184",
	"account_id": "cd09799d-2475-4d31-8bd2-11c104733258",
	"amount": 500,
	"local_iban": "FR7617338000010109143651430",
	"currency": "EUR",
	"direction": "credit",
	"request_date": "2024-11-12T11:14:02.621261Z",
	"execution_date": "2024-11-12T11:14:02.621261Z",
	"accounting_date": "2024-11-12T11:14:03.119906Z",
	"counterparty_name": "John Doe",
	"status": "confirmed",
	"attachment_count": 0,
	"source": {
		"transfer_type": "standard",
		"local_iban": "FR7617338000010109143651430",
		"counterparty_iban": "FR7617338000018068952440364",
		"counterparty_bank_bic": "MEMOFRP2XXX",
		"type": "transfer_incoming"
	}
}

In the example above, you can find the type of transaction indicating that you received a credit transfer, the local_iban on which the credit transfer arrived, the amount , the currency and the counterparty_name .

Your account has been credited of 5.00 EUR through a standard transfer ordered by John Doe.

Incoming direct debits

In case of direct debits, the workflow is exactly the same. Let’s see another example below:

GET /v2/transactions/639fb108-9be7-47f3-abca-4f779adc522c HTTP/1.1
Authorization: Bearer *****
Host: api.integration.memobank.io

HTTP 200 OK

{
	"id": "639fb108-9be7-47f3-abca-4f779adc522c",
	"reference": "870ef83f-87b6-42c3-8b70-7d0a1ad3a285",
	"account_id": "84ba74e0-199e-41c1-be9b-25ecfb3eeb4e",
	"amount": 1818,
	"local_iban": "FR7617338000019499743327513",
	"currency": "EUR",
	"direction": "debit",
	"request_date": "2024-11-13T06:00:05.475044Z",
	"execution_date": "2024-11-18T01:15:05.954375Z",
	"accounting_date": "2024-11-18T11:45:04.044069Z",
	"counterparty_name": "Deschamps et Henry",
	"status": "confirmed",
	"attachment_count": 0,
	"source": {
		"local_iban": "FR7617338000019499743327513",
		"counterparty_iban": "FR0740165339983076283000000",
		"counterparty_bank_bic": "FAKEFRP0",
		"end_to_end_id": "FAKEE2E241113060000W9GX5PLXZSI7KHNJ",
		"type": "collection_incoming"
	}
}

Under the source object you can find that a collection_incoming transaction has been executed.

Your account identified by the local_iban field has been debited of 18.18 EUR by the Deschamps et Henry company.


The information retrieved by the two examples above should allow your system to react to incoming transactions and implement the corresponding business logic.