Overview

A beneficiary represents an individual or entity added by a customer to receive funds. Beneficiaries are typically used for payouts, transfers, or automated disbursements. This API allows you to create, retrieve, update, list, and delete beneficiaries, enabling smooth management of payout recipients within your system.


Create Beneficiary

Use Case

Create a new beneficiary so the user can save recipient details and use them later for payouts or transfers.

Beneficiary API Endpoints

Create Beneficiary Request
1
companyIdstringRequired

The unique ID of the company that owns the beneficiary. Used to associate the beneficiary with the correct company account.

2
typestringRequired

The type of beneficiary, e.g., 'bank'. Determines how the funds will be transferred.

3
namestringRequired

The name of the beneficiary. Helps identify the recipient for transfers and payouts.

4
account_numberstringRequired

The bank account number of the beneficiary. Required for processing bank transfers.

5
bank_codestringRequired

The code identifying the beneficiary's bank. Ensures funds are routed to the correct bank.

6
account_namestringRequired

The full name of the beneficiary as registered with the bank. Used to verify the account holder.

7
createdBystring

The unique ID of the user who created the beneficiary. Useful for auditing and tracking purposes.

Create Beneficiary Payload

Create Beneficiary Response
1
successboolean

Indicates whether the API request was successful. `true` means the beneficiary was created without errors.

2
messagestring

A human-readable message describing the result of the operation, useful for display in UI or logging.

3
idstring

The unique ID of the newly created beneficiary, used to reference this beneficiary in future API calls.

4
company_idstring

The ID of the company associated with the beneficiary, linking the record to a specific company account.

5
typestring

The type of beneficiary, e.g., 'bank'. Determines the method of fund transfer or payout.

6
dnamestring

The name of the beneficiary. Helps identify the recipient and display in reports or transaction history.

7
account_namestring

The full name of the beneficiary as registered with the bank, used to validate the account details.

8
account_numberstring

The bank account number of the beneficiary, required for processing bank transfers.

9
bank_codestring

The code identifying the beneficiary's bank, ensuring the funds are routed correctly.

10
is_blacklistedboolean

Indicates if the beneficiary is blacklisted. Blacklisted beneficiaries cannot receive transfers until unblocked.

11
is_activeboolean

Indicates if the beneficiary is currently active. Only active beneficiaries can receive payouts.

12
created_bystring

The ID of the user who created the beneficiary, useful for auditing and tracking purposes.

13
created_atstring

The timestamp when the beneficiary was created, formatted in ISO 8601 standard.

14
updated_atstring

The timestamp when the beneficiary was last updated, used to track modifications.

15
request_idstring

A unique ID for tracking the API request, helpful for debugging or support inquiries.

16
timestampstring

The timestamp when the response was generated, indicating the exact time of the API operation.

Create Beneficiary Response

Get Beneficiaries

Use Case

Retrieve a list of all beneficiaries associated with a company. This is useful for displaying saved recipients in a dashboard, selecting a beneficiary for transfers or payouts.

Get Beneficiaries

Create Beneficiary Response
1
successboolean

Indicates whether the API request was successful. `true` means the beneficiaries were retrieved without errors.

2
messagestring

A human-readable message describing the result of the operation, useful for display or logging.

3
idstring

The unique identifier of the beneficiary.

4
company_idstring

The ID of the company that owns the beneficiary, linking the record to the correct company account.

5
typestring

The type of beneficiary, e.g., 'bank'. Determines the method used for transfers or payouts.

6
namestring

The name of the beneficiary. Used for display in lists and to identify the recipient.

7
destinationobject

An object containing the bank account details of the beneficiary, including `account_name`, `account_number`, and `bank_code`.

8
account_namestring

The full name of the beneficiary as registered with the bank. Used to verify the account.

9
account_numberstring

The bank account number of the beneficiary, required for processing transfers.

10
bank_codestring

The code identifying the beneficiary's bank, ensuring funds are routed correctly.

11
is_blacklistedboolean

Indicates if the beneficiary is blacklisted. Blacklisted beneficiaries cannot receive transfers until unblocked.

12
is_activeboolean

Indicates if the beneficiary is currently active. Only active beneficiaries can receive funds.

13
created_bystring

The ID of the user who created the beneficiary. Useful for auditing and tracking purposes.

14
created_atstring

The timestamp when the beneficiary was created, formatted in ISO 8601 standard.

15
updated_atstring

The timestamp when the beneficiary was last updated, formatted in ISO 8601 standard.

16
totalnumber

Total number of beneficiaries available in the system.

17
limitnumber

The number of beneficiaries returned in this response, useful for pagination.

18
offsetnumber

The starting index of the beneficiaries in this response, useful for pagination.

19
request_idstring

A unique ID for tracking the API request, useful for debugging or support.

20
timestampstring

The timestamp when the response was generated, indicating the exact time of the API operation.

List Beneficiaries Response

Get Beneficiary By ID

Use Case

Retrieve all beneficiaries associated with a company. This allows users to view saved recipients, check account details, verify activation status, and select a beneficiary for transfers or payouts.

Get Beneficiary By ID

Beneficiary Example Payload
1
namestring

The name of the beneficiary or bank. Used to identify the recipient.

