> ## Documentation Index
> Fetch the complete documentation index at: https://docs.proofable.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Gates

> Gate access, actions, payments, or content by verified proof.

Require proof before it happens. You decide what must already be proven. The person verifies. You keep the result.

One check is not a gate. A single `proof-of-human` requirement is [Verify](/verification) with a saved proof: send the person to [Hosted Verify](/verification/presets), read the returned proof ID, done. No gate to define.

Reach for a gate when the decision needs a policy of several checks, a price, or a schedule. Publishing a listing is optional: use it only when you want a persisted `gateId`, price, schedule, or marketplace offer.

## What a gate holds

| Part | What it sets |
| - | - |
| Checks | What must already be proven, with optional match rows such as a provider or minimum age |
| Price | Optional. Free unless you publish a charge |
| Schedule | Optional start and end times, enforced on the server when published |
| Reward | Optional. What people receive after they pass a published listing |

## Enforce it

| Where | How |
| - | - |
| Your server | `defineGate` + `gateCheck`. `satisfied === true` means ready |
| A React page | `VerifyGate` with the `gate` policy |
| A published listing | `VerifyGate` with a `gateId`, or a hosted checkout link |
| An API | [Pay per call](/gates/pay-per-call) with a proof check |
| An agent action | The agent's permission check before the tool runs. [Control agent actions](/use-cases/control-agent-actions) |

```js theme={"system"}
import { ProofableClient, defineGate } from '@proofable/sdk';

const proofable = new ProofableClient();
const gate = defineGate([
  { verifierId: 'proof-of-human' },
  { verifierId: 'ownership-dns-txt', match: { domain: 'acme.com' } },
]);
const result = await proofable.gateCheck({ gate, subject });
if (result.satisfied) {
  // grant access
}
```

```jsx theme={"system"}
import { defineGate } from '@proofable/sdk';
import { VerifyGate } from '@proofable/sdk/widgets';

const gate = defineGate([
  { verifierId: 'proof-of-human' },
  { verifierId: 'ownership-dns-txt', match: { domain: 'acme.com' } },
]);

<VerifyGate gate={gate} onVerified={grantAccess} />;
```

## How a check runs

1. **Define the policy.** Verifier IDs plus optional match, freshness, and count rows.
2. **Check existing proofs.** `gateCheck` evaluates the subject's current proofs against that policy.
3. **Verify what's missing.** Hosted Verify or your own verify call covers only the gaps.
4. **Decide.** `satisfied` is the decision. Proofable does not grant access for you.

## Who pays

Checks on a published listing use your credits by default. Turn on visitor checkout to charge a price instead. Inline `defineGate` checks and other API calls can be sponsored by your app or paid per call with [x402](/gates/pay-per-call). [Pricing](/pricing)

## Guides

<CardGroup cols={2}>
  <Card title="Sell access with one gate" icon="rocket" href="/gates/sell-access">
    Publish, embed, and confirm in three steps.
  </Card>

  <Card title="Gate checkout" icon="door-open" href="/gates/checkout">
    Drive the full checkout from your own backend.
  </Card>

  <Card title="NFT and token gating" icon="image" href="/gates/nft-gating">
    Require a holder or a minimum balance.
  </Card>

  <Card title="Pay per call" icon="coins" href="/gates/pay-per-call">
    Charge per API request with x402.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.