Hercle
WebSocket

Register Payee

Registers a new payee.

Create a new payee record for future banking transactions.

Auth:API Key
Tags:
Banking
Payees
Command Name
RegisterPayee

Command Arguments

ClientId
Required
Type:
string
Description:

Custom client ID for tracking (max 36 characters)

Example: "my-client-123"
Type
Required
Type:
number
Description:

Payee type (0: Individual, 1: Company)

Example: 1
Name
Required
Type:
string
Description:

Payee first name

Example: "John"
Surname
Required
Type:
string
Description:

Payee last name

Example: "Doe"
Company
Required
Type:
string
Description:

Company name (if applicable)

Example: "Acme Corp"
Country
Required
Type:
string
Description:

Country

Example: "US"
State
Required
Type:
string
Description:

State/Province

Example: "CA"
City
Required
Type:
string
Description:

City

Example: "San Francisco"
Address
Required
Type:
string
Description:

Street address

Example: "123 Main Street"
PostalCode
Required
Type:
string
Description:

Postal/ZIP code

Example: "94105"

Command Invocation

Command Arguments Example:
[
  "my-client-123",
  1,
  "John",
  "Doe",
  "Acme Corp",
  "US",
  "CA",
  "San Francisco",
  "123 Main Street",
  "94105"
]
Invocation Example:
connection.invoke('RegisterPayee', 'my-client-123', 1, 'John', 'Doe', 'Acme Corp', 'US', 'CA', 'San Francisco', '123 Main Street', '94105')

Response Event

Event Name
executionEvents
Subject
banking.payee.registered
FieldTypeDescription
httpStatusCodenumberStatus code of the request (201: created successfully)
messagestringResponse message
idstringUnique identifier of the payee
userIdstringUser identifier associated with the payee
typenumber
Type of the payee
0Individual
1Company
namestringFirst name of the payee
surnamestringLast name of the payee
companystringCompany name of the payee (if applicable)
countrystringCountry of the payee
statestringState or province of the payee
citystringCity of the payee
addressstringAddress of the payee
postalCodestringPostal code of the payee
endUserIdstringEnd user ID associated with the payee (if applicable)

Example Response

{
  "data": {
    "httpStatusCode": 201,
    "message": "",
    "id": "id-001",
    "userId": "user-123",
    "type": 0,
    "name": "John",
    "surname": "Doe",
    "company": "Acme Corp",
    "country": "US",
    "state": "CA",
    "city": "San Francisco",
    "address": "123 Main Street",
    "postalCode": "94105",
    "endUserId": ""
  }
}

Code Examples

const signalR = require('@microsoft/signalr');

const apiKey = 'YOUR_API_KEY_HERE';
const connection = new signalR.HubConnectionBuilder()
  .withUrl('https://publicapi.sandbox.hercle.financial/ExecutionLiveServer/v1', {
    accessTokenFactory: () => apiKey,
  })
  .build();

connection.start()
  .then(() => {
    console.log('Connected to WebSocket');
    
    // Invoke command
    connection.invoke('RegisterPayee', "my-client-123", 1, "John", "Doe", "Acme Corp", "US", "CA", "San Francisco", "123 Main Street", "94105")
      .then(() => {
        console.log('Command sent successfully');
      })
      .catch(err => {
        console.error('Command failed:', err);
      });
  })
  .catch(err => {
    console.error('Connection failed:', err);
  });

// Listen for events
connection.on('executionEvents', (data) => {
  console.log('Received event:', data);
});

SignalR API Tester

Test this command in the sandbox environment

Disconnected

Your API key is only used locally and never stored

Event Log

No events yet. Connect and invoke a command to see events.