openapi: 3.0.3 info: title: TrueLayer Payments Mandates Refunds API description: The TrueLayer Payments API v3 enables applications to create and manage open banking payments, payouts, refunds, and variable recurring payment mandates across the UK and EU. TrueLayer connects to 69+ banks and provides a unified interface for instant bank payments using open banking rails. Authentication requires signed requests with private keys and OAuth2 access tokens. version: 3.0.0 contact: name: TrueLayer Support url: https://docs.truelayer.com termsOfService: https://truelayer.com/legal/ servers: - url: https://api.truelayer.com description: TrueLayer Production API - url: https://api.truelayer-sandbox.com description: TrueLayer Sandbox (testing) security: - BearerAuth: [] tags: - name: Refunds description: Refund payments back to users paths: /v3/payments/{id}/refunds: post: summary: Create Refund description: Initiate a refund for a completed payment. operationId: createRefund tags: - Refunds parameters: - name: id in: path required: true description: Payment UUID to refund schema: type: string format: uuid - name: Tl-Signature in: header required: true schema: type: string - name: Idempotency-Key in: header required: true schema: type: string format: uuid requestBody: required: true content: application/json: schema: type: object required: - amount_in_minor properties: amount_in_minor: type: integer description: Refund amount in minor currency units reference: type: string description: Reference shown on user's bank statement metadata: type: object description: Up to 10 custom key-value pairs responses: '200': description: Refund initiated content: application/json: schema: type: object properties: id: type: string format: uuid status: type: string enum: - pending - authorized - executed - failed '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' get: summary: List Payment Refunds description: Returns all refunds for a specific payment. operationId: listPaymentRefunds tags: - Refunds parameters: - name: id in: path required: true schema: type: string format: uuid responses: '200': description: List of refunds content: application/json: schema: type: object properties: items: type: array items: type: object properties: id: type: string format: uuid amount_in_minor: type: integer status: type: string created_at: type: string format: date-time '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: responses: BadRequest: description: Bad request - invalid parameters content: application/json: schema: type: object properties: type: type: string title: type: string trace_id: type: string errors: type: object Unauthorized: description: Unauthorized - invalid token or missing signature content: application/json: schema: type: object properties: type: type: string title: type: string NotFound: description: Resource not found content: application/json: schema: type: object properties: type: type: string title: type: string securitySchemes: BearerAuth: type: http scheme: bearer description: OAuth2 access token with payments scope