---
title: "Get payment accepts"
method: POST
path: "/v1/payments/x402/accepts"
tags: ["x402"]
---

# Get payment accepts

`POST /v1/payments/x402/accepts`

Transform payment configuration into x402 payment requirements. This endpoint converts high-level payment parameters (like USD amounts or ERC20 token specifications) into the standardized x402 payment requirements format used by x402-compatible middleware.

## Request body

- object
  - `resourceUrl` string, uri, required — The URL of the resource being protected by the payment
  - `method` union — The HTTP method used to access the resource
    - 'GET'
    - 'POST'
    - 'PUT'
    - 'DELETE'
    - 'PATCH'
  - `network` union, required — The blockchain network where the payment should be processed
    - string
    - integer
  - `price` union, required — The price for accessing the resource - either a USD amount (e.g., '$0.10') or a specific token amount
    - string
    - number
    - object
      - `amount` string, required
      - `asset` object, required
        - `address` string, required — A valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
        - `decimals` number
        - `eip712` object
          - `name` string, required
          - `version` string, required
          - `primaryType` 'TransferWithAuthorization' | 'Permit', required
    - object
      - `amount` string, required
      - `asset` object, required
        - `address` string, required — A valid Solana address (base58 string).
        - `decimals` integer, required — Number of decimals for the SPL token
        - `tokenProgram` 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' | 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' — Optional token program. Defaults to the SPL Token program if omitted.
  - `minPrice` union — Optional minimum price for 'upto' scheme. When specified, verify will accept payments where allowance >= minPrice. Must use same format as price.
    - string
    - number
    - object
      - `amount` string, required
      - `asset` object, required
        - `address` string, required — A valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
        - `decimals` number
        - `eip712` object
          - `name` string, required
          - `version` string, required
          - `primaryType` 'TransferWithAuthorization' | 'Permit', required
    - object
      - `amount` string, required
      - `asset` object, required
        - `address` string, required — A valid Solana address (base58 string).
        - `decimals` integer, required — Number of decimals for the SPL token
        - `tokenProgram` 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' | 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' — Optional token program. Defaults to the SPL Token program if omitted.
  - `scheme` union
    - 'exact'
    - 'upto'
  - `routeConfig` object — Optional configuration for the payment middleware route
    - `description` string
    - `mimeType` string
    - `maxTimeoutSeconds` number
    - `inputSchema` object
      - `queryParams` object
      - `bodyType` 'json' | 'form-data' | 'multipart-form-data' | 'text' | 'binary'
      - `bodyFields` object
      - `headerFields` object
    - `outputSchema` object
    - `discoverable` boolean
    - `customPaywallHtml` string
    - `resource` string, uri
  - `serverWalletAddress` string — Your server wallet address, defaults to the project server wallet address
  - `recipientAddress` string — Optional recipient address to receive the payment if different from your facilitator server wallet address
  - `extraMetadata` object — Optional extra data to be passed to in the payment requirements.
  - `x402Version` union — x402 protocol version. Version 2 returns requirements in PAYMENT-REQUIRED header instead of response body.
    - 1
    - 2

## Response `200`

Returns x402 payment requirements

- object
  - `x402Version` number, required
  - `error` string
  - `accepts` object[], required
    - `scheme` union
      - 'exact'
      - 'upto'
    - `network` union, required — CAIP-2 blockchain identifier (e.g., 'eip155:1' for Ethereum, 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). Also accepts numeric EVM chain IDs (e.g., 1, 137) or aliases ('solana:mainnet', 'solana:devnet') for backward compatibility.
      - string
      - integer
    - `maxAmountRequired` string, required
    - `resource` string, uri, required
    - `description` string, required
    - `mimeType` string, required
    - `outputSchema` object
    - `payTo` union, required
      - string
      - string
    - `maxTimeoutSeconds` integer, required
    - `asset` union, required
      - string
      - string
    - `extra` object

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication required. For backend usage, include `x-secret-key` header.
- `402` — Payment required – returns x402 payment requirements
- `500` — Internal server error

---

[API](https://skmtc.net/thirdweb/apis/thirdweb-api.md) · [All operations](https://skmtc.net/thirdweb/apis/thirdweb-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/thirdweb/thirdweb-api/revisions/fb4cb67da1c7/schema)
