# Create a SEPA Direct Debit refund

Refunds a SEPA Direct Debit transaction for a freelancer.  Note that the refund request will be rejected if any of the following criteria are met:  The account is inactive. The account is blocked (for any reason). The SDD was already returned. The amount is positive. The valuta date is older than 56 days (i.e., 8 weeks). You can refund older SDDs by contacting Solaris customer support (up to 13 months from the valuta date).   Note: This call triggers the change request process.

Endpoint: POST /v1/persons/{person_id}/accounts/{account_id}/sepa_direct_debit_returns
Version: 1.0

## Path parameters:

  - `person_id` (string, required)

  - `account_id` (string, required)

## Request fields (application/json):

  - `booking_id` (string, required)
    The ID of the SEPA Direct Debit booking resource to be refunded.
    Example: "16d088c2-14ff-5da1-a373-b7b4623befca"

  - `reason` (string)
    A description of why the SDD should be refunded.
    Example: "Example reason"

## Response 200 fields (application/json):

  - `id` (string)
    ID of the already created SDD refund
    Example: "be6b2a68-2c93-4d39-b56e-0897b8137473"

## Response 201 fields (application/json):

  - `id` (string)
    Unique ID of the SEPA Direct Debit return.
    Example: "257eb92c4656691fd02d3de1fa88b9f5csdr"

  - `creditor_iban` (string)
    The creditor's IBAN.
    Example: "DE32110101001000000029"

  - `creditor_name` (string)
    The creditor's name.
    Example: "Peter Mustermann"

  - `creditor_identifier` (string)
    Unique reference that identifies a party collecting payments under the SEPA Direct Debit scheme within and across 32 countries. See the [Deutsche Bundesbank's definition of creditor identifier](https://www.bundesbank.de/en/tasks/payment-systems/services/sepa/creditor-identifier/creditor-identifier-626704) for more information.
    Example: "DE98ZZZ09999999999"

  - `mandate_reference` (string)
    Reference of the mandate. Must be unique for the creditor identifier.
    Example: "SOBKTEST"

  - `amount` (object)
    The amount of the booking.

  - `amount.value` (integer)
    The amount value.
    Example: 1000

  - `amount.unit` (string)
    The unit of the given value in cents.
    Example: "cents"

  - `amount.currency` (string)
    The currency of the given value. Only EUR is currently supported.
    Example: "EUR"

  - `end_to_end_id` (string)
    SEPA identifier provided by the transaction initiator, which will be routed throughout the whole payment process.
    Example: "DD-12-28.05.2018"

  - `sepa_return_code` (string)
    SEPA return code.
    Example: "MD01"

  - `description` (string)
    Additional details about the booking.

  - `recorded_at` (string)
    The timestamp from when the return was recorded.
    Example: "2018-08-12T13:58:58.000Z"

  - `customer_id` (string)
    The customer's ID.
    Example: "74c586d116e7dcd138af3dd5d754f2abcper"

  - `customer_type` (string)
    Specifies whether the customer is a Person or Business.
    Enum: "Person", "Business"

  - `account_id` (string)
    The customer's Solaris account ID.
    Example: "3eb274b98be7afb13d91acb8ae53901ecacc"

## Response 202 fields (application/json):

  - `id` (string)
    ID of the change request.
    Example: "d6c778822b2d7bd3b778935bcfd0d1d3csc"

  - `status` (string)
    The current status of the change request.
    Enum: "ACCEPTED", "AUTHORIZATION_REQUIRED", "CONFIRMATION_REQUIRED", "COMPLETED", "FAILED"

  - `updated_at` (string)
    UTC timestamp from the last time the change request was updated.
    Example: "2022-04-21T13:59:52+00:00"

  - `url` (string)
    URL to use to authorize the change request.
    Example: "https://example.com/authorize"

## Response 400 fields (application/json):

  - `id` (string)
    Example: "a95f2aaf-4e0c-4d49-8021-8a16a884ed86"

  - `status` (string)
    Example: "400"

  - `code` (string)
    Example: "build_pagination_headers_failure"

  - `title` (string)
    Example: "Failed to build pagination headers."

  - `detail` (string)
    Example: "Cannot connect to database."

## Response 403 fields (application/json):

  - `id` (string)
    Example: "a95f2aaf-4e0c-4d49-8021-8a16a884ed86"

  - `status` (string)
    Example: "403"

  - `code` (string)
    Example: "unauthorized_action"

  - `title` (string)
    Example: "Unauthorized Action"

  - `detail` (string)
    Example: "Unauthorized action is not allowed."

## Response 404 fields (application/json):

  - `id` (string)
    Example: "a95f2aaf-4e0c-4d49-8021-8a16a884ed86"

  - `status` (string)
    Example: "404"

  - `code` (string)
    Example: "model_not_found"

  - `title` (string)
    Example: "Model Not Found"

  - `detail` (string)
    Example: "Couldn't find 'Solaris::Identification' for id 'bbbcccfff388923eb899a5852df6cidt'."

## Response 500 fields (application/json):

  - `id` (string)
    Example: "e8915041-9d8c-4d96-9dd1-04e8522ecdbf"

  - `status` (string)
    Example: "500"

  - `code` (string)
    Example: "generic_error"

  - `title` (string)
    Example: "Generic Error"

  - `detail` (string)
    Example: "There was an error."


## Response default fields
