Webhook

Our webhook system will help you be notified with some actions in our API system. Set webhook URL using endpoint below, and listen for events.

Set Webhook

  • PUT /customer/webhook Set up webhook URL
    • Parameters: No parameters
    • Request body:
      • Example Value
      • Schema
      {
        "Success"
      }
    • Responses:
      400
      • Example Value
      • Controls
      • Accept
      • Header

      Bad request

      401
      • Example Value
      • Controls
      • Accept
      • Header

      Unauthorized

    • Parameters: No parameters
    • Request body:
      • Example Value
      • Schema
      {
        "url": "https://example.com",
      }
      {
        "url": "https://example.com",
      }

Get webhook URL

  • GET /customer/webhook
    • Parameters: No parameters
    • Responses:
      200
      • Example Value
      • Controls
      • Accept
      • Header

      {
      "url": "https://example.com",
      }

      400
      • Example Value
      • Controls
      • Accept
      • Header

      Bad request

      401
      • Example Value
      • Controls
      • Accept
      • Header

      Unauthorized

Remove

  • DELETE /customer/webhook
    • Parameters: No parameters
    • Responses:
      200
      • Example Value
      • Controls
      • Accept
      • Header

      “Success”

      400
      • Example Value
      • Controls
      • Accept
      • Header

      Bad request

      401
      • Example Value
      • Controls
      • Accept
      • Header

      Unauthorized

    • Parameters: No parameters

Webhook Events

 

Here’s the table

Event Entity Payload
Enduser status changed Enduser

{
   type: 'enduser',
   action: 'change-status',
   data: {
       enduserId: '4421d08b-333e-4455-b78f-4dc34c641715',
       oldStatus: 'kyc_rejected',
        newStatus: 'active'
}
Account created (‘eur’) / Account become active Account

{ 
 type: 'account',
  action: 'create',
  data: {
    virtualAccountId: 'f9796047-ba86-4530-990e-c99a08e6c1b7',
    account_type: 'virtual',
    partnerProduct: 'Clearbank-GBP',
    bban: 'BLFN04135000092437',
    real_account_id: 'f09d8706-b07d-4c43-8b27-6a8f1a5004be',
    accountNumber: '00092437',
    sortCode: '041350',
    accountStatus: 'active',
    createdAt: '2022-02-07T14:08:49.159Z',
    balance: 0,
    ownerName: 'Olena Test',
    provider: 'сlearbankVirtualGBP',
    iban: 'GB07BLFN04135000092437',
    customerId: 'd91c9f60-8761-408c-81c5-6e6f9dacba9c',
    externalIdentifier: '0edd1ac6b160adfa71f90db7a9a8122b',
    ledgerType: 'ledger-type-personal',
    currency: 'gbp',
    enduserId: '4e5f36ba-2ba1-4616-a904-00d8539324ae',
    id: '0edd1ac6b160adfa71f90db7a9a8122b',
    accountId: '0edd1ac6b160adfa71f90db7a9a8122b'
}
Enduser status changed Enduser

{
   type: 'enduser',
   action: 'change-status',
   data: {
       enduserId: '4421d08b-333e-4455-b78f-4dc34c641715',
       oldStatus: 'kyc_rejected',
        newStatus: 'active'
}
Account’s balance changed Account

{
  type: 'account',
  action: 'change-balance',
  data: {
    oldBalance: '0',
    newBalance: '10',
    accountId: '52d0f141e3430d0af36535fcc27c1c5c',
    enduserId: '0fb4f5bb-5641-4bf6-af70-afc64ebeb6f6'
  }
}
Account’s status changed Account

{ 
type: 'account',
  action: 'change-status',
  data: {
    oldStatus: 'active',
    newStatus: 'closed',
    accountId: 'c53d75752a53041a0c5268f413995973',
    enduserId: '0fb4f5bb-5641-4bf6-af70-afc64ebeb6f6'
  }
}
Create/update transaction (internal/external) Transaction

{
  type: 'transaction',
  action: 'update',
  data: {
    created_at: '2022-02-07T11:38:26.836Z',
    availableBalance: 10,
    paymentType: 'internal',
    reference: 'Initial topup',
    transactionMethod: 'FastPayments',
    debtor: {
      BBAN: 'BLFN04135000028179',
      OwnerName: 'Not Provided',
      IBAN: 'GB31BLFN04135000028179',
      InstitutionName: 'Blackthorn Finance Limited',
      TransactionOwnerName: 'LEHA BILOUS-DEBTOR'
    },
    customerId: 'd91c9f60-8761-408c-81c5-6e6f9dacba9c',
    details: {
      Status: 'Settled',
      "Account": {
          "BBAN": "BLFN04135000092393",
          "OwnerName": "NAZAR VYN",
          "IBAN": "GB31BLFN04135000092393",
           "InstitutionName": "Blackthorn Finance Limited",
           "TransactionOwnerName": "Nazar Vyn"
      },,
      Scheme: 'Transfer',
      DebitCreditCode: 'Credit',
      Reference: 'Initial topup',
      Amount: 10,
      TransactionId: '89a42e11-2544-469f-b746-f104cef1e05e',
      IsReturn: false,
      CurrencyCode: 'GBP',
      TimestampCreated: '2022-02-07T11:38:31.357Z',
      "CounterpartAccount": {
           "BBAN": "BLFN04135000028179",
           "OwnerName": "Not Provided",
           "IBAN": "GB31BLFN04135000028179",
            "InstitutionName": "Blackthorn Finance Limited",
           "TransactionOwnerName": "LEHA BILOUS-DEBTOR"
      },
      EndToEndTransactionId: '1eef3b6a1256220231362a333e43c178',
      TimestampSettled: '2022-02-07T11:38:31.687Z',
      ActualEndToEndTransactionId: '341be3349ef34f8fbe1020220207826041350'
    },
    id: 'e1fe1eaa-d86d-4be6-a62a-ab4451791df9',
    amount: 10,
    transactionStatus: 'Settled',
    assetType: 'gbp',
    ledgerId: '0d13420e13bfb53e76899ca18d63b2fc',
    transactionType: 'credit',
    iban: 'GB31BLFN04135000092393',
    transactionSchema: 'Transfer',
    creditor: {
      BBAN: 'BLFN04135000092393',
      OwnerName: 'NAZAR VYN',
      IBAN: 'GB31BLFN04135000092393',
      InstitutionName: 'Blackthorn Finance Limited',
      TransactionOwnerName: 'Nazar Vyn'
    },
    enduserId: '22eb3015-c8df-40ee-a108-32003c876fc5',
    debtorEnduserId: '46ecee06-130c-46fe-8fc3-45df6dfa5ee0'
  }