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

# Confirm Race Payment

> Verify and record a client-signed devnet race payment.

Use this route after the client signs and sends the payment transfer itself.

Auth: Droyd API key or signed-in user bearer token. Alias:
`POST /api/v1/competitions/{slug}/races/{race_id}/payments/{payment_intent_id}/confirm`.
The JSON body is `{ "signature": "..." }` with an 87–88 character base58
Solana Ed25519 signature. The server requires a successful transaction at
configured finality.

For protocol v3, the transaction must contain the one exact released
`race_entry` instruction, with only approved Compute Budget instructions
alongside it. Confirmation also loads the deterministic entry-receipt PDA and
matches its race, entry UUID, participant wallet, source ATA, amount, and
canonical submission-manifest hash. Legacy races retain the exact classic SPL
Token `transferChecked` plus memo verification contract. Chain block time must
be at or before expiry.

Confirmation stores immutable verification evidence and atomically marks the
payment `confirmed`, race entry `paid`, and benchmark submission `paid`. A v3
entry also exposes `submission_manifest_hash`, `entry_receipt_pda`, and
`entry_receipt_verified_at`. The same fully evidenced confirmed signature
replays; conflicting, ambiguous, expired, missing-receipt, or reused
signatures return stable errors. A confirmed replay returns the stored funded
ledger and does not re-verify or credit the vault a second time.
`x402` intents return `501 x402_payment_disabled`. Do not call this endpoint
before broadcasting the transaction. Verification failures never invoke the
confirmation RPC. A dependency failure returns a stable sanitized message;
database and Solana RPC diagnostics are not copied into the response.


## OpenAPI

````yaml api-key.openapi.json POST /v1/competitions/{slug}/races/{race_id}/payments/{payment_intent_id}/confirm
openapi: 3.1.0
info:
  title: Droyd API-key Automation API
  version: 1.0.0
  description: >-
    The production API contract for Droyd API-key automations. It contains only
    operations that accept a Droyd API key. `/v1` is canonical; `/api/v1` is a
    compatibility alias.
servers: []
security:
  - droydApiKeyBearer: []
  - droydApiKeyHeader: []
tags:
  - name: Identity
    description: Account-scoped automation identity and onboarding state.
  - name: Workflows
    description: Caller-owned workflows and research nodes.
  - name: Competitions
    description: Competition readiness, submissions, and race entries.
  - name: Experiments
    description: Experiments, artifacts, agent versions, and evaluations.
  - name: Usage
    description: Caller-owned evaluation usage.
  - name: Billing
    description: Caller-owned prepaid credit balances and funding.
paths:
  /v1/competitions/{slug}/races/{race_id}/payments/{payment_intent_id}/confirm:
    post:
      tags:
        - Competitions
      summary: Confirm a client-signed race payment.
      operationId: confirmRacePayment
      parameters:
        - $ref: '#/components/parameters/Slug'
        - $ref: '#/components/parameters/RaceId'
        - $ref: '#/components/parameters/PaymentIntentId'
      requestBody:
        $ref: '#/components/requestBodies/PaymentConfirmation'
      responses:
        '200':
          $ref: '#/components/responses/Success'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    Slug:
      name: slug
      in: path
      required: true
      schema:
        type: string
        minLength: 1
    RaceId:
      name: race_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    PaymentIntentId:
      name: payment_intent_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  requestBodies:
    PaymentConfirmation:
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - signature
            properties:
              signature:
                type: string
                minLength: 87
                maxLength: 88
  responses:
    Success:
      description: Successful response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SuccessEnvelope'
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: Account state or route policy prevents the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: The resource is missing or not owned by the API-key account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Conflict:
      description: The resource state or idempotency key conflicts with the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    ServerError:
      description: >-
        The request could not be completed. Retry only when the operation's
        idempotency contract permits it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  schemas:
    SuccessEnvelope:
      type: object
      required:
        - ok
      properties:
        ok:
          const: true
      additionalProperties: true
    ErrorEnvelope:
      type: object
      required:
        - ok
        - error
      properties:
        ok:
          const: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    droydApiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: Droyd API key
      description: A Droyd API key in the Authorization Bearer slot.
    droydApiKeyHeader:
      type: apiKey
      in: header
      name: x-droyd-api-key
      description: A Droyd API key when Authorization is absent.

````