Reference

Webhooks

Let us notify your website or application when a transaction you're waiting for occurs.

Plan Requirements

Webhooks are available on all paid FluxRPC plans. Paid plans may create up to 5 webhooks.

How Webhooks Work

Webhooks trigger a notification (a HTTP POST) to your application when specific Solana public keys are mentioned in a transaction. For example, if you configure a webhook pointing to https://myapplication.com/webhook using your wallet public key, any time your wallet is mentioned by a transaction, we will send that transaction to that URL.

This is useful (for example) when recording payments made to your application's wallet.

Retry Attempts

On failure to contact your website, webhooks will retry. Each webhook will make 5 attempts, with logarithmic falloff.

We do not automatically disable failing webhooks.

Rate Limits

Each webhook may have at most 100 pending notifications. Any further notifications will be dropped. Make sure your website can receive and process notifications promptly!

Processing large volumes

If you need to process large amounts of transaction data, generally you will want to use WebSockets or Yellowstone streaming rather than webhooks.

Setting Up a Webhook

Your webhooks live in the Webhooks page of the dashboard. Select Create Webhook to open the form.

The Webhooks page in the FluxRPC dashboard, with the Create Webhook button and an existing webhook listed below
Each webhook shows its name, destination URL, and how many accounts it watches.

A webhook requires the following information to set up:

  1. A name
  2. A URL, which must begin with http:// or https://. You may use IP addresses, and specify specific ports.
  3. At least one public key to watch. You may enter up to 255 public keys per webhook (one per line).

Optionally, you may include:

  1. An authentication header, which will be included in the webhook. This is so that you can authenticate the POST request from FluxRPC. This field is the name of the header (e.g. X-Authentication ).
  2. An authentication value, which will be included in the webhook. This is the actual value your application uses to authenticate the webhook.
The Create webhook dialog with the Name, Webhook URL, Auth Header, Auth Value, and Accounts fields
Fields marked with an asterisk are required. Enter one public key per line in Accounts.

Security

For security reasons, it's strongly recommended to use HTTPS and an authentication header + value.

Setup is free

Creating, updating or deleting a webhook does not consume any bandwidth from your account. You are only charged for the data the webhook delivers!

Testing Your Webhook

Once the webhook is created, select Update on it to reopen it — the details view has a Send test button. This will cause us to send a HTTP POST request to the URL you specified, so you can test your setup. This is rate-limited to one request per second to prevent abuse.

The Webhooks page with the Update button on a webhook highlighted
Select Update on the webhook you want to test.
The webhook details dialog showing the Delete, Send test, and Update buttons
Send test sits next to Delete and Update — the details view is also where you edit a webhook's URL, authentication, and the accounts it watches.

Example Payload

This is an example of what the webhook payload your website receives will look like:

Webhook Payload
JSON
{
"message": {
"accountKeys": [
"So11111111111111111111111111111111111111112",
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
],
"addressTableLookups": [],
"header": {
"numReadonlySignedAccounts": 0,
"numReadonlyUnsignedAccounts": 3,
"numRequiredSignatures": 1
},
"instructions": [
{
"accounts": [
0,
1
],
"data": "3Bxs4ThwQbE4vyj7",
"programIdIndex": 2
}
],
"recentBlockhash": "GHtXQBsoZHVnNFa9YhV7UhDiqoNKBt15kjzR46LnBRVn"
},
"signatures": [
"4VBbzFMRFWoKi2KVPxJYbxfLs35gXcPRBMnN3EhRTFbXpKgAHFB2jMwftRBDFP9gFBM4vSgNkSaZGo7xBH8ftuo"
]
}