> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://www.openfort.io/api/mcp` to find what you need.
>
> **Have feedback?** Use `submit_feedback` on the same MCP server.

# Paymaster — gas sponsorship

The Openfort Paymaster provides gas sponsorship for your users' transactions, enabling gas sponsorship across multiple chains. By integrating with Openfort, you can deliver sponsored transactions where users don't need to hold native tokens to interact with your application.

Openfort supports gas sponsorship across both EVM chains (using the ERC-4337 Paymaster standard for gas sponsorship) and Solana (using native fee payer mechanics for transaction gas sponsorship).

## Ethereum Gas Sponsorship

For EVM-compatible chains, Openfort provides a Paymaster that implements the ERC-4337 specification for gas sponsorship. The Ethereum gas sponsorship flow works as follows:

1. Receives a UserOperation from your application
2. Validates it against your gas sponsorship rules
3. Signs the operation with the paymaster's key
4. Returns the signature for inclusion in the UserOperation

When the sponsored transaction is executed on-chain, the paymaster contract verifies the signature and covers the gas fees on behalf of the user.

**Endpoint:**

```text
https://api.openfort.io/rpc/{chainId}
```

* [Ethereum Paymaster](/docs/products/infrastructure/paymaster/ethereum) — gas sponsorship for Ethereum chains. Enable gas sponsorship and sponsored transactions on EVM-compatible chains using the ERC-4337 Paymaster standard for gas sponsorship.

## Solana gas sponsorship

For Solana, Openfort provides gas sponsorship using Solana's native fee payer mechanics. Solana has built-in support for transaction gas sponsorship through "fee payers," enabling sponsored transactions without requiring users to hold SOL.

gas sponsorship on Solana works by:

1. Receiving a transaction from your application
2. Validating it against your gas sponsorship policies
3. Signing the transaction as the fee payer
4. Returning the signed sponsored transaction for execution

**Endpoint:**

```text
https://api.openfort.io/rpc/solana/{cluster}
```

* [Solana Paymaster](/docs/products/infrastructure/paymaster/solana) — gas sponsorship for Solana. Enable gas sponsorship on Solana using native fee payer mechanics. Deliver sponsored transactions and gas-free experiences for your Solana users.

## Authentication

All paymaster endpoints require authentication. Include your Openfort publishable key in the `Authorization` header:

```http
Authorization: Bearer YOUR_OPENFORT_PUBLISHABLE_KEY
```

Get your public key from the [Openfort Dashboard](https://dashboard.openfort.io).

## gas sponsorship Policies

To use the paymaster, you must first define a **gas sponsorship policy** that controls when and how transactions are sponsored. Configure your policies in the [Openfort Dashboard](https://dashboard.openfort.io) or via the API. Policies let you:

* Limit sponsorship to specific contract or program interactions
* Set spending caps per user or time period
* Restrict sponsorship to specific chains or clusters
* Define custom criteria based on transaction parameters

### Policy scopes

gas sponsorship policies support different scopes depending on the chain:

| Scope | Behavior | `policyId` required? | Availability |
|-------|----------|----------------------|-------------|
| `project` | Applies to **all** transactions in the project automatically. The system discovers matching project-scoped policies in priority order. | No | EVM, Solana |
| `transaction` | Applies only when the `policyId` is explicitly passed in the request. Uses strict validation — if the policy's rules don't match, the transaction is rejected. | Yes | EVM only |

:::info
Solana gas sponsorship only supports **project** scope. Policies are evaluated automatically — there is no way to pass a `policyId` per-request. See [Solana Paymaster](/docs/products/infrastructure/paymaster/solana) for details.
:::

## Next steps

* [Ethereum Paymaster](/docs/products/infrastructure/paymaster/ethereum) - Gas sponsorship and gas sponsorship for Ethereum chains
* [Solana Paymaster](/docs/products/infrastructure/paymaster/solana) - gas sponsorship and sponsored transactions for Solana
