Transaction Subscription

Step 1 - Create Transaction subscription

Endpoints:

Creation of a subscription
POST /account-notification-service/subscriptions?type=transaction

Purpose: Endpoint to create a new subscription for Transaction

Create a Transaction subscription to receive real-time notifications at your designated pushUri

You can define filters such as:

  • Amount range
  • Credit or debit indicator
  • Transaction attributes
  • End-to-end reference
  • Transaction type codes
  • Wildcards to match patters (e.g. "invoice*")
📘

Wildcard (*)

A wildcard (*) is a symbol that can stand in for one or more characters. In the ANS API, you can use wildcards to make triggers more flexible. For example, if you want to match any transaction subscription name that starts with certain letters, use a wildcard. This allows you to create more flexible and powerful triggers for receiving instant notifications.

Step 2 - Receive Transaction Notification

When a transaction matches your subscription:

  1. Receive a notification at your pushUri.
  2. Use the notificationId to retrieve transaction details (Step 3).

Example Transaction Notification

{
  "subscriptionId": "59bca412-6d40-469f-9b39-59f4617e95dd",
  "timestamp": "2024-02-27T11:10:00",
  "notificationType": "TRANSACTION",
  "notificationId": "URTr9CEFoW1oopHI780kuX0gz59mW9WEbz56RhiwHoK-qdzBCUIg4v_Sbng33Xg3KdyCMwGbOb8P_Mh1BKQ-cTXa2phM5WNXWvY2.9"
}
👍

Acknowledge notifications as soon as possible. Delays slows down the processing of subsequent notifications, causing longer wait times and unnecessary retries.

After receiving the notification you should proceed to step 3 to collect the transactions.

📘

You may process the file in memory or in chunks to avoid memory issues.

Retry mechanism

Ensure that your pushUri is always available.

If delivery fails, the system retries:

  • First retry: after 2 minutes
  • Second retry: after 13 minutes
  • Third and final retry: after 29 minutes

Step 3 - Get transactions

Endpoint:

Collect transactions based on a notification
GET /payments/insight/transactions/{notificationId}

Purpose: Retrieve transactions details linked to a notificationId.

📘

For each transaction that matches the notification subscription, a notification with corresponding notificationId is sent to the pushUri.