AgentPay Labs Merchants API

Merchant registration and management

Operations 6

POST /api/merchants/register Register a merchant #
GET /api/merchants/profile Get merchant profile #
PATCH /api/merchants/profile/wallet Update payout wallet address #
PATCH /api/merchants/profile/webhook Set webhook URL #
POST /api/merchants/rotate-key Rotate API key #
GET /api/merchants/stats Payment statistics #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/agentpay-so:agentpay-so-merchants-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

agentpay-so-merchants-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AgentPay Merchants API
  description: '**AgentPay public API for Bro and train-first agent commerce.**

    This OpenAPI document is limited to the Cloudflare Workers production surface.

    Legacy Node-only routes are intentionally excluded until they are migrated.


    ## Authentication

    All protected endpoints require an API key via:

    - `Authorization: Bearer ` header, or

    - `X-Api-Key: ` header


    ## Protocols Supported

    - **x402** — HTTP 402 paywall standard

    - **ACP** — Agent Communication Protocol

    - **AP2** — Agent Payment Protocol v2

    - **Solana Pay** — Solana USDC native

    - **Stripe** — Fiat card / bank payments


    Get your API key: `POST /api/merchants/register`'
  version: 1.0.0
  contact:
    name: AgentPay Support
    url: https://docs.agentpay.gg
    email: support@agentpay.gg
  license:
    name: BSL-1.1; AGPL-3.0 after 2029-01-01
    url: https://github.com/Rumblingb/Agentpay/blob/main/LICENSE
servers:
- url: https://api.agentpay.so
  description: Production (Cloudflare Workers)
- url: http://localhost:8787
  description: Local Workers dev (wrangler dev)
tags:
- name: Merchants
  description: Merchant registration and management
paths:
  /api/merchants/register:
    post:
      tags:
      - Merchants
      summary: Register a merchant
      description: Register a new merchant account and receive an API key. No auth required.
      operationId: registerMerchant
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MerchantRegisterRequest'
      responses:
        '201':
          description: Merchant registered
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantRegisterResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
  /api/merchants/profile:
    get:
      tags:
      - Merchants
      summary: Get merchant profile
      operationId: getMerchantProfile
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          description: Merchant profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type: string
                  email:
                    type: string
                  walletAddress:
                    type: string
                  webhookUrl:
                    type: string
                    nullable: true
                  createdAt:
                    type: string
                    format: date-time
        '401':
          $ref: '#/components/responses/UnauthorizedError'
  /api/merchants/profile/wallet:
    patch:
      tags:
      - Merchants
      summary: Update payout wallet address
      description: Change the Solana wallet address where the merchant receives payments.
      operationId: updateMerchantWallet
      security:
      - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - walletAddress
              properties:
                walletAddress:
                  type: string
                  description: Valid Solana wallet address (32–44 chars)
                  example: EizgAusPxbmJR4H6yoc1zcSCLdkdfM5r57gCpiAzdaNE
      responses:
        '200':
          description: Wallet updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  walletAddress:
                    type: string
                  message:
                    type: string
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
  /api/merchants/profile/webhook:
    patch:
      tags:
      - Merchants
      summary: Set webhook URL
      description: Set or clear the outgoing webhook URL for payment events.
      operationId: updateMerchantWebhook
      security:
      - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                webhookUrl:
                  type: string
                  nullable: true
                  description: HTTPS URL to receive events, or null to clear
      responses:
        '200':
          description: Webhook URL updated
        '401':
          $ref: '#/components/responses/UnauthorizedError'
  /api/merchants/rotate-key:
    post:
      tags:
      - Merchants
      summary: Rotate API key
      description: Invalidates the current API key and returns a new one.
      operationId: rotateApiKey
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          description: New API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  apiKey:
                    type: string
                  message:
                    type: string
        '401':
          $ref: '#/components/responses/UnauthorizedError'
  /api/merchants/stats:
    get:
      tags:
      - Merchants
      summary: Payment statistics
      operationId: getMerchantStats
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          description: Aggregate payment stats
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  totalTransactions:
                    type: integer
                  confirmedCount:
                    type: integer
                  pendingCount:
                    type: integer
                  failedCount:
                    type: integer
                  totalConfirmedUsdc:
                    type: number
        '401':
          $ref: '#/components/responses/UnauthorizedError'
components:
  responses:
    ValidationError:
      description: Request validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UnauthorizedError:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    MerchantRegisterResponse:
      type: object
      properties:
        success:
          type: boolean
        merchantId:
          type: string
        apiKey:
          type: string
          description: Store this securely — shown only once
        merchant:
          type: object
    MerchantRegisterRequest:
      type: object
      required:
      - name
      - email
      - walletAddress
      properties:
        name:
          type: string
        email:
          type: string
          format: email
        walletAddress:
          type: string
          description: Solana wallet address
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        details:
          type: array
          items:
            type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Format: ''Bearer <api_key>'' or just ''<api_key>'''