Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content-new/docs/gbp-accounts/manage-accounts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import EndpointBlock from "src/components/endpoint-block";

import WebhookPlaceholder from 'src/components/webhook-placeholder'
import WebhookSummary from 'src/components/webhook-summary'
import WebhookBlock from 'src/components/webhook-block'

## Real GBP accounts

Expand Down Expand Up @@ -48,6 +49,7 @@ The balance of a real account is also held by ClearBank and can be viewed via th

<WebhookPlaceholder render='account-created-webhook-v1' />

<WebhookBlock />

<EndpointBlock
type="get"
Expand Down
32 changes: 32 additions & 0 deletions data/webhooks/AccountClosureCompletedV1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "AccountClosureCompletedV1",
"type": "object",
"additionalProperties": false,
"required": [
"AccountId",
"ClosureReason",
"AccountModifiedDateTime"
],
"properties": {
"AccountId": {
"title": "Unique Account Id",
"type": "string",
"description": "Unique identifier for the account that was successfully closed.",
"maxLength": 36,
"minLength": 36,
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"ClosureReason": {
"title": "Account Closure Reason",
"type": "string",
"description": "Reason that the account was closed.",
"minLength": 1
},
"AccountModifiedDateTime": {
"type": "string",
"description": "Date and time the account was last modified. Time in UTC.",
"format": "date-time"
}
}
}
44 changes: 44 additions & 0 deletions data/webhooks/AccountClosureFailedV1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "AccountClosureFailedV1",
"type": "object",
"additionalProperties": false,
"required": [
"AccountId",
"ClosureReason",
"ClosureFailureReasons",
"AccountModifiedDateTime"
],
"properties": {
"AccountId": {
"title": "Unique Account Id",
"type": "string",
"description": "Unique identifier for the account that failed to close.",
"maxLength": 36,
"minLength": 36,
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"ClosureReason": {
"title": "Account Closure Reason",
"type": [
"string",
"null"
],
"description": "Reason that the account was closed."
},
"ClosureFailureReasons": {
"type": "array",
"description": "Reasons why the account failed to close.",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
},
"AccountModifiedDateTime": {
"type": "string",
"description": "Date and time the account was last modified. Time in UTC.",
"format": "date-time"
}
}
}
101 changes: 101 additions & 0 deletions data/webhooks/AccountCreatedV1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "AccountCreated",
"type": "object",
"additionalProperties": false,
"properties": {
"AccountId": {
"title": "Account Id",
"type": "string",
"description": "Unique identification of the account",
"format": "guid",
"maxLength": 36,
"minLength": 0
},
"AccountName": {
"title": "Account Name",
"type": [
"null",
"string"
],
"description": "Name of the account",
"maxLength": 128,
"minLength": 0
},
"AccountHolderLabel": {
"title": "Account Holder Label",
"type": [
"null",
"string"
],
"description": "The account description",
"maxLength": 140,
"minLength": 0
},
"AccountIdentifiers": {
"title": "Account Identifiers",
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/AccountIdentifiers"
}
]
},
"TimestampCreated": {
"title": "Timestamp Created",
"type": "string",
"description": "Date and Time account created. Time in UTC.",
"format": "date-time"
},
"AccountType": {
"title": "Account Type",
"$ref": "#/definitions/AccountType"
}
},
"definitions": {
"AccountIdentifiers": {
"type": "object",
"additionalProperties": false,
"properties": {
"IBAN": {
"title": "IBAN",
"type": [
"null",
"string"
],
"maxLength": 34,
"minLength": 0
},
"BBAN": {
"title": "BBAN",
"type": [
"null",
"string"
],
"maxLength": 30,
"minLength": 0
}
}
},
"AccountType": {
"type": "string",
"description": "",
"x-enumNames": [
"CurrentAccount",
"DepositAccount",
"ControlAccount",
"SegregatedClientAccount",
"InstitutionAccount"
],
"enum": [
"CurrentAccount",
"DepositAccount",
"ControlAccount",
"SegregatedClientAccount",
"InstitutionAccount"
]
}
}
}
51 changes: 51 additions & 0 deletions data/webhooks/AccountDisabledV1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "AccountDisabled",
"type": "object",
"additionalProperties": false,
"properties": {
"AccountId": {
"title": "Account Id",
"type": "string",
"description": "Unique identification of the account",
"format": "guid",
"maxLength": 36,
"minLength": 0
},
"DisabledReason": {
"title": "Disabled Reason",
"description": "Reason account is disabled",
"oneOf": [
{
"$ref": "#/definitions/AccountDisabledReason"
}
]
},
"DisabledTimestamp": {
"title": "Disabled Timestamp",
"type": "string",
"description": "Date and Time account disabled. Time in UTC.",
"format": "date-time"
}
},
"definitions": {
"AccountDisabledReason": {
"type": "string",
"description": "",
"x-enumNames": [
"AccountClosed",
"AccountSuspended",
"AccountHoldersDeceased",
"AccountHoldersBankrupt",
"AccountSwitched"
],
"enum": [
"AccountClosed",
"AccountSuspended",
"AccountHoldersDeceased",
"AccountHoldersBankrupt",
"AccountSwitched"
]
}
}
}
Loading