---
updatedAt: 2026-11-10T18:11:52.000Z
agentTools:
  projectIndex: https://docs.flexfactor.io/llms.txt
---

# Webhooks

Subscribe to webhooks to get updates on your transactions.

* [Create a webhook](https://docs.flexfactor.io/docs/webhooks#create-a-webhook)
  * [Set up your server](https://docs.flexfactor.io/docs/webhooks#1-setup-your-server)
  * [Subscribe to events](#2-select-the-to-event-you-want-to-subscribe-to)
  * [Webhook payloads](#3-webhook-payloads)
* [Webhook validation](https://docs.flexfactor.io/docs/webhooks#webhook-validation)
  * [Time to response](https://docs.flexfactor.io/docs/webhooks#time-to-response)
  * [FlexFactor signature](#flexfactor-signature)
  * [Hashing functions and examples](https://docs.flexfactor.io/docs/webhooks#hashing-functions-and-samples)
* [Testing webhooks](https://docs.flexfactor.io/docs/webhooks#testing-webhooks)
  * [Triggering each event](#triggering-each-event)
  * [Verifying your handler](#verifying-your-handler)

***

<br />

# Create a webhook

From your Merchant Portal, go the the section **`Developers`** > **`Webhooks`**> [**`Create`**](https://portal-sandbox.flexfactor.io/developers/webhooks/create-endpoint)

<br />

| environment | url                                                                        |
| :---------- | :------------------------------------------------------------------------- |
| Sandbox     | <https://portal-sandbox.flexfactor.io/developers/webhooks/create-endpoint> |
| Production  | <https://portal.flexfactor.io/developers/webhooks/create-endpoint>         |

<br />

<Image align="center" src="https://files.readme.io/e1d987e-webhooks.jpg" />

## 1. Setup your server

<br />

> ❗️ Webhook payload formats
>
> Note that FlexFactor webhook payloads are *not* sent in application/json format. Please ensure that your endpoint can ingest these text-based messages. The payload is in proper JSON notation, so it can be serialized and parsed upon receipt.

Enter your webhook listener URL HTTPS endpoint, and accept POST requests from our Webhooks server.

![](https://files.readme.io/4d20ab6ff4f022b8c12adba9da9385b871bf8af93fd93659741f630e65cafb0f-image.png)

<br />

<br />

<br />

> 📌 It is recommended to create one endpoint for all webhooks and not manage multiple endpoints

> ❗️ HTTPS protocol
>
> Please note that the webhook sent from our system utilizes HTTPS protocol. If your server currently operates on HTTP the webhook transmission will not be successful.

***

## 2. Select the to event you want to subscribe to

Click on the event you want to subscribe to, then click Save

![](https://files.readme.io/8e0668641fab5c9cadc223454d49f42df367d97d1f3c6f5343e52e2e60f0920e-image.png)

<br />

### Order status

Result of FlexFactor action or decision on an order.

| Event Name              | Priority                              | Description                                                                                                                                                                                                                                                                                                                           |
| :---------------------- | :------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **`order.refunded`**    | **CRITICAL**                          | **Occurs when a merchant-initiated refund is processed for the order.**                                                                                                                                                                                                                                                               |
| `order.completed`       | **Recommended**                       | Occurs when the rescue is approved and the order reaches `Completed` — on every flow, including synchronous CIT approvals and successful captures. Delivered asynchronously after the API response.                                                                                                                                   |
| `order.cancelled`       | **Recommended**                       | Occurs whenever an order is cancelled either by the system or by the merchant.                                                                                                                                                                                                                                                        |
| `order.expired`         | **Recommended**                       | Occurs when an MIT transaction could not be rescued within its rescue window (the `expiryDateUtc`, or the merchant default expiry), and when an authorization in `Capturerequired` is not captured within its capture window (5 minutes by default, adjustable per merchant). The order status resolves to `cancelled` in both cases. |
| `order.capturerequired` | Critical — Sync MIT / authorize flows | Occurs when the 'capture' flow is set for your configuration, and on all Sync MIT approvals — Sync MIT defaults to auth/capture regardless of `transactionType`. This status will also be returned by the /evaluate api response.                                                                                                     |

*See [payload examples](#payload-examples) for critical and recommended webhooks. For how each order event maps to the `GET /orders` status and the synchronous `/evaluate` response, see the transaction state model in [Workflows §3.5](https://docs.flexfactor.io/docs/workflows#35-response-envelope-and-transaction-state-model).*

<br />

### Payment status

Events related to payments

| Event Name                        | Priority                     | Description                                                                                                                                                                                                                |
| :-------------------------------- | :--------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`payment.chargeback.received`** | **CRITICAL**                 | **Triggered when a chargeback occurs by the customer's issuing bank.**                                                                                                                                                     |
| `payment.chargeback.reversed`     | **Recommended**              | Triggered when a previously received chargeback is reversed in the merchant's favor.                                                                                                                                       |
| `payment.early_warning.received`  | **Recommended**              | Triggered when an early-warning signal from the TC40 / MC SAFE feeds is received before a formal chargeback. Note: a Visa RDR resolution does not fire `order.refunded`; it is surfaced via `payment.chargeback.received`. |
| `challenge.presented`             | Critical for challenge flows | Triggered when a challenge is presented to consumer.                                                                                                                                                                       |
| `challenge.attempted`             | Critical for challenge flows | Triggered when a challenge is attempted by consumer. It doesn't indicate success or failure.                                                                                                                               |
| `challenge.passed`                | Critical for challenge flows | Triggered when consumer successfully completes a challenge.                                                                                                                                                                |
| `challenge.failed`                | Critical for challenge flows | Triggered when consumer fails to complete a challenge.                                                                                                                                                                     |

*See [payload examples](#payload-examples) for critical webhooks.*

<br />

### Application status

Events related to onboarding and application statuses. Relevant for Partner Integration.

| Event Name            | Description                                                                                                                             |
| :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
| application.submitted | Triggered when the merchant submits an application and it changes from `DRAFT` to `SUBMITTED` status                                    |
| application.canceled  | Triggered when FlexFactor cancels an application and it changes from any status to `CANCELED`                                           |
| application.approved  | Triggered when FlexFactor has approved a `SUBMITTED` application.                                                                       |
| application.declined  | Triggered when FlexFactor has declined a `SUBMITTED` application.                                                                       |
| application.converted | Triggered when an application was converted to a merchant by FlexFactor after approval, changing from `APPROVED` to `CONVERTED` status. |

> 📘 Application events use the single-L spelling `canceled`, while order events use the double-L spelling `cancelled`. This is intentional — do not "fix" one to match the other.

<br />

***

<br />

<br />

## 3. Webhook payloads

FlexFactor webhook server will send event objects to the endpoint URL set in step 1.

### Fields description

Parse the event object to handle the incoming request accordingly by extracting the relevant information:

| Field Name      | Field Type | Description                                                                         |
| :-------------- | :--------- | :---------------------------------------------------------------------------------- |
| IdempotencyKey  | Guid       | A unique ID per event delivery — use it to de-duplicate webhook processing          |
| Event           | String     | The name of the event that was triggered (in the case below, "order.completed")     |
| TimeStamp       | String     | The timestamp of when the event occurred, in ISO 8601 format                        |
| EventData       | Object     | Event-specific details — may be `null` or a populated object depending on the event |
| Mid             | Guid       | The FlexFactor merchant ID the event relates to                                     |
| Pid             | Guid       | The FlexFactor partner ID the event relates to                                      |
| ExternalOrderId | String     | An ID representing the order in the external system                                 |
| OrderId         | Guid       | A unique ID assigned by FlexFactor to identify the order                            |
| ConfirmationId  | Guid       | A unique ID assigned by FlexFactor to identify the confirmation of the order        |
| IsTestMode      | Boolean    | A flag that indicates whether the event occurred in test mode or production mode    |
| IsResent        | Boolean    | A flag that indicates whether the event was resent due to a failure                 |

<br />

### Payload examples

```json payment.chargeback.received
{
    "IdempotencyKey": "e4567890-d123-4abc-5678-4abcdef56789",
    "Event": "payment.chargeback.received",
    "TimeStamp": "2024-11-19T01:42:04.5149433Z",
    "EventData": {
        "DisputeDateTime": "2024-11-18T23:20:56Z",
        "Reason": "10.4 Dispute ref: 12345678-abcd-1234-efgh-567890abcdef",
        "TransactionId": "abcdef12-3456-7890-abcd-ef1234567890",
        "InitialTransactionReference": "00000000-0000-0000-0000-000000000000",
        "Amount": 4295,
        "Currency": "USD"
    },
    "Mid": "11223344-5566-7788-99aa-bbccddeeff00",
    "Pid": "99887766-5544-3322-1100-aabbccddeeff",
    "ExternalOrderId": "123456789012",
    "OrderId": "abcdef12-3456-7890-abcd-ef1234567890",
    "ConfirmationId": null,
    "IsTestMode": false,
    "IsResent": false
}

```
```json order.refunded
{
    "IdempotencyKey": "a1234567-b890-4cde-5678-5abcdef67890",
    "Event": "order.refunded",
    "TimeStamp": "2024-11-20T10:37:08.7405574Z",
    "EventData": {
        "Timestamp": "2024-11-20T10:37:08.6493879Z",
        "Message": "Merchant refund processed.",
        "TransactionId": "abcdef12-3456-7890-abcd-ef1234567890",
        "InitialTransactionReference": "00000000-0000-0000-0000-000000000000",
        "Amount": 8215,
        "Currency": "USD"
    },
    "Mid": "11223344-5566-7788-99aa-bbccddeeff00",
    "Pid": "99887766-5544-3322-1100-aabbccddeeff",
    "ExternalOrderId": "123456789012",
    "OrderId": "abcdef12-3456-7890-abcd-ef1234567890",
    "ConfirmationId": null,
    "IsTestMode": false,
    "IsResent": false
}

```
```json order.completed
{
    "IdempotencyKey": "a2345678-b910-4def-8123-2abcdef34567",
    "Event": "order.completed",
    "TimeStamp": "2024-11-19T18:00:00.0000000Z",
    "EventData": null,
    "Mid": "11223344-5566-7788-99aa-bbccddeeff00",
    "Pid": "99887766-5544-3322-1100-aabbccddeeff",
    "ExternalOrderId": "123456789012",
    "OrderId": "abcdef12-3456-7890-abcd-ef1234567890",
    "ConfirmationId": "12345678",
    "IsTestMode": false,
    "IsResent": true
}

```
```json order.cancelled
{
    "IdempotencyKey": "d1234567-e890-4bcd-91ef-1abcde345678",
    "Event": "order.cancelled",
    "TimeStamp": "2024-11-20T10:45:00.0000000Z",
    "EventData": null,
    "Mid": "11223344-5566-7788-99aa-bbccddeeff00",
    "Pid": "99887766-5544-3322-1100-aabbccddeeff",
    "ExternalOrderId": "123456789012",
    "OrderId": "abcdef12-3456-7890-abcd-ef1234567890",
    "ConfirmationId": null,
    "IsTestMode": false,
    "IsResent": true
}

```
```json order.expired
{
    "IdempotencyKey": "b3456789-c012-4fab-9345-3abcdef45678",
    "Event": "order.expired",
    "TimeStamp": "2024-11-19T16:30:00.0000000Z",
    "EventData": null,
    "Mid": "11223344-5566-7788-99aa-bbccddeeff00",
    "Pid": "99887766-5544-3322-1100-aabbccddeeff",
    "ExternalOrderId": "123456789012",
    "OrderId": "abcdef12-3456-7890-abcd-ef1234567890",
    "ConfirmationId": null,
    "IsTestMode": false,
    "IsResent": true
}

```

<br />

***

<br />

# Webhook validation

## Time to response

Your endpoint must instantly return a successful status code (2xx) prior to any complex logic that could cause a timeout.

If FlexFactor doesn’t instantly receive a 2xx response status code for an event, the delivery is marked as failed and is **retried** — redelivered events carry `"IsResent": true` so you can de-duplicate them on your side. If deliveries keep failing over multiple days, we email your technical contact about the misconfigured endpoint, and endpoints that continue to fail are automatically disabled.

***

<br />

## Source IP allowlist

Webhook deliveries originate from the following FlexFactor IPs. If your ingress firewall restricts inbound webhook traffic, allow these addresses in addition to verifying the HMAC signature.

| Environment | Source IPs                      |
| :---------- | :------------------------------ |
| Production  | `18.233.184.33`, `52.4.241.101` |
| Sandbox     | `35.172.5.145`, `3.211.16.180`  |

The IP allowlist is a defense-in-depth control. We also recommend verifying the `x-fc-authorization` HMAC on every received webhook (see [FlexFactor signature](#flexfactor-signature)).

<br />

## FlexFactor signature

Every event FlexFactor sends to a webhook endpoint includes a signature generated through a SHA-512 hash-based message authentication code (HMAC).

<br />

To verify that the webhook is authentic and came from FlexFactor, your service needs to recreate the same hash using the same signing secret, and compare to the signature specified in the header` x-fc-authorization`  header included in the webhook payload.

```curl Example Webhook Payload
POST /webhook HTTP/1.1
Host: example.com
Content-Type: application/json
"x-fc-authorization": "HMAC-SHA512 SignedHeaders=x-fc-nonce;x-fc-date;host;x-fc-content-sha512&Signature=+HXN8ZewgINLk+uC/UI92HSWmLK7gZOECPxOGEM91ATyfyzScMF/+osEK5B0UjO7OFqahDvesSo8jmUWMZtQnA==",
"x-fc-content-sha512": "pLs0Op5VWqQM3ZIumqC2NP6MDqcnwFN1znp/oCuw9LcYd8PtvLC8ProyPg8ZDadsRc36NskT3QGKn/PkNqwWfg==",
"x-fc-date": "Mon, 20 Mar 2023 17:16:40 GMT",
"x-fc-nonce": "5f1c2de28a76457c9cb79d1740f2260a",
"x-fc-signature": "SbzcEwAKsViWqrB8+suZMjOdadswbUjLHtIKjDQJYle31xbB8Vr0pVTDaNP28/y+NDynpyFyKKnXmWZy8uJVig==",
"content-length": "402",

{"IdempotencyKey":"c4b3a291-8d76-4e5f-a012-3b4c5d6e7f80","Event":"order.completed","TimeStamp":"2023-03-20T17:16:40.898703Z","EventData":null,"Mid":"11223344-5566-7788-99aa-bbccddeeff00","Pid":"99887766-5544-3322-1100-aabbccddeeff","ExternalOrderId":"a9735210-1349-49bf-bfde-b737dd07872a","OrderId":"ac9674ed-cbfe-49aa-bc8b-eb1d2b74c429","ConfirmationId":"22ACD1D9","IsTestMode":false,"IsResent":false}
```

> 👍 Matching hashes
>
> If the hashes match, it means that the webhook came from FlexFactor and has not been tampered with, and your service can process it.

<br />

<br />

## Hashing functions and samples

```javascript NodeJS

exports.ComputeContentHash = function (payload) {
    var crypto = require('crypto');
    var hash = crypto.createHash('sha512');
    hash.write(payload);
    hash.end();
    return hash.read().toString('base64');

}

exports.ComputeSignature = function (secret, payload) {
    var crypto = require('crypto');
    var hash = crypto.createHash('sha512');

    var secretByteArray = Buffer.from(secret, 'base64');

    var hmac = crypto.createHmac('sha512', secretByteArray);
    hmac.write(payload);
    hmac.end();
    return hmac.read().toString('base64');

}

exports.ComputeWebhookSignature = function (secret, host,
                                            content, nonce, date) {
    var contentHash = exports.ComputeContentHash(content);
    var toSign = "POST\n" + nonce + ";" + date + ";" + host + ";" + contentHash;

    return exports.ComputeSignature(secret, toSign);
}


exports.Test = function () {
    // From FlexFactor Merchant Portal
    var subscriberKey = "XRmKBxG5uvt1qWzqvp+T6CAbTo0MB89GTxXZD5cHA56RP7Mj4NbnHQOR1Y8uorUU9YQz8ujaVRUdm9vTSkPZSw==";

    // Webhook received payload
    var payload = "{\"Event\":\"order.completed\",\"TimeStamp\":\"2023-03-20T17:16:40.898703Z\",\"EventData\":null,\"ExternalOrderId\":\"a9735210-1349-49bf-bfde-b737dd07872a\",\"OrderId\":\"ac9674ed-cbfe-49aa-bc8b-eb1d2b74c429\",\"ConfirmationId\":\"22ACD1D9\",\"IsTestMode\":true,\"IsResent\":false}";

    // Merchant's Webhook endpoint host
    var host = "your.endpoint.com";

    // From webhook's headers:

    //"x-fc-nonce" header
    var nonce = "5f1c2de28a76457c9cb79d1740f2260a";

    //"x-fc-date" header
    var date = "Mon, 20 Mar 2023 17:16:40 GMT";

    //from "x-fc-authorization" header
    var flexFactorAuthorization = "HMAC-SHA512 SignedHeaders=x-fc-nonce;x-fc-date;host;x-fc-content-sha512&Signature=+HXN8ZewgINLk+uC/UI92HSWmLK7gZOECPxOGEM91ATyfyzScMF/+osEK5B0UjO7OFqahDvesSo8jmUWMZtQnA==";


    // Extracting signature from x-fc-authorization header        
    var signature = flexFactorAuthorization.substr(flexFactorAuthorization.indexOf("Signature=") + 10);

    // Calculating signature
    var recalculatedSignature = exports.ComputeWebhookSignature(subscriberKey, host, payload, nonce, date);


    var verified = recalculatedSignature == signature;

    console.log("Signature verification result: " + verified);
}

exports.Test();
```
```csharp
using System;
using System.Linq;
using System.Net.Http.Headers;
using System.Security.Cryptography;
using System.Text;
using FlexFactor.Webhooks.Services;

namespace FlexFactor.Webhooks.SignatureVerificationSample;

public static class Program
{
    public static void TestMain(string[] args)
    {
        // From FlexFactor Merchant Portal
        string subscriberKey = "XRmKBxG5uvt1qWzqvp+T6CAbTo0MB89GTxXZD5cHA56RP7Mj4NbnHQOR1Y8uorUU9YQz8ujaVRUdm9vTSkPZSw==";

        // Webhook received payload
        //var payload = message.Content.ReadAsStringAsync().Result;
        var payload = "{\"Event\":\"order.completed\",\"TimeStamp\":\"2023-03-20T17:16:40.898703Z\",\"EventData\":null,\"ExternalOrderId\":\"a9735210-1349-49bf-bfde-b737dd07872a\",\"OrderId\":\"ac9674ed-cbfe-49aa-bc8b-eb1d2b74c429\",\"ConfirmationId\":\"22ACD1D9\",\"IsTestMode\":true,\"IsResent\":false}";

        // Merchant's Webhook endpoint host
        string host = "fctestwebhook.free.beeceptor.com";

        // From webhook's headers:
        
        //var nonce = headers.GetValues("x-fc-nonce").First();
        var nonce = "5f1c2de28a76457c9cb79d1740f2260a";

        //var date = headers.GetValues("x-fc-date").First();
        var date = "Mon, 20 Mar 2023 17:16:40 GMT";

        //var var flexFactorAuthorization = headers.GetValues("x-fc-authorization").First();
        var flexFactorAuthorization = "HMAC-SHA512 SignedHeaders=x-fc-nonce;x-fc-date;host;x-fc-content-sha512&Signature=+HXN8ZewgINLk+uC/UI92HSWmLK7gZOECPxOGEM91ATyfyzScMF/+osEK5B0UjO7OFqahDvesSo8jmUWMZtQnA==";
        
        
        // Extracting signature from x-fc-authorization header        
        var signature = flexFactorAuthorization.Substring(flexFactorAuthorization.IndexOf("Signature=") + 10);

       
        // Calculating signature
        var recalculatedSignature = HMACSHA512.ComputeWebhookSignature(subscriberKey, host, payload, nonce, date);
        
        var verified = recalculatedSignature == signature;
        
        Console.WriteLine($"Signature verification result: {verified}");
    }
}

public class HMACSHA512
{
    public static string ComputeContentHash(string content, string hashAlgorithmName = "SHA512")
    {
        using (var hashAlgorithm = HashAlgorithm.Create(hashAlgorithmName))
        {
            byte[] hashedBytes = hashAlgorithm.ComputeHash(Encoding.UTF8.GetBytes(content));
            return Convert.ToBase64String(hashedBytes);
        }
    }

    public static string ComputeSignature(string stringToSign, string secret)
    {
        using (var hmacsha512 = new System.Security.Cryptography.HMACSHA512(Convert.FromBase64String(secret)))
        {
            var bytes = Encoding.UTF8.GetBytes(stringToSign);
            var hashedBytes = hmacsha512.ComputeHash(bytes);
            return Convert.ToBase64String(hashedBytes);
        }
    }

    public static string ComputeWebhookSignature(string subscriberKey, string host, 
        string payload, string nonce, string date)
    {
        var contentHash = ComputeContentHash(payload);
        var toSign = $"POST\n{nonce};{date};{host};{contentHash}";

        return ComputeSignature(toSign, subscriberKey);
    }
    
    public static bool VerifyWebhookSignature(Uri webhookEndpoint, HttpHeaders headers, 
        string payload, string subscriberKey)
    {
        var nonce = headers.GetValues("x-fc-nonce").First();
        var date = headers.GetValues("x-fc-date").First();
        var flexFactorAuthorization = headers.GetValues("x-fc-authorization").First();
        var signature = flexFactorAuthorization.Substring(flexFactorAuthorization.IndexOf("Signature=") + 10);
        
        var recalculatedSignature = HMACSHA512.ComputeWebhookSignature(subscriberKey, webhookEndpoint.Host, payload, nonce, date);

        return recalculatedSignature == signature;
    }
}
```

<br />

> ❗️ Non matching hashes
>
> If the hashes do not match, it means that the webhook payload has been modified or was not sent by FlexFactor, and your service should discard the webhook to prevent any potential security issues.

<br />

***

<br />

# Testing webhooks

All webhook testing happens in the Sandbox environment. Events generated in Sandbox carry `"IsTestMode": true` in the payload — your handler can use this flag to separate test traffic from production traffic.

## Before you start

1. Create a Sandbox webhook endpoint at [portal-sandbox.flexfactor.io](https://portal-sandbox.flexfactor.io/developers/webhooks/create-endpoint) and subscribe it to all events while testing.
2. If your firewall restricts inbound traffic, allow the Sandbox source IPs: `35.172.5.145`, `3.211.16.180`.
3. Use the [test cards](https://docs.flexfactor.io/docs/testing-scenarios-1) to drive transaction outcomes. `4000002760003184` and `4444555566660030` produce successful rescues; the challenge scenarios use `4111111111111111` with the special phone numbers listed on that page.

> 📘 Inspecting payloads
>
> Before wiring up your real handler, you can point the endpoint at a request-capture service to inspect raw payloads and headers. Switch to your real HTTPS endpoint before testing signature verification — the signed string includes your endpoint host.

<br />

## Triggering each event

### Order status events

| Event                   | How to trigger in Sandbox                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| :---------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `order.completed`       | Submit an MIT rescue: `POST /v1/evaluate` with `isMIT: true`, `isRecurring: true`, `expiryDateUtc` set, and a success test card. The call returns `SUBMITTED`; the webhook fires when the rescue is approved.                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `order.cancelled`       | Create an order as above, then call `POST /v1/orders/{id}/cancel` with an empty body `{}`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `order.expired`         | Submit an MIT rescue with `expiryDateUtc` set to a near-term timestamp. The webhook fires when the rescue window lapses without an approval. It also fires when a `CAPTUREREQUIRED` order is left uncaptured for the capture window (5 minutes by default).                                                                                                                                                                                                                                                                                                                                                                                           |
| `order.capturerequired` | Submit a rescue with `transactionType: AUTHORIZATION` and a success test card. Requires the authorize capability to be enabled on your Sandbox account — contact <integrationsupport@flexfactor.io> if it is not. Also fires on Sync MIT approvals (Sync MIT defaults to auth/capture regardless of `transactionType`); Sync MIT requires back-end configuration on your account, and the order is completed either by the next `/evaluate` call for the order or by an explicit `POST /v1/capture` — one of the two must arrive before the rescue window closes, or the order is never captured (see Sync MIT in [Workflows](https://docs.flexfactor.io/docs/workflows) §2.5). |
| `order.refunded`        | Complete a rescue, then call `POST /v1/orders/{id}/refund` with `amount` (in cents).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

<br />

### Payment status events

| Event                                                           | How to trigger in Sandbox                                                                                                                                                                                                              |
| :-------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payment.chargeback.received`                                   | Chargebacks originate from the issuing bank and cannot be triggered through the API. Contact <integrationsupport@flexfactor.io> to have a test chargeback raised against a completed Sandbox order.                                    |
| `payment.chargeback.reversed`                                   | Raised by FlexFactor when a chargeback is won — request a test reversal through <integrationsupport@flexfactor.io> alongside the test chargeback.                                                                                      |
| `payment.early_warning.received`                                | Early-warning signals (TC40 / MC SAFE) are issuer-side and cannot be triggered through the API — request a simulated alert through <integrationsupport@flexfactor.io>.                                                                 |
| `challenge.presented`                                           | Submit a CIT rescue with a [challenge test card](https://docs.flexfactor.io/docs/testing-scenarios-1) (`4111111111111111`, CVV `999`, name `Cure Tester`, one of the special phone numbers). The `/evaluate` response returns `CHALLENGE` and the webhook fires. |
| `challenge.attempted` / `challenge.passed` / `challenge.failed` | Fire as the cardholder progresses through the challenge. These require an integration that presents the challenge to the cardholder — contact FlexFactor support for guidance on driving the challenge flow in Sandbox.                |

<br />

### Application status events

Relevant for Partner Integration only.

| Event                                           | How to trigger in Sandbox                                                                                                                                                                     |
| :---------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `application.submitted`                         | Fires when the merchant submits the application — the application moves from `DRAFT` to `SUBMITTED`.                                                                                          |
| `application.canceled`                          | Fires when FlexFactor cancels the application, in any pre-conversion status. `CANCELED` is a terminal state: to try again, send a new invite with [Invite applicant](https://docs.flexfactor.io/docs/invite-applicant). |
| `application.approved` / `application.declined` | Approval and decline are FlexFactor review actions — contact <integrationsupport@flexfactor.io> to have a submitted Sandbox application approved or declined.                                 |
| `application.converted`                         | Fires when an approved application is converted to a merchant — request conversion of an approved Sandbox application through <integrationsupport@flexfactor.io>.                             |

<br />

## Verifying your handler

Work through this checklist before requesting certification:

* [ ] **Immediate 2xx** — your endpoint acknowledges before any processing logic runs.
* [ ] **Idempotent processing** — trigger the same event twice or replay a stored payload; your handler processes it once, keyed on `IdempotencyKey`.
* [ ] **Retry handling** — return a non-2xx once, confirm the event is redelivered with `"IsResent": true`, and that the redelivery is deduplicated.
* [ ] **Unknown events tolerated** — your handler acknowledges event names it does not recognize rather than erroring; new events may be added over time.
* [ ] **Test-mode separation** — `"IsTestMode": true` events never touch production order state.

> 📘 Signature verification is a recommended best practice, not a certification requirement — validate the `x-fc-authorization` HMAC with your Sandbox subscriber key (see [FlexFactor signature](#flexfactor-signature)).