# Stripe Checkout Webhook Reconciliation (`satisfied_laptop/webhook-incident-reconciliation`) Actor

Compare normalized checkout.session.completed deliveries with fulfilment records. Identify repeated deliveries, possible duplicate effects and missing observations by cutoff. $1 per completed supported report. MCP: https://apify.com/satisfied_laptop/webhook-incident-reconciliation/api/mcp

- **URL**: https://apify.com/satisfied_laptop/webhook-incident-reconciliation.md
- **Developed by:** [11](https://apify.com/satisfied_laptop) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / webhook incident report

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Webhook Incident Reconciliation

### Run the synthetic example

The default input has **Example only** enabled. Leave all prefilled values unchanged and run it to see one clearly labeled synthetic example in **Results**. It evaluates the bundled normalized fixture, requests no `incident-report` event, and creates no paid `REPORT` or completion `OUTPUT`. Platform usage is separate. This demonstration is available to everyone; it is not a special path that detects automated checks. Its success is not evidence of a customer incident or paid delivery.

For your own records, disable **Example only**, replace `requestId` and `incidentJson`, enable restricted resource access **before submitting input**, and acknowledge that setting. Example mode rejects edited or mixed inputs. Existing API requests containing the original three fields still select the real-report path; `exampleOnly: false` is optional. Real supported reports retain the USD1 completion price and original recovery rules. No privacy acknowledgement is pre-checked.

The synthetic Results append is attempted at most once, with retries disabled. The run succeeds only after reading back the exact row. After an uncertain append or read, confirmation permits at most two additional read-only observations within the same 20-second deadline. Dataset count metadata may lag the returned rows; extra or mismatched rows are refused. An uncertain append stops the run; recovery may confirm the original row but never appends again.

This Actor produces one evidence report from supplied normalized records for `checkout.session.completed` deliveries and recorded effects. You supply an explicit cutoff, completeness declarations, eligibility and an at-most-one-effect policy. The report distinguishes repeated delivery, potential duplicate effects, missing observations by cutoff, pending deadlines and unresolved evidence, with references into your supplied records. JSON references address the parsed incidentJson document, not the outer Actor input envelope.

The product event price is **$1 per completed supported incident report**, including a report that finds no issue or concludes that supplied evidence is unresolved. One supported completion records one incident-report event. This event record is not a final invoice; review the platform’s displayed pricing and charge limit before starting.

### Prepare one incident

Submit exactly `requestId`, `incidentJson` and `privateAccessAcknowledged`. `requestId` contains 8–80 ASCII letters, digits, underscores or hyphens. `incidentJson` is a JSON **string** so duplicate keys remain detectable by the strict parser. Its UTF-8 bytes and canonical parsed content must each fit 131072 bytes. It contains 1–100 object policies and at most 100 deliveries and 100 effects. Unknown fields are refused at every level.

Use opaque synthetic or pseudonymous references only. Exclude credentials, webhook signatures, names, email addresses and personal or arbitrary event payloads. An opaque ID can still identify a record to you; keep it private. Eligibility must be true, false or null, and `expected_effects` must equal 1. Timestamps require explicit timezones. Supported effect states are `succeeded`, `failed` and `pending`; supplied snapshots may be `complete`, `open`, `expired` or `unknown`. No Stripe account connection is requested.

The schemas in `schemas/` define the request, normalized incident, report and completion receipt. Runtime validation also checks exact byte limits, duplicate keys/IDs, object references and consistent event definitions. A schema check alone does not replace those checks. The two `examples/*.input.json` files are ready-to-submit **synthetic** requests; corresponding incident files make the nested JSON easier to read. `examples/EXPECTED ORACLES.json` contains manually specified expectations, not executed reports. Its variants explain why incomplete effects cannot establish a missing effect and why valid no-issue reports are supported completions.

### Privacy before submission

Enable **Restricted** general-resource access in your Apify account before sending input. Keep the run and its default storage restricted; do not share public links. Set `privateAccessAcknowledged` to true only after doing this. Apify creates INPUT before the Actor starts: the acknowledgement and startup checks cannot reverse an earlier exposure.

The adapter checks original-run/default-store identity and access through authenticated metadata, and verifies that tokenless run/INPUT reads are denied with 401/403. Explicit public, unknown or inconclusive access stops completion. These are moment-in-time checks; your later sharing choices can broaden access. The Actor uses only its default run storage, generates no signed public links and does not log supplied input. Apify opt-in sharing with developers, collaborator permissions and reporting an issue with a run link can grant others access. The original hosted qualification observed tokenless access denied for both original synthetic runs and their INPUT, REPORT and OUTPUT paths. These finite checks do not guarantee access settings after a user changes sharing permissions.

Input, REPORT, operation state, OUTPUT and any safe ERROR record are held in platform run storage. Unnamed storage retention and run deletion depend on your plan and settings, including platform exceptions for recent runs. Export promptly; no indefinite or zero-retention promise is made. Use the platform's original-store record/store deletion controls when you no longer need the data. Deletion removes your recovery copy; it is not a refund or a guarantee that provider backups have immediately vanished.

### Purchase and recovery

A supported completion creates one `incident-report` event at the product event price of `1.00` USD. Malformed or unsupported requests are refused without a product completion event. An internal failure before charging has no completion event; an interrupted charge is **uncertain**, not proof of zero payment. The qualified configuration contains a single incident-report product event. Review the platform’s current pricing before starting; the product code cannot reverse a platform charge.

REPORT and its bound state are saved and read back before the charge intent and single charge. OUTPUT contains the original report, confirmed event count and original-run retrieval reference. `body_sha256` binds the exact incidentJson UTF-8 bytes; whitespace changes therefore conflict within the same run. `request_sha256` binds canonical `{requestId, body_sha256, proof}`. The inner proof hashes canonical normalized input; `report_id` hashes the wrapper excluding `report_id`. These hashes establish consistency, not authenticated provider truth.

A lost acknowledgement preserves the original identifiers and report. No automatic fresh charge occurs: an uncertain attempt can finish only after positive remote confirmation that the original run has exactly one event. A zero/missing count does not authorize retry. The platform's short-lived idempotency key is supplementary protection. The SDK may retry the same keyed HTTP operation internally; this invocation is bounded to 45 seconds. Recovery assumes one serialized process for the original run; parallel or manually overlapping executions are unsupported. Retrieve REPORT/OUTPUT from the **original run**, without starting the Actor. A new run is a new potentially billable order, even with the same requestId; there is no cross-run deduplication guarantee.

Safe machine-readable failures use a fixed error code and original recovery references when available. Preserve the original run ID, request reference and body/report hashes when seeking support. Do not include incident bodies, credentials or public storage links in support messages. An unavailable OUTPUT after interruption requires original-run reconciliation. Refund requests go to the owner for individual approval; the Actor never issues refunds.

### Interpret the result

The exact accepted r2 core report is retained under `proof`. Its private-first-proof limitation describes that core's qualification boundary; the wrapper adds delivery/billing metadata and does not erase it. The original seller-run hosted qualification accepted one supported synthetic completion and one privacy-acknowledgement refusal, including saved output and private-access checks. This does not establish external purchases, demand, general accuracy or permanent availability. The `synthetic_regression_pattern` contains sorted unique finding/disposition codes as a synthetic assertion pattern; it neither executes customer handlers nor replays events and is not customer-use evidence.

A repeated event delivery is distinct from two recorded successful effects. “Missing by cutoff” requires caller-declared complete effects and a passed deadline. Post-cutoff observations are explicitly excluded from cutoff findings, while whole-input identity conflicts remain invalid. Created timestamps do not establish event ordering. All conclusions depend on supplied records and policies; this is not verified Stripe account/payment truth. There are no handler executions, event resends, payment/refund actions, connectors, subscriptions or continuous monitoring.

See `marketing/AGENT QUICKSTART.json` for API/MCP invocation and original retrieval. Retrieve a completed report from the original run; starting another run can create another billable order.

### Primary platform references

- [Pay-per-event and automatic events](https://docs.apify.com/actors/monetize/pay-per-event)
- [Charge API and three-minute idempotency](https://docs.apify.com/api/v2/post-charge-run)
- [Limited Actor permissions](https://docs.apify.com/actors/development/permissions)
- [Buyer resource access and sharing](https://docs.apify.com/account/collaboration/general-resource-access)
- [Storage retention and deletion](https://docs.apify.com/storage)
- [Hosted MCP invocation and retrieval](https://docs.apify.com/mcp)

Platform documentation references were checked 13 November 2026. The finite hosted qualification was recorded 15 November 2026. Current account settings, resource retention and the platform’s final accounting remain separate from the report’s event record.

# Actor input Schema

## `exampleOnly` (type: `boolean`):

Leave all example values unchanged for the synthetic Results demonstration. Disable this before entering your own records. Example mode rejects edited inputs and does not acknowledge private access.

## `requestId` (type: `string`):

8–80 ASCII letters, digits, underscores or hyphens; run-scoped reference, not cross-run deduplication.

## `incidentJson` (type: `string`):

Paste exact normalized incident JSON from the documented schema. Maximum 131072 UTF-8 bytes, 100 records of each type. No credentials, signatures, personal payloads or arbitrary webhook fields. See examples.

## `privateAccessAcknowledged` (type: `boolean`):

Required true only for a real report: restricted general-resource access must already be enabled before submitting your records. Leave false for the fixed synthetic example. The Actor verifies actual access for real reports.

## Actor input object example

```json
{
  "exampleOnly": true,
  "requestId": "synthetic_repeated_001",
  "incidentJson": "{\"cutoff_utc\":\"2026-11-13T08:00:00Z\",\"deliveries\":[{\"created_utc\":\"2026-11-13T06:00:00Z\",\"delivery_id\":\"del_1\",\"event_id\":\"evt_1\",\"event_type\":\"checkout.session.completed\",\"object_id\":\"obj_1\",\"observed_utc\":\"2026-11-13T06:01:00Z\",\"snapshot_status\":\"complete\"},{\"created_utc\":\"2026-11-13T06:00:00Z\",\"delivery_id\":\"del_2\",\"event_id\":\"evt_1\",\"event_type\":\"checkout.session.completed\",\"object_id\":\"obj_1\",\"observed_utc\":\"2026-11-13T06:01:00Z\",\"snapshot_status\":\"complete\"}],\"deliveries_complete\":true,\"effects\":[{\"effect_id\":\"fx_1\",\"event_id\":\"evt_1\",\"object_id\":\"obj_1\",\"observed_utc\":\"2026-11-13T06:02:00Z\",\"status\":\"succeeded\"}],\"effects_complete\":true,\"objects\":[{\"effect_deadline_utc\":\"2026-11-13T07:00:00Z\",\"eligible\":true,\"expected_effects\":1,\"object_id\":\"obj_1\"}],\"schema_version\":\"webhook-incident.input.v1\"}",
  "privateAccessAcknowledged": false
}
```

# Actor output Schema

## `example` (type: `string`):

One fixed synthetic row only in example mode. Not a customer report or billing receipt. Real reports remain in original REPORT/OUTPUT.

## `report` (type: `string`):

Versioned report; may remain retrievable after an uncertain billing acknowledgement. Requires buyer authorization.

## `completion` (type: `string`):

Original report plus confirmed billing receipt and recovery reference. Requires buyer authorization.

## `error` (type: `string`):

Machine-readable safe error for a stopped attempt. This record is absent on normal success.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "exampleOnly": true,
    "requestId": "synthetic_repeated_001",
    "incidentJson": "{\"cutoff_utc\":\"2026-11-13T08:00:00Z\",\"deliveries\":[{\"created_utc\":\"2026-11-13T06:00:00Z\",\"delivery_id\":\"del_1\",\"event_id\":\"evt_1\",\"event_type\":\"checkout.session.completed\",\"object_id\":\"obj_1\",\"observed_utc\":\"2026-11-13T06:01:00Z\",\"snapshot_status\":\"complete\"},{\"created_utc\":\"2026-11-13T06:00:00Z\",\"delivery_id\":\"del_2\",\"event_id\":\"evt_1\",\"event_type\":\"checkout.session.completed\",\"object_id\":\"obj_1\",\"observed_utc\":\"2026-11-13T06:01:00Z\",\"snapshot_status\":\"complete\"}],\"deliveries_complete\":true,\"effects\":[{\"effect_id\":\"fx_1\",\"event_id\":\"evt_1\",\"object_id\":\"obj_1\",\"observed_utc\":\"2026-11-13T06:02:00Z\",\"status\":\"succeeded\"}],\"effects_complete\":true,\"objects\":[{\"effect_deadline_utc\":\"2026-11-13T07:00:00Z\",\"eligible\":true,\"expected_effects\":1,\"object_id\":\"obj_1\"}],\"schema_version\":\"webhook-incident.input.v1\"}",
    "privateAccessAcknowledged": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("satisfied_laptop/webhook-incident-reconciliation").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "exampleOnly": True,
    "requestId": "synthetic_repeated_001",
    "incidentJson": "{\"cutoff_utc\":\"2026-11-13T08:00:00Z\",\"deliveries\":[{\"created_utc\":\"2026-11-13T06:00:00Z\",\"delivery_id\":\"del_1\",\"event_id\":\"evt_1\",\"event_type\":\"checkout.session.completed\",\"object_id\":\"obj_1\",\"observed_utc\":\"2026-11-13T06:01:00Z\",\"snapshot_status\":\"complete\"},{\"created_utc\":\"2026-11-13T06:00:00Z\",\"delivery_id\":\"del_2\",\"event_id\":\"evt_1\",\"event_type\":\"checkout.session.completed\",\"object_id\":\"obj_1\",\"observed_utc\":\"2026-11-13T06:01:00Z\",\"snapshot_status\":\"complete\"}],\"deliveries_complete\":true,\"effects\":[{\"effect_id\":\"fx_1\",\"event_id\":\"evt_1\",\"object_id\":\"obj_1\",\"observed_utc\":\"2026-11-13T06:02:00Z\",\"status\":\"succeeded\"}],\"effects_complete\":true,\"objects\":[{\"effect_deadline_utc\":\"2026-11-13T07:00:00Z\",\"eligible\":true,\"expected_effects\":1,\"object_id\":\"obj_1\"}],\"schema_version\":\"webhook-incident.input.v1\"}",
    "privateAccessAcknowledged": False,
}

# Run the Actor and wait for it to finish
run = client.actor("satisfied_laptop/webhook-incident-reconciliation").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "exampleOnly": true,
  "requestId": "synthetic_repeated_001",
  "incidentJson": "{\\"cutoff_utc\\":\\"2026-11-13T08:00:00Z\\",\\"deliveries\\":[{\\"created_utc\\":\\"2026-11-13T06:00:00Z\\",\\"delivery_id\\":\\"del_1\\",\\"event_id\\":\\"evt_1\\",\\"event_type\\":\\"checkout.session.completed\\",\\"object_id\\":\\"obj_1\\",\\"observed_utc\\":\\"2026-11-13T06:01:00Z\\",\\"snapshot_status\\":\\"complete\\"},{\\"created_utc\\":\\"2026-11-13T06:00:00Z\\",\\"delivery_id\\":\\"del_2\\",\\"event_id\\":\\"evt_1\\",\\"event_type\\":\\"checkout.session.completed\\",\\"object_id\\":\\"obj_1\\",\\"observed_utc\\":\\"2026-11-13T06:01:00Z\\",\\"snapshot_status\\":\\"complete\\"}],\\"deliveries_complete\\":true,\\"effects\\":[{\\"effect_id\\":\\"fx_1\\",\\"event_id\\":\\"evt_1\\",\\"object_id\\":\\"obj_1\\",\\"observed_utc\\":\\"2026-11-13T06:02:00Z\\",\\"status\\":\\"succeeded\\"}],\\"effects_complete\\":true,\\"objects\\":[{\\"effect_deadline_utc\\":\\"2026-11-13T07:00:00Z\\",\\"eligible\\":true,\\"expected_effects\\":1,\\"object_id\\":\\"obj_1\\"}],\\"schema_version\\":\\"webhook-incident.input.v1\\"}",
  "privateAccessAcknowledged": false
}' |
apify call satisfied_laptop/webhook-incident-reconciliation --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,satisfied_laptop/webhook-incident-reconciliation"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/hdt5vxJrFT8dwlaIf/builds/jCgrRGlRo2SNhkYpy/openapi.json
