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

# Verify x402 Payment (Deprecated)

> Deprecated legacy endpoint for verifying an x402 payment with organization-specific authentication

<Warning>
  `POST /v1/verify` is deprecated and retained for legacy integrations only.
</Warning>

Verify an x402 payment with organization-specific authentication. This legacy endpoint validates payment signatures and authorization data according to the x402 protocol specification.

<Note>
  When `paymentRequirements.extra.name === "GatewayWalletBatched"`, verification
  is forwarded to Circle's Gateway API. See [Circle Gateway
  (Batched)](/api-reference/payment-types/circle-gateway) for that flow and
  [Payment Types](/api-reference/payment-types/overview) for an overview.
</Note>

## Features

* Organization-specific x402 authentication
* Automatic fallback to default authentication
* Authentication context in responses
* Comprehensive error handling

## Request Example

```json theme={"system"}
{
  "paymentPayload": {
    "x402Version": 1,
    "scheme": "exact",
    "network": "base-sepolia",
    "payload": {
      "signature": "0x...",
      "authorization": {
        "from": "0x742d35Cc6634C0532925a3b8D0c4E5e6C2aE7A3e",
        "to": "0x8e633dBf31adCc7D41BE3e95B7c8DD3526B5235A",
        "value": "1000000",
        "validAfter": "1234567890",
        "validBefore": "1234567899",
        "nonce": "0x..."
      }
    }
  },
  "paymentRequirements": {
    "scheme": "exact",
    "network": "base-sepolia",
    "maxAmountRequired": "1000000",
    "resource": "https://example.com/resource",
    "description": "Payment for resource access",
    "mimeType": "application/json",
    "payTo": "0x8e633dBf31adCc7D41BE3e95B7c8DD3526B5235A",
    "maxTimeoutSeconds": 3600,
    "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
  }
}
```

For EIP-3009 payloads, both `authorization.to` and `payTo` must be set to the
facilitator contract address for the network.

<Note>
  `POST /v1/verify` does not validate the Permit2 payload shape in the current
  facilitator. Permit2 payments are settled directly through
  [`POST /v1/settle`](/api-reference/endpoint/settle-payment).
</Note>

| Network             | Facilitator Contract                         |
| ------------------- | -------------------------------------------- |
| `arc-testnet`       | `0x8e633dBf31adCc7D41BE3e95B7c8DD3526B5235A` |
| `bot-chain-testnet` | `0x8e633dBf31adCc7D41BE3e95B7c8DD3526B5235A` |
| `bot-chain`         | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `base`              | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `bsc`               | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `base-sepolia`      | `0x8e633dBf31adCc7D41BE3e95B7c8DD3526B5235A` |
| `avalanche`         | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `optimism`          | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `arbitrum`          | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `optimism-sepolia`  | `0x8e633dBf31adCc7D41BE3e95B7c8DD3526B5235A` |
| `polygon`           | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `unichain`          | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `ink`               | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `worldchain`        | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `sei`               | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `hyperevm`          | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `megaeth`           | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `tempo`             | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `monad`             | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |
| `robinhood`         | `0x8E7769D440b3460b92159Dd9C6D17302b036e2d6` |

## Response Example

```json theme={"system"}
{
  "isValid": true,
  "payer": "0x742d35Cc6634C0532925a3b8D0c4E5e6C2aE7A3e",
  "authContext": {
    "organizationId": "org_123",
    "authMethod": "organization_specific",
    "timestamp": "2024-01-01T00:00:00.000Z"
  }
}
```


## OpenAPI

````yaml POST /v1/verify
openapi: 3.1.0
info:
  title: Meridian Protocol API
  description: API for x402 payments
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.mrdn.finance
    description: Production server
security:
  - cookieAuth: []
  - apiKeyAuth: []
paths:
  /v1/verify:
    post:
      summary: Verify x402 payment (deprecated)
      description: >-
        Deprecated legacy endpoint for verifying an x402 payment with
        organization-specific authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                paymentPayload:
                  $ref: '#/components/schemas/PaymentPayload'
                paymentRequirements:
                  $ref: '#/components/schemas/PaymentRequirements'
              required:
                - paymentPayload
                - paymentRequirements
      responses:
        '200':
          description: Legacy payment verification result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyResponse'
        '400':
          description: Invalid payment data
        '401':
          description: Invalid API key
      deprecated: true
      security:
        - apiKeyAuth: []
components:
  schemas:
    PaymentPayload:
      description: >-
        Legacy x402 payment payload used by `POST /v1/verify` and by standard
        EIP-3009 EVM settlement.
      oneOf:
        - $ref: '#/components/schemas/ExactEvmPaymentPayload'
    PaymentRequirements:
      type: object
      required:
        - scheme
        - network
        - maxAmountRequired
        - resource
        - description
        - mimeType
        - payTo
        - maxTimeoutSeconds
        - asset
      properties:
        scheme:
          type: string
          enum:
            - exact
        network:
          type: string
          description: Network identifier
        maxAmountRequired:
          type: string
          pattern: ^\d+$
          description: Maximum amount required in the token's smallest unit.
        resource:
          type: string
          format: uri
        description:
          type: string
          description: Payment description
        mimeType:
          type: string
          description: Content MIME type
        payTo:
          type: string
          description: >-
            Facilitator or recipient address required by the selected payment
            type.
        maxTimeoutSeconds:
          type: integer
          description: Maximum validity window in seconds.
        asset:
          type: string
          description: Payment asset contract address or chain-specific asset identifier.
        extra:
          type: object
          additionalProperties: true
    VerifyResponse:
      type: object
      properties:
        isValid:
          type: boolean
          description: Whether payment is valid
        invalidReason:
          type: string
          description: Reason if payment is invalid
        payer:
          type: string
          description: Payment sender address
        authContext:
          type: object
          properties:
            organizationId:
              type: string
            authMethod:
              type: string
            timestamp:
              type: string
    ExactEvmPaymentPayload:
      type: object
      required:
        - x402Version
        - scheme
        - network
        - payload
      properties:
        x402Version:
          type: integer
          enum:
            - 1
          example: 1
        scheme:
          type: string
          enum:
            - exact
          example: exact
        network:
          type: string
          example: base-sepolia
        payload:
          $ref: '#/components/schemas/ExactEvmPayload'
    ExactEvmPayload:
      type: object
      required:
        - signature
        - authorization
      properties:
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]+$
        authorization:
          $ref: '#/components/schemas/ExactEvmAuthorization'
    ExactEvmAuthorization:
      type: object
      required:
        - from
        - to
        - value
        - validAfter
        - validBefore
        - nonce
      properties:
        from:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
        to:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
        value:
          type: string
          pattern: ^\d+$
        validAfter:
          type: string
          pattern: ^\d+$
        validBefore:
          type: string
          pattern: ^\d+$
        nonce:
          type: string
          pattern: ^0x[a-fA-F0-9]{64}$
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: siwe-session
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````