> ## 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 an action happens. You decide what must already be proven, the person verifies, and you keep the result.

A single check needs no gate. For one `proof-of-human` requirement, send the person to [Hosted Verify](https://docs.proofable.me/verification/presets.md) and read the returned proof ID. [Verify](https://docs.proofable.me/verification.md) covers that path.

Use a gate when the decision needs several checks, a price, or a schedule. Publish it as a listing 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](https://docs.proofable.me/gates/pay-per-call.md) with a proof check |
| An agent action | The agent's permission check before the tool runs. [Control agent actions](https://docs.proofable.me/use-cases/control-agent-actions.md) |

```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: [{ path: 'domain', value: '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: [{ path: 'domain', value: '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, and your server grants the access, so the final call stays yours.

## 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](https://docs.proofable.me/gates/pay-per-call.md). [Pricing](https://docs.proofable.me/pricing.md)

## Guides

> [card] [Sell access with one gate](https://docs.proofable.me/gates/sell-access.md)
>
> Publish, embed, and confirm in three steps.

> [card] [Sell a service your server runs](https://docs.proofable.me/gates/your-server.md)
>
> Take orders on Proofable and do the work on your own server.

> [card] [Gate checkout](https://docs.proofable.me/gates/checkout.md)
>
> Drive the full checkout from your own backend.

> [card] [NFT and token gating](https://docs.proofable.me/gates/nft-gating.md)
>
> Require a holder or a minimum balance.

> [card] [Pay per call](https://docs.proofable.me/gates/pay-per-call.md)
>
> Charge per API request with x402.


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