AccountCreated AccountUpdated AccountDeleted Events
An account has been successfully created, updated or deleted.
warning
Webhooks and Notifications are in preview
Notification Payload
Example:
{
"id": "x9rmdjcpy6", // notification id, same as in `X-PayData-Notification-Id` header
"webhookId": "rddzhevagr", // webhook id, same as in `X-PayData-Webhook-Id` header
"eventType": "AccountCreated", // (or "AccountUpdated" or "AccountDeleted") event type, same as in `X-PayData-Event-Type` header
"eventRaisedAt": "2024-07-25T08:20:46.752678Z", // event raised timestamp
"eventData": {
"partnerId": "326vgsymrg", // partner id
"userId": "x96mdcvnzr", // user id
"accountId": "85jkt8nyc7w", // account id
"account": {
"id" : "85jkt8nyc7w", // account id
"accountTypeId": "amazon", // account type id
"name": "Amazon", // account name
"status": "Idle", // account status
"elementStatistics": {
"count": 3, // the number of transactions
"first": "2024-08-03T12:01:02.0000000Z", // last transaction booking date
"last": "2024-08-04T12:05:06.0000000Z" // last transaction booking date
},
"accountFields": { // account fields, account type specific
"merchant-id": "AIXXXXXXXXSG",
"marketplace": "amazon.de",
"start-date": "2024-08-03T12:00:00.0000000Z"
},
"errors": [],
"warnings": []
}
}
}
Example with an error:
{
"id": "x9rmdjcpy6", // notification id, same as in `X-PayData-Notification-Id` header
"webhookId": "rddzhevagr", // webhook id, same as in `X-PayData-Webhook-Id` header
"eventType": "AccountUpdated", // event type, same as in `X-PayData-Event-Type` header
"eventRaisedAt": "2024-07-25T08:20:46.752678Z", // event raised timestamp
"eventData": {
"partnerId": "326vgsymrg", // partner id
"userId": "x96mdcvnzr", // user id
"accountId": "85jkt8nyc7w", // account id
"account": {
"id" : "85jkt8nyc7w", // account id
"accountTypeId": "amazon", // account type id
"name": "Amazon", // account name
"status": "ErrorCredentialsFailed", // account status
"elementStatistics": {
"count": 3, // the number of transactions
"first": "2024-08-03T12:01:02.0000000Z", // last transaction booking date
"last": "2024-08-04T12:05:06.0000000Z" // last transaction booking date
},
"accountFields": { // account fields, account type specific
"merchant-id": "AIXXXXXXXXSG",
"marketplace": "amazon.de",
"start-date": "2024-08-03T12:00:00.0000000Z"
},
"errors": [
{
"type": "CredentialsFailure",
"message": "An error occured while validating the account credentials",
"isUserActionRequired": false,
"isTemporary": false
}
],
"warnings": []
}
}
}
The notification payload you receive for the AccountCreated, AccountUpdated or AccountDeleted event types has the same data model
as the response from the CreateTestAccountCreatedEvent method.
Testing Webhooks for the AccountCreated, AccountUpdated or AccountDeleted Event Types
Use CreateTestAccountCreatedEvent,
CreateTestAccountUpdatedEvent, or
CreateTestAccountDeletedEvent — see
Test and Enable Notifications for how these
endpoints work in general. id must be a real, existing account id for your partner.
Example:
POST /testevents/accountcreated
POST /webhook/v1/testevents/accountcreated HTTP/1.1
Host: sandbox.paydata-api.com
Authorization: Bearer {PartnerToken}
Content-Type: application/json
Request Body
{
"id": "yzdmf84ktk",
"webhookIds": [
"rynxhj4fd6"
]
}
Response — HTTP/1.1 200
{
"notifications": [
{
"id": "x9rmdjcpy6",
"webhookId": "rynxhj4fd6",
"eventType": "AccountCreated",
"eventRaisedAt": "2024-07-25T08:20:46.752678Z",
"eventData": {
"partnerId": "326vgsymrg",
"userId": "x96mdcvnzr",
"accountId": "yzdmf84ktk",
"account": {
"id": "yzdmf84ktk",
"accountTypeId": "amazon",
"name": "Amazon",
"status": "Idle",
You can optionally specify values for some of the account properties to be included in the notifications — for any you omit, PayData uses the account's current values.
Example:
POST /testevents/accountupdated
POST /webhook/v1/testevents/accountupdated HTTP/1.1
Host: sandbox.paydata-api.com
Authorization: Bearer {PartnerToken}
Content-Type: application/json
Request Body
{
"id": "yzdmf84ktk",
"name": "Other account name",
"status": "ErrorCredentialsFailed",
"elementStatistics": {
"count": 111,
"first": "2024-10-27T11:11:00Z",
"last": "2025-01-10T11:11:00Z"
},
"errors": [
{
"type": "CredentialsFailure",
"message": "New logins not possible",
"providerMessage": "",
"isUserActionRequired": false,
"isTemporary": false
Response — HTTP/1.1 200
{
"notifications": [
{
"id": "x9rmdjcpy6",
"webhookId": "rynxhj4fd6",
"eventType": "AccountUpdated",
"eventRaisedAt": "2024-07-25T08:20:46.752678Z",
"eventData": {
"partnerId": "326vgsymrg",
"userId": "x96mdcvnzr",
"accountId": "yzdmf84ktk",
"account": {
"id": "yzdmf84ktk",
"accountTypeId": "amazon",
"name": "Other account name",
"status": "ErrorCredentialsFailed",