Webhook Setup Guide
Before setting up your webhook subscriptions, see our Webhook Integration Best Practices.
Summary
This guide walks you through setting up webhooks to receive real-time notifications of system events. You will learn how to prepare your endpoint, subscribe to a webhook, and manage your subscriptions.
Base URL
All webhook subscription API calls use the following base URL structure. Replace tenantslug with your organization's tenant slug.
https://backoffice.infinicept.com/api/{tenantslug}/webhooks
Authentication
Webhooks support basic authentication and shared secret (plaintext) authentication methods to secure your endpoint.
Basic Authentication - Recommended as the industry standard with broad compatibility and universal tooling support.
{
"Method": 2,
"Username": "[YOUR WEBHOOK USERNAME]",
"Password": "[YOUR WEBHOOK PASSWORD]"
}Shared Secret (Plaintext) - Offers simpler implementation and testing with a single credential to manage.
{
"Method": 1,
"SharedSecret": "[YOUR WEBHOOK SHARED SECRET]"
}Prepare your endpoint
Before creating a subscription, ensure your webhook endpoint:
- Uses an HTTPS URL with a valid TLS certificate issued for its hostname. Deliveries to an endpoint with a self-signed, expired, or mismatched certificate fail.
- Is reachable at a public internet address. URLs that resolve to a loopback (such as
localhost) or link-local address are not accepted. - Can accept HTTP POST requests.
- Returns a 2xx HTTP status code for successful processing.
- Can accept the webhook's payload structure.
Infinicept checks the destination URL when you create or update a subscription, and again each time a webhook is sent. If your endpoint redirects, the redirect target must meet the same requirements.
Subscribe to a webhook
Use this request to create a webhook subscription to receive notification of certain events (based on webhook type).
Request
POST https://backoffice.infinicept.com/api/{tenantslug}/webhooks
Request body
| Field Name | Type | Required/Optional | Description |
|---|---|---|---|
| Type | integer | Required | The webhook type. Values include: 4 = Instructional Funding Submitted, 5 = Submerchant Deposit Rejected, 6 = Funding Deposit Funded, 7 = Funding Deposit Rejected, 8 = Funding Deposit Partially Rejected. |
| DestinationURL | string | Required | The URL of your webhook endpoint. It must use HTTPS and resolve to a public internet address. |
| AuthenticationMethod | object | Required | Contains the authentication method and credentials used to secure your endpoint. |
| Method | integer | Required | Values include: 0 = None, 1 = Shared Secret (Plaintext), 2 = Basic authentication |
| Username | string | Required when Method = 2 | When using Basic authentication, this is the username used for authenticating your webhook endpoint. |
| Password | string | Required when Method = 2 | When using Basic authentication, this is the password used for authenticating your webhook endpoint. |
| SharedSecret | string | Required when Method = 1 | When using Shared Secret (Plaintext) authentication, this is the shared secret used for authenticating your webhook endpoint. |
Example request
{
"Type": 6,
"DestinationURL": "https://your-domain.com/webhooks/funding-deposit-funded",
"AuthenticationMethod": {
"Method": 1,
"SharedSecret": "[YOUR WEBHOOK SHARED SECRET]"
}
}Authorization
| Required Headers | Description |
|---|---|
| x-AuthenticationKeyId | The API key id used to authenticate and authorize your request to Infinicept. API keys are managed within your Backoffice tenant. |
| x-AuthenticationKeyValue | The API key value used to authenticate and authorize your request to Infinicept. API keys are managed within your Backoffice tenant. |
Response
{
"commandFingerprint": "123e4567-e89b-12d3-a456-426614174000",
"status": 0,
"createTime": "2024-01-15T10:30:00.000Z",
"endTime": null,
"error": null,
"message": null
}Command status values
| Status | Description |
|---|---|
| 0 - Processing | The command is being executed |
| 1 - Completed | The command executed successfully |
| 2 - Failed | The command failed (check error field for details) |
| 3 - Canceled | The command was canceled before completion |
If the DestinationURL in a Subscribe or Update request does not meet the endpoint requirements, the request returns 400 Bad Request with one of the following messages. No subscription is created or changed.
| Message | Cause | Resolution |
|---|---|---|
DestinationURL must be an absolute URL. | The URL is missing its scheme or hostname, such as your-domain.com/webhooks. | Send the full URL, starting with https://. |
DestinationURL must use https. | The URL starts with http://. | Serve your endpoint over HTTPS and update the URL. |
DestinationURL must resolve to a public internet address. | The hostname or IP address resolves to a loopback or link-local address. | Use a hostname that resolves to a public internet address. |
Verify your subscription
Retrieve your subscription details to confirm it was created successfully.
Request
GET https://backoffice.infinicept.com/api/{tenantslug}/webhooks
Authorization
| Required Headers | Description |
|---|---|
| x-AuthenticationKeyId | The API key id used to authenticate and authorize your request to Infinicept. API keys are managed within your Backoffice tenant. |
| x-AuthenticationKeyValue | The API key value used to authenticate and authorize your request to Infinicept. API keys are managed within your Backoffice tenant. |
Response
[
{
"id": 4,
"type": 6,
"destinationURL": "https://your-domain.com/webhooks/funding-deposit-funded",
"authenticationMethod": 1
}| Field | Description |
|---|---|
| id | The numeric value assigned to the subscription representing the order in which the subscription was created |
| type | The integer value of the webhook type |
| destinationURL | The URL of your webhook endpoint |
| authenticationMethod | The authentication method used with your webhook subscription |
Manage your subscriptions
Use these endpoints to create and manage webhook subscriptions.
Review Webhook Subscription Details
Updated 3 days ago