2
account_numberstring

The bank account number of the beneficiary. Required for transfers.

3
bank_codestring

The bank code identifying the beneficiary's bank. Ensures funds are routed correctly.

4
account_namestring

The full name of the beneficiary as registered with the bank.

5
is_blacklistedboolean

Indicates if the beneficiary is blacklisted. Blacklisted beneficiaries cannot receive transfers.

Beneficiary Example Payload

Get Beneficiary By ID Response
1
successboolean

Indicates whether the API request was successful. `true` means the beneficiary was updated successfully.

2
messagestring

A human-readable message describing the result of the operation.

3
idstring

The unique identifier of the updated beneficiary.

4
company_idstring

The ID of the company associated with the beneficiary.

5
typestring

The type of beneficiary, e.g., 'bank'.

6
namestring

The name of the beneficiary or bank. Used to identify the recipient.

7
account_namestring

The full name of the beneficiary as registered with the bank.

8
account_numberstring

The bank account number of the beneficiary.

9
bank_codestring

The code identifying the beneficiary's bank.

10
is_blacklistedboolean

Indicates if the beneficiary is blacklisted. Blacklisted beneficiaries cannot receive transfers.

11
is_activeboolean

Indicates if the beneficiary is currently active. Only active beneficiaries can receive funds.

12
created_bystring

The ID of the user who created the beneficiary.

13
created_atstring

The timestamp when the beneficiary was created.

14
updated_atstring

The timestamp when the beneficiary was last updated.

15
request_idstring

A unique ID for tracking the API request.

16
timestampstring

The timestamp when the response was generated.

Update Beneficiary Response

Webhooks

Learn how to listen for transactions that happen on your account

A webhook is a URL on your server where we send payloads for transaction events. For example, if you implement webhooks, we will immediately notify your server with a btc.lightning.received.success event Once a lightning payment is received. Whenever you receive a webhook notification from us, return a 200 OK to avoid resending the same event again from our server.


Verifying Events

Verifying that these events come from Bitnob is necessary to avoid creating transactions due to a fraudulent event.

To verify events, validate the x-bitnob-signature header sent with the event. The HMAC SHA512 signature is the event payload signed with your secret key.

Notification Retries

When posting notifications, we expect to receive a 200 response code from you. If the response code is not 200, we retry sending the event 3 times after the first failure.

This way, whenever you experience downtime on your end, your updates will still be sent.

Don't rely on webhooks entirely

Note

We recommend that you set up a service to always query transactions, in the event that webhooks keep failing.

Testing Webhooks

Since notifications must always be available on a publicly accessible URL, you are likely to run into issues while starting to build your application in a local environment. You can easily get around this by using a tool like ngrok or localtunnel

Create a tunnel, and update the new webhook URL setting on your dashboard. Only do this in your test environment to avoid leaking data to the public.

Verify Bitnob Webhook (Node.js - Express)

Beneficiary Webhooks

Beneficiary webhooks are fired when a customers adds a beneficiary

This webhook is fired when a created beneficiary is ready to receive funds.

1
eventString

The name of the webhook event that was triggered. In this case, it indicates that a beneficiary's status has changed (e.g., 'beneficiary.status.changed').

2
idUUID

A unique identifier for the beneficiary object. This ID can be used to retrieve more details about the beneficiary or to reconcile data with your internal records.

3
statusString

Represents the current state of the beneficiary. For example, 'pending' if the beneficiary is being processed, or 'success' if the beneficiary is ready to receive funds.

4
referenceString

A unique string used to link this webhook notification to the original beneficiary creation request.

5
callbackUrlString or null

An optional URL that was provided during the beneficiary creation process for receiving callbacks. If set, the system may attempt to notify this URL after processing is complete. If not provided, this will be null.

6
companyIdUUID

The unique identifier of the company to which the beneficiary belongs. This value can help you ensure the webhook data is scoped correctly to the right organization within a multi-tenant system.

beneficiary.status.changed

Beneficiary Status Pending

This webhook is fired immediately after a new beneficiary is added.

1
eventString

Indicates the type of webhook event triggered. In this case, it signifies that the beneficiary status is in a 'pending' state after being added.

2
companyIdUUID

The unique identifier of the company that owns or initiated the creation of the beneficiary.

3
idUUID

A unique identifier assigned to the newly added beneficiary for tracking and reference purposes.

4
referenceString

A unique reference string used to trace and identify the specific beneficiary setup request.

5
statusString

Represents the current status of the beneficiary setup. Typically set to 'pending' at this stage until processing is complete.

beneficiary.status.pending

Beneficiary Status Success

This webhook is fired when the beneficiary has been added successfully.

1
eventString

Specifies the webhook event type. In this case, it confirms the beneficiary was successfully added.

2
companyIdUUID

A unique identifier for the company that owns or added the beneficiary.

3
idUUID

The unique ID assigned to the beneficiary. Useful for lookup or future reference.

4
referenceString

A unique string used to track and identify the beneficiary setup request.

5
statusString

The current state of the beneficiary. For successful creation, this will be 'success'.

6
callbackUrlString or null

An optional URL provided to receive asynchronous updates about the beneficiary setup outcome.

beneficiary.status.success

Did you find this page useful?

Join our Discord