Integrating into Webhooks
Integrating into Webhooks
Use webhooks to subscribe to automated notifications (also known as events) from Finix.
When an event is triggered, Finix sends an HTTP POST request to the endpoint URL configured in the webhook. Rather than requiring your servers manually poll Finix's API to learn about changes to your resources, webhooks push notifications to the endpoint URL to notify you proactively.
With webhooks, you can keep up with asynchronous state changes. Examples of changes include:
Transferis created.Merchantis approved.Disputesare won.
Managing Webhooks via Dashboard
Finix also supports creating and updating webhooks through the Finix Dashboard. The dashboard provides the same webhook configuration options as you get via API:
- Set URL: Set the URL you'd like Finix to send webhooks to.
- Set Authentication: Choose Basic or Bearer authentication (recommended), or no authentication.
- Filter Events: Subscribe to all events, or choose the specific events you'd like to subscribe to.
- Update Webhooks: Update existing webhooks (e.g., change the URL or events).
- Disable Webhooks: Disable existing webhooks you no longer use.
Viewing Webhooks
To create or update webhooks in the dashboard, navigate to Developer > Webhooks. There, you will see a list of all webhooks you have created. You will be able to create new webhooks as well as update existing ones.
Creating Webhooks
Click Create Webhook to create a new webhook. You'll set the URL, Authentication Type, and Events you'd like to subscribe to. For the full list of events, see Webhook Events or create your own webhook with the dashboard.
Editing Webhooks
Under Developer > Webhooks, navigate to one of your webhook events to view its current settings. On that page, you can also Edit or Disable the webhook (for example, to update the events the webhook subscribes to).
Managing Webhooks via API
Finix lets you create and update webhooks with Finix's API. This can be helpful for companies that want to manage webhook through their own dashboard or developer tools.
When you create a webhook via API, Finix will send an empty test event to the endpoint URL configured in the webhook. The configured URL must respond to this event successfully to let Finix know the URL is valid, at which point Finix will enable the webhook. See Validating Webhooks for more information.
Creating Webhooks Without Authentication
For most integrations, you should create authenticated webhooks instead. Authentication adds an Authorization header that your server validates on every event, and combined with verifying the Finix-Signature header, it gives you a layered way to confirm events are coming from Finix.
Authenticate webhooks in production
Use unauthenticated webhooks only for testing your integration in Sandbox. In production, always set an authentication type so your server can verify inbound events.
To create a webhook with no authentication, send a POST request to Finix's /webhooks endpoint with just the URL.
Request to Create Webhook
curl "https://finix.sandbox-payments-api.com/webhooks" \
-u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \
-H 'Accept: application/hal+json' \
-H 'Content-Type: application/json' \
-H 'Finix-Version: 2022-02-01' \
-X POST \
-d '{"url": "https://webhook.site/73b2d0d3-8cc3-4003-857d-2e3a137887ce"}'
Created Webhook
{
"id": "WHid2GDsvQaHhnLQa1HCjNiR",
"created_at": "2024-12-31T15:11:43.41Z",
"updated_at": "2024-12-31T15:11:43.41Z",
"application": "APgPDQrLD52TYvqazjHJJchM",
"authentication": {
"type": "NONE"
},
"enabled": true,
"enabled_events": [],
"is_accepting_events": true,
"nickname": null,
"previous_secret_expires_at": null,
"secret_signing_key": "1676b0aa7f96e7f2cb3ef92ea266a13a534ad06593e930152343a36d14bdc3c5",
"url": "https://webhook.site/************************************",
"_links": {
"self": {
"href": "https://finix.sandbox-payments-api.com/webhooks/WHid2GDsvQaHhnLQa1HCjNiR"
},
"application": {
"href": "https://finix.sandbox-payments-api.com/applications/APgPDQrLD52TYvqazjHJJchM"
}
}
}
Creating Authenticated Webhooks
When creating a webhook, specify the authentication type (authentication.type) that Finix should use when sending events to the endpoint URL. When you add an authentication type, Finix will add an Authorization header to events sent to the configured endpoint URL. Your server can use the Authorization header to verify that the event came from Finix.
There are two sets of credentials at play when you create an authenticated webhook; do not mix them up:
- Your Finix API credentials authenticate the
POST /webhooksrequest to Finix. These go in the-uflag (or your client's auth config), and are the same credentials you use for any other Finix API call. - The credentials you set on the
authenticationfield of the request body are values Finix sends to your server on every event delivery. Pick values your own webhook receiver knows how to validate.
Don't put your Finix API credentials in the request body
The username/password under authentication.basic and the token under authentication.bearer are credentials your own server validates on incoming webhook events. Do not paste your Finix API key/secret here. If you reuse your Finix credentials, your receiver will be checking against the wrong values, and anyone who learns your webhook auth would also have your Finix API access.
Finix supports two authentication types:
- Basic Authentication: Finix will send the webhook event with Basic Authentication.
- Bearer Token Authentication: Finix will send the webhook with a Bearer Token.
Basic Authentication
Finix uses the standard Basic authentication format. When you set authentication.type to BASIC, each webhook event is sent with an Authorization header formatted as Authorization: Basic <Base64>.
Choose the username and password your webhook receiver expects to validate, and put them in authentication.basic. These are credentials Finix will send to your server on every event; they are not your Finix API credentials. In the example below, the placeholder values your-webhook-user and your-webhook-password should be replaced with values you control.
Request to Create Webhook with Basic Authentication
curl "https://finix.sandbox-payments-api.com/webhooks" \
-u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \
-H 'Accept: application/hal+json' \
-H 'Content-Type: application/json' \
-H 'Finix-Version: 2022-02-01' \
-X POST \
-d '{"authentication": {"type": "BASIC","basic": {"username": "your-webhook-user","password": "your-webhook-password"}},"url": "https://webhook.site/73b2d0d3-8cc3-4003-857d-2e3a137887ce"}'
In the request above, the -u flag is your Finix API credentials (used to authenticate this call to Finix). The values inside authentication.basic are credentials of your choosing that Finix will send to your webhook URL.
To create the Authorization header included in events sent to that URL, Finix:
- Combines the
usernameandpasswordwith a colon
(e.g., your-webhook-user:your-webhook-password)
2. Base64-encodes the string
(e.g., eW91ci13ZWjob29rLXVzZXI6eW91ci13ZWjob29rLXBhc3N3b3Jk)
3. Adds the value to the Authorization Header with the Basic scheme
(e.g., Authorization: Basic eW91ci13ZWjob29rLXVzZXI6eW91ci13ZWjob29rLXBhc3N3b3Jk)
Bearer Token Authentication
Finix supports sending OAuth 2.0 Bearer Tokens RFC 6750. These are opaque strings that it is up to your server to interpret. When you set authentication.type to BEARER, each webhook event is sent with an Authorization header formatted as Authorization: Bearer <your-token>.
The token you put in authentication.bearer is a value you choose that your webhook receiver validates; it is not a Finix API credential. Finix sends the token to your URL exactly as you provided it, and any further validation is up to your system.
Request to Create Webhook with Bearer Token
curl "https://finix.sandbox-payments-api.com/webhooks" \
-u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \
-H 'Accept: application/hal+json' \
-H 'Content-Type: application/json' \
-H 'Finix-Version: 2022-02-01' \
-X POST \
-d '{"authentication": {"type": "BEARER","bearer": {"token": "U3VwZXIgc2VjcmV0IGVuY29kZWQgdG9rZW4="}},"url": "https://webhook.site/73b2d0d3-8cc3-4003-857d-2e3a137887ce"}'
From this example, your server will receive events with the header authorization: Bearer U3VwZXIgc2VjcmV0IGVuY29kZWQgdG9rZW4=.
Verifying Webhook Signatures (Finix-Signature)
In addition to optional Authorization headers, every webhook event from Finix includes a Finix-Signature header that lets you verify the payload wasn’t tampered with and was sent recently.
- Header name:
Finix-Signature - Format:
timestamp=<epoch-second>, sig=<hex-encoded-hmac> - Algorithm: HMAC-SHA256 over the bytes of the string
"<timestamp>:<raw_body>" - Output encoding: lowercase hex
Example:
- Finix-Signature:
timestamp=1764948460, sig=0f0250ab7266dbe7a4d4cf7a502c9df1e76683cc739de289e30d0cc01bb8efd5
When you create a webhook, the API response includes a signing key you’ll use to validate future events:
- Example signing key:
a1fc2b789d958e8a9a3517c9c8b129d5c2cecedfc68788345aaf9a5b2a859976
To Validate a Webhook
- Read the
Finix-Signatureheader from the request. - Parse out:
timestamp(as a number of seconds since Unix epoch)sig(the hex-encoded signature)
- Ensure the timestamp is recent (for example, within 5 minutes/300 seconds) to protect against replay attacks.
- Recompute the HMAC-SHA256 of
timestamp:bodyusing the webhook’s signing key (as a UTF‑8 string). Consider the validation successful if any provided signature exactly matches your computed value (case-insensitive compare or normalize to lowercase). Use a constant-time comparison if available.
Filtering Webhooks
When configuring webhooks, customers typically subscribe to event types they are interested in and ignore those they are not. By default, newly created webhooks subscribe to a subset of events of interest to many users, such as Transfer creation and updates.
Finix supports subscribing to specific webhook events through the webhook's enabled_events field to filter events sent to your webhook server. You can provide enabled_events when creating or updating a webhook to override the default events.
Supported Webhook List
See Webhook Events for the complete list of events you can subscribe to.
Validating Webhooks
When you create a webhook via API, Finix will send an empty test event to the endpoint URL configured in the webhook. The configured URL must respond to this event successfully to let Finix know the URL is valid, at which point Finix will enable the webhook.
Disabling Webhooks
You can disable existing webhooks by setting enabled: false in PUT requests.
Delivery Attempts and Retries
When a webhook delivery fails, Finix retries the event up to 10 times using exponential backoff. Any 2xx HTTP status code counts as a successful delivery and stops further retries.
Retry Schedule
Delays between retries increase exponentially, up to a maximum of 15 minutes. Approximate times are listed below; actual delays include a small amount of jitter.
| Retry | Approximate Delay |
|---|---|
| 1 | 1 minute |
| 2 | 1.5 minutes |
| 3 | 2 minutes |
| 4 | 3 minutes |
| 5 | 5 minutes |
| 6 | 9 minutes |
| 7 | 15 minutes |
| 8 | 15 minutes |
| 9 | 15 minutes |
| 10 | 15 minutes |
Frequently Asked Questions
Can I view all the webhook events Finix has sent?
Yes, the Finix Dashboard offers a Webhooks Log that lists all the webhook events Finix has sent in the past 30 days. For more information, see Webhook Logs.
Can I manage webhooks on the Finix Dashboard?
Yes, the Finix dashboard lets you view, create, update, and disable webhooks. For more information, see Managing Webhooks via Dashboard.
Will I receive a request for each event or will I receive them in batches?
You will receive a request for each individual event. Webhooks created at the Application level receive any state change under an Application. These changes include a change in state for a Transfer, Merchant account provisioning, and `Disputes.
Is there a specific time when events get sent?
An event gets sent any time a state change occurs in our database; this helps make webhook events as real-time as possible.
What type of response should we send?
Any 2xx HTTP code will let Finix know the event got successfully received.
If we don't receive the event, will it be sent again?
Yes. If your endpoint doesn't respond or returns a non-2xx status code, Finix automatically retries up to 10 times. See Delivery Attempts and Retries for the full schedule. Once all retries are exhausted, the event will not be resent automatically. If you suspect you missed events, you can query the relevant resources directly via the Finix API to reconcile your state.