Skip to main content

AccountTypeUpdated Event

An account type has been updated with new state information.

warning

Only changes to the state, errors and warnings trigger the notification.

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": "AccountTypeUpdated", // same as in `X-PayData-Event-Type` header
"eventRaisedAt": "2024-07-25T08:20:46.752678Z", // event raised timestamp
"eventData": {
"partnerId": "326vgsymrg", // partner id
"accountType": {
"id" : "stripe_api", // account type id
"name": "Stripe", // account type name
"deprecated": false,
"connectionTestSupported": false,
"accountFields": [
// the account fields
],
"transactionFields": [
// the transaction fields
],
"logos": {
"Standard": "https://paydatapublic.blob.core.windows.net/images/accounts/stripe.png",
"Gray": "https://paydatapublic.blob.core.windows.net/images/accounts/stripe_gray.png",
"Svg": "https://paydatapublic.blob.core.windows.net/images/accounts/stripe.svg"
},
"helpUrls": {},
"state": "Ok", // account type state
"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": "AccountTypeUpdated", // same as in `X-PayData-Event-Type` header
"eventRaisedAt": "2024-07-25T08:20:46.752678Z", // event raised timestamp
"eventData": {
"partnerId": "326vgsymrg", // partner id
"accountType": {
"id" : "stripe_api", // account type id
"name": "Stripe", // account type name
"deprecated": false,
"connectionTestSupported": false,
"accountFields": [
// the account fields
],
"transactionFields": [
// the transaction fields
],
"logos": {
"Standard": "https://paydatapublic.blob.core.windows.net/images/accounts/stripe.png",
"Gray": "https://paydatapublic.blob.core.windows.net/images/accounts/stripe_gray.png",
"Svg": "https://paydatapublic.blob.core.windows.net/images/accounts/stripe.svg"
},
"helpUrls": {},
"state": "Degraded", // account type state
"errors": [
{
"type": "LoginFailure",
"message": "New authentications with the provider are not possible",
"isUserActionRequired": false,
"isTemporary": true
}
],
"warnings": []
}
}
}

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

Testing Webhooks for the AccountTypeUpdated Event Type​

Use CreateTestAccountTypeUpdatedEvent — see Test and Enable Notifications for how these endpoints work in general. id must be a real account type id, available to your partner.

Example:

POST /testevents/accounttypeupdated
POST /webhook/v1/testevents/accounttypeupdated HTTP/1.1
Host: sandbox.paydata-api.com
Authorization: Bearer {PartnerToken}
Content-Type: application/json
Request Body
{
"id": "stripe_api",
"webhookIds": [
"rynxhj4fd6"
]
}
Response — HTTP/1.1 200
{
"notifications": [
{
"id": "x9rmdjcpy6",
"webhookId": "rynxhj4fd6",
"eventType": "AccountTypeUpdated",
"eventRaisedAt": "2024-07-25T08:20:46.752678Z",
"eventData": {
"partnerId": "326vgsymrg",
"accountType": {
"id": "stripe_api",
"name": "Stripe",
"deprecated": false,
"connectionTestSupported": false,
"accountFields": [],
"transactionFields": [],

You can optionally specify values for state, errors or warnings account type properties to be included in the notifications. For properties, for which you do not provide values, current values from the account type will be used.

Example:

POST /testevents/accounttypeupdated
POST /webhook/v1/testevents/accounttypeupdated HTTP/1.1
Host: sandbox.paydata-api.com
Authorization: Bearer {PartnerToken}
Content-Type: application/json
Request Body
{
"id": "stripe_api",
"state": "Down",
"errors": [
{
"type": "CredentialsFailure",
"message": "New logins not possible",
"providerMessage": "",
"isUserActionRequired": false,
"isTemporary": false
}
],
"warnings": [
{
"type": "ImportFailure",
"message": "Some imports fail for unknown reason",
Response — HTTP/1.1 200
{
"notifications": [
{
"id": "x9rmdjcpy6",
"webhookId": "rynxhj4fd6",
"eventType": "AccountTypeUpdated",
"eventRaisedAt": "2024-07-25T08:20:46.752678Z",
"eventData": {
"partnerId": "326vgsymrg",
"accountType": {
"id": "stripe_api",
"name": "Stripe",
"deprecated": false,
"connectionTestSupported": false,
"accountFields": [],
"transactionFields": [],