openapi: 3.2.0 info: title: AlgoVoi Gateway X402 API description: Public-facing x402 payment gateway. version: 1.0.0-phase1c x-guidance: To access payment-gated resources, send the required payment proof header. Use GET /mpp/{resource_id} for MPP or GET /protected/{resource_id} for x402. tags: - name: X402 paths: /x402/challenge: post: tags: - X402 summary: Challenge description: Return payment instructions using per-resource price/network and per-tenant payout address. operationId: challenge_x402_challenge_post parameters: - name: tenant_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Tenant Id - name: x-tenant-id in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Tenant-Id - name: authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/gateway__app__routers__verify__ChallengeRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/gateway__app__routers__verify__ChallengeResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-payment-info: authMode: api_key /x402/verify: post: tags: - X402 summary: Verify description: Submit tx_id for verification using per-tenant payout address as expected receiver. operationId: verify_x402_verify_post parameters: - name: tenant_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Tenant Id - name: x-tenant-id in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Tenant-Id - name: authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/gateway__app__routers__verify__VerifyRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/gateway__app__routers__verify__VerifyResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-payment-info: authMode: api_key components: schemas: ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError gateway__app__routers__verify__ChallengeRequest: properties: resource_id: type: string title: Resource Id type: object required: - resource_id title: ChallengeRequest HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError gateway__app__routers__verify__ChallengeResponse: properties: resource_id: type: string title: Resource Id network: type: string title: Network receiver: type: string title: Receiver amount_microalgos: type: integer title: Amount Microalgos payment_reference: type: string title: Payment Reference price_token: anyOf: - type: string - type: 'null' title: Price Token note_binding_required: type: boolean title: Note Binding Required default: false note_prefix: anyOf: - type: string - type: 'null' title: Note Prefix type: object required: - resource_id - network - receiver - amount_microalgos - payment_reference title: ChallengeResponse gateway__app__routers__verify__VerifyResponse: properties: verified: type: boolean title: Verified error: anyOf: - type: string - type: 'null' title: Error access_token: anyOf: - type: string - type: 'null' title: Access Token settlement_attestation: anyOf: - additionalProperties: true type: object - type: 'null' title: Settlement Attestation settlement_attestation_jws: anyOf: - type: string - type: 'null' title: Settlement Attestation Jws type: object required: - verified title: VerifyResponse gateway__app__routers__verify__VerifyRequest: properties: resource_id: type: string title: Resource Id network: type: string title: Network tx_id: type: string title: Tx Id price_token: anyOf: - type: string - type: 'null' title: Price Token type: object required: - resource_id - network - tx_id title: VerifyRequest x-discovery: ownershipProofs: - eb10b2d7fb1e2fcbea7a4c5b031e339daacc7cf37d1fb569c58849287c121633 resources: - https://api.algovoi.co.uk/mpp/probe resourcesCatalog: https://api.algovoi.co.uk/discovery/resources