openapi: 3.1.0 info: title: Payments API version: 1.2.0 description: Consultation des transactions de paiement. servers: - url: https://api.example.com/payments/v1 tags: - name: Transactions x-api-policies: auth: type: oauth2 oauth2: introspectionRef: secret:oauth/introspection requiredScopes: [payments.read] rate-limit: limit: 100 window: 1m scope: per-consumer algorithm: sliding-window onExceeded: reject cors: allowOrigins: [https://app.example.com] allowMethods: [GET, OPTIONS] allowHeaders: [Authorization, Content-Type] allowCredentials: true maxAge: 1h request-validation: validateBody: true validateParams: true onInvalid: reject timeouts: request: 30s paths: /transactions/{transactionId}: get: operationId: getTransaction tags: [Transactions] parameters: - name: transactionId in: path required: true schema: type: string minLength: 1 responses: "200": description: Transaction trouvée content: application/json: schema: $ref: "#/components/schemas/Transaction" "404": description: Transaction inconnue components: schemas: Transaction: type: object required: [id, amount, currency, status] properties: id: { type: string } amount: { type: number, minimum: 0 } currency: { type: string, pattern: "^[A-Z]{3}$" } status: type: string enum: [pending, completed, rejected]