WebSocket
Register Payee
Registers a new payee.
Create a new payee record for future banking transactions.
Auth:API Key
Tags:
Banking
Payees
Command Name
RegisterPayeeCommand Arguments
| Field | Type | Required | Description |
|---|---|---|---|
ClientId | string | Required | Custom client ID for tracking (max 36 characters) Example: "my-client-123" |
Type | number | Required | Payee type (0: Individual, 1: Company) Example: 1 |
Name | string | Required | Payee first name Example: "John" |
Surname | string | Required | Payee last name Example: "Doe" |
Company | string | Required | Company name (if applicable) Example: "Acme Corp" |
Country | string | Required | Country Example: "US" |
State | string | Required | State/Province Example: "CA" |
City | string | Required | City Example: "San Francisco" |
Address | string | Required | Street address Example: "123 Main Street" |
PostalCode | string | Required | Postal/ZIP code Example: "94105" |
ClientIdRequired
Type:
string
Description:
Custom client ID for tracking (max 36 characters)
Example:
"my-client-123"TypeRequired
Type:
number
Description:
Payee type (0: Individual, 1: Company)
Example:
1NameRequired
Type:
string
Description:
Payee first name
Example:
"John"SurnameRequired
Type:
string
Description:
Payee last name
Example:
"Doe"CompanyRequired
Type:
string
Description:
Company name (if applicable)
Example:
"Acme Corp"CountryRequired
Type:
string
Description:
Country
Example:
"US"StateRequired
Type:
string
Description:
State/Province
Example:
"CA"CityRequired
Type:
string
Description:
City
Example:
"San Francisco"AddressRequired
Type:
string
Description:
Street address
Example:
"123 Main Street"PostalCodeRequired
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
executionEventsSubject
banking.payee.registeredPayee registration response
| Field | Type | Description |
|---|---|---|
httpStatusCode | number | Status code of the request (201: created successfully) |
message | string | Response message |
id | string | Unique identifier of the payee |
userId | string | User identifier associated with the payee |
type | number | Type of the payee 0→ Individual1→ Company |
name | string | First name of the payee |
surname | string | Last name of the payee |
company | string | Company name of the payee (if applicable) |
country | string | Country of the payee |
state | string | State or province of the payee |
city | string | City of the payee |
address | string | Address of the payee |
postalCode | string | Postal code of the payee |
endUserId | string | End 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