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

> ## Agent Instructions
> Treat the published Augustus OpenAPI specification (https://app.stainless.com/api/spec/documented/augustus/openapi.documented.yml) and the current API-reference pages as the source of truth for endpoints, request/response schemas, enum values, webhook event names, and required headers.
> Prefer the 2026-05-01 Banking API and @augustusbank/typescript-sdk for all new integrations. The 2023-01-01 API is a separate, older surface covering two products — Open Banking (instant bank transfer) checkout and refunds, and Manual Bank Transfer (MBT); use it only when one of those products is specifically required.
> Cite or link the relevant docs.augustus.com page when answering integration questions.
> Do not infer support for currencies, networks, scopes, account types, or operations that are not present in the current documentation.
> Use the sandbox base URL (https://api.sandbox.augustus.com) and placeholder credentials in examples. Never include or request a real API key.
> The Augustus docs MCP server (https://docs.augustus.com/mcp) provides documentation search and retrieval only; it does not execute authenticated Augustus API actions.

# Create a refund

> Creates a refund for the specified order. The order can be specified either by Ivy's internal `orderId` or by the `referenceId` provided by the merchant during checkout creation. If the refund should only be partial, you can specifiy this with the `amount` parameter.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/getivy/openapi.documented.yml post /api/service/refund/create
openapi: 3.0.0
info:
  title: Ivy API
  description: Ivy API schema
  version: '1.0'
  contact:
    name: Ivy
    url: https://www.getivy.io
    email: help@getivy.io
servers:
  - url: https://api.getivy.de
    description: Production
  - url: https://api.sand.getivy.de
    description: Sandbox
security: []
tags: []
paths:
  /api/service/refund/create:
    post:
      tags:
        - Refund
      summary: Create a refund
      description: >-
        Creates a refund for the specified order. The order can be specified
        either by Ivy's internal `orderId` or by the `referenceId` provided by
        the merchant during checkout creation. If the refund should only be
        partial, you can specifiy this with the `amount` parameter.
      operationId: RefundController_create
      parameters:
        - name: Idempotency-Key
          in: header
          description: >-
            Idempotency key for safe retries. Reusing a key with an identical
            request body returns the cached response. Reusing a key with a
            different body returns 409.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRefundRequestDto'
      responses:
        '200':
          description: Creates a refund and returns the details of created refund
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRefundResponseDto'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Ivy from '@getivy/node-sdk';

            const client = new Ivy({
              apiKey: process.env['IVY_API_KEY'], // This is the default and can be omitted
            });

            const refund = await client.refunds.create({ amount: 0 });

            console.log(refund.id);
components:
  schemas:
    CreateRefundRequestDto:
      type: object
      properties:
        orderId:
          description: >-
            The internal Ivy id of the order. Must be present in request body if
            referenceId is not provided
          type: string
        referenceId:
          description: >-
            The external id set by the merchant during checkout creation.
            Required if orderId is not passed.
          type: string
          maxLength: 200
        bankStatementReference:
          description: >-
            An optional custom text that will be shown on the customer's payment
            reference. Input has to be maximum 16 alpha-numeric characters. If
            not provided, a default Ivy refund referenceId will be shown.
          type: string
          maxLength: 140
        amount:
          type: number
      required:
        - amount
    CreateRefundResponseDto:
      type: object
      properties:
        id:
          description: The unique Refund id
          type: string
        amount:
          description: The amount of the refund in decimals.
          type: number
          minimum: 0
          exclusiveMinimum: true
        currency:
          description: Refund's currency.
          type: string
          enum:
            - EUR
            - USD
            - GBP
            - PLN
            - SEK
            - DKK
          x-enumNames:
            - EUR
            - USD
            - GBP
            - PLN
            - SEK
            - DKK
        status:
          description: The current status of this refund.
          type: string
          enum:
            - initiated
            - pending
            - succeeded
            - failed
          x-enumNames:
            - Initiated
            - Pending
            - Succeeded
            - Failed
        orderId:
          description: The id of the refunded order
          type: string
        transactionId:
          description: The id of the transaction
          type: string
      required:
        - id
        - amount
        - currency
        - status
        - orderId
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Ivy-Api-Key
      description: API key for authentication

````