Skip to main content

TransactionsImported Event

Fired when transactions for a period of time or a report have been successfully imported from a payment provider or if an error occurred while importing the transactions.

warning

Webhooks and Notifications are in preview

Notification Payload​

The notification body contains the id, webhookId, eventType and eventRaisedAt fields common to every event type (see Notification Payload), plus an eventData object specific to TransactionsImported: partnerId, userId, accountId, a transactions import summary, and — for report-based account types — the report it came from (same shape as GetReport's response).

TransactionsImported notification
{
"id": "16n4jczvv6",
"webhookId": "rddzhevagr",
"eventType": "TransactionsImported",
"eventRaisedAt": "2024-10-28T09:28:40.1949759Z",
"eventData": {
"partnerId": "326vgsymrg",
"userId": "x96mdcvnzr",
"accountId": "gd3kh2w7a19",
"transactions": {
"dataImportId": "387t3j11ck47tmp",
"countReceived": 3,
"countAdded": 2,
"countUpdated": 1,
"bookingDateStart": "2024-10-27T00:00:00Z",
"bookingDateEnd": "2024-10-27T00:00:00Z",

Example with an error:

{
"id": "26231cg7gr",
"webhookId": "rddzhevagr",
"eventType": "TransactionsImported",
"eventRaisedAt": "2024-10-28T09:42:17.1295162Z",
"eventData": {
"partnerId": "326vgsymrg",
"userId": "x96mdcvnzr",
"accountId": "d8kyhnd2fj8",
"transactions": {
"dataImportId": "71yb75jyfp1xce1",
"countReceived": 0,
"countAdded": 0,
"countUpdated": 0,
"createdAt": "2024-10-28T09:42:12.9572301Z",
"status": "Failed",
"warnings": [],
"errors": [
{
"type": "ImportFailure",
"message": "Error importing transactions",
"isUserActionRequired": false,
"isTemporary": false
}
]
},
"report": {
"id": "xjvs7gybj82tn3",
"name": "2024-10-27-58",
"elementStatistics": {
"count": 0
},
"reportDate": "2024-10-27T00:00:00Z",
"reportPeriod": {},
"createdAt": "2024-10-28T09:42:06.8625122Z",
"modifiedAt": "2024-10-28T09:42:14.9372957Z",
"state": "import_error",
"warnings": [],
"errors": [
{
"type": "ReportParseFailure",
"message": "Report parse failure",
"isUserActionRequired": false,
"isTemporary": false
}
]
}
}
}

The notification payload you receive for the TransactionsImported event type has the same data model as the response from the CreateTestTransactionsImportedEvent method.

Testing Webhooks for the TransactionsImported Event Type​

Use CreateTestTransactionsImportedEvent — see Test and Enable Notifications for how these endpoints work in general. accountId and transactions.dataImportId must reference a real account and data import.

Example:

POST /testevents/transactionsimported
POST /webhook/v1/testevents/transactionsimported HTTP/1.1
Host: sandbox.paydata-api.com
Authorization: Bearer {PartnerToken}
Content-Type: application/json
Request Body
{
"accountId": "yzdmf84ktk",
"transactions": {
"dataImportId": "ppytnmfk1k5s7"
},
"webhookIds": [
"sd76fgfsdfks"
]
}
Response — HTTP/1.1 200
{
"notifications": [
{
"id": "16n4jczvv6",
"webhookId": "sd76fgfsdfks",
"eventType": "TransactionsImported",
"eventRaisedAt": "2024-10-28T09:28:40.1949759Z",
"eventData": {
"partnerId": "326vgsymrg",
"userId": "x96mdcvnzr",
"accountId": "yzdmf84ktk",
"transactions": {
"dataImportId": "ppytnmfk1k5s7",
"countReceived": 3,
"countAdded": 2,
"countUpdated": 1,

You can optionally specify values for some properties of transactions and report objects to be included in the notifications. For properties, for which you do not provide values, current values from the Account or DataImport will be used.

Example:

POST /testevents/transactionsimported
POST /webhook/v1/testevents/transactionsimported HTTP/1.1
Host: sandbox.paydata-api.com
Authorization: Bearer {PartnerToken}
Content-Type: application/json
Request Body
{
"accountId": "gd3khyzyvc3",
"transactions": {
"dataImportId": "ppytnmfk1k5s7",
"countReceived": 722,
"countAdded": 733,
"countUpdated": 440,
"bookingDateStart": "2025-01-09T00:00:22.0000000Z",
"bookingDateEnd": "2025-01-09T00:00:22.0000000Z",
"createdAt": "2025-01-12T15:22:22.3688705Z",
"status": "Done",
"errors": [
{
"type": "CredentialsFailure",
"message": "Login failed, credentials not valid",
"providerMessage": "Insufficient permissions",
Response — HTTP/1.1 200
{
"notifications": [
{
"id": "26231cg7gr",
"webhookId": "rynxhj4fd6",
"eventType": "TransactionsImported",
"eventRaisedAt": "2025-01-12T15:22:22.3688705Z",
"eventData": {
"partnerId": "326vgsymrg",
"userId": "x96mdcvnzr",
"accountId": "gd3khyzyvc3",
"transactions": {
"dataImportId": "ppytnmfk1k5s7",
"countReceived": 722,
"countAdded": 733,
"countUpdated": 440,