openapi: 3.2.0 info: title: XRPay Cashier Refunds API version: '2026-08-30' description: 'Server-to-server API for payments, consolidated balances, bank and Mobile Money payouts, payroll, refunds, and signed webhooks. Test credentials use isolated virtual balances: a successful local-currency payment simulation can fund a test payout, and executing that payout never contacts a bank or Mobile Money network. Payment-intent amounts are integer minor units; payout and payroll amounts are exact decimal strings. Provider identities and custody allocations are never exposed.' servers: - url: https://api.xrpay.it security: - bearerAuth: [] tags: - name: Refunds paths: /api/v1/refunds: get: tags: - Refunds summary: List refunds operationId: listRefunds x-required-scope: refund.read parameters: - name: payment_intent_id in: query schema: type: string - name: limit in: query schema: type: integer minimum: 1 maximum: 100 default: 25 responses: '200': description: Refund list content: application/json: schema: $ref: '#/components/schemas/RefundList' post: tags: - Refunds summary: Create a full or partial refund description: Live XRPay refunds are non-custodial and enter requires_action until the merchant approves and signs them. operationId: createRefund x-required-scope: refund.write parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RefundCreate' responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/Refund' '200': description: Idempotent replay content: application/json: schema: $ref: '#/components/schemas/Refund' '409': $ref: '#/components/responses/Error' /api/v1/refunds/{id}: get: tags: - Refunds summary: Retrieve a refund operationId: retrieveRefund x-required-scope: refund.read parameters: - $ref: '#/components/parameters/ResourceId' responses: '200': description: Refund content: application/json: schema: $ref: '#/components/schemas/Refund' '404': $ref: '#/components/responses/Error' components: parameters: ResourceId: name: id in: path required: true schema: type: string IdempotencyKey: name: Idempotency-Key in: header required: true schema: type: string minLength: 8 maxLength: 255 pattern: ^[A-Za-z0-9._:/-]+$ description: Stable key for one logical operation. Reusing a key with different parameters returns HTTP 409. schemas: Refund: type: object required: - object - id - payment_intent_id - status - amount_minor - currency properties: object: const: refund id: type: string payment_intent_id: type: string status: enum: - pending - requires_action - processing - completed - failed - canceled amount_minor: type: integer currency: type: string settlement: $ref: '#/components/schemas/Settlement' type: enum: - full - partial reason: type: - string - 'null' external_refund_id: type: - string - 'null' next_action: type: - object - 'null' livemode: type: boolean sandbox_simulated: type: boolean created_at: type: string format: date-time updated_at: type: string format: date-time completed_at: type: - string - 'null' format: date-time failed_at: type: - string - 'null' format: date-time Settlement: type: object properties: amount: type: string currency: type: string transaction_hash: type: - string - 'null' destination_address: type: - string - 'null' RefundCreate: type: object additionalProperties: false required: - payment_intent_id properties: payment_intent_id: type: string amount_minor: type: integer minimum: 1 description: Omit to refund the remaining refundable amount. reason: type: string maxLength: 500 external_refund_id: type: string maxLength: 200 Error: type: object required: - error properties: error: type: object required: - type - message properties: type: type: string code: type: - string - 'null' message: type: string RefundList: type: object required: - object - data - has_more properties: object: const: list data: type: array items: $ref: '#/components/schemas/Refund' has_more: type: boolean responses: Error: description: Error response content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearerAuth: type: http scheme: bearer description: Secret API key or XRPay Connect access token.