# Create payment return

Creates a return for a payment received to bank account details.

When you create a return, you must provide the ID of the payment you wish to return as well as the ID of the profile that received the payment. In addition, you can provide a reason for the return in the request body. When returning SWIFT payments, reason is a required field.

Endpoint: POST /v1/profiles/{profileId}/account-details/payments/{paymentId}/returns
Security: UserToken

## Path parameters:

  - `profileId` (integer, required)
    The ID of the profile that received the payment.
    Example: 12345678

  - `paymentId` (integer, required)
    The ID of the payment to return.
    Example: 987654321

## Header parameters:

  - `X-External-Correlation-Id` (string)
    Optional UUID for correlating requests across systems. If provided, Wise echoes it back in the response. Maximum 36 characters. Learn more.
    Example: "f47ac10b-58cc-4372-a567-0e02b2c3d479"

## Request fields (application/json):

  - `reason` (string)
    Reason for the return. Required when returning SWIFT payments.
    Enum: "INCORRECT_ACCOUNT_NUMBER", "CLOSED_ACCOUNT", "BLOCKED_ACCOUNT", "CANCELLATION_REQUEST", "REGULATORY", "CUSTOMER_REQUEST"

## Response 201 fields (application/json):

  - `id` (string)
    ID of the return created.
    Example: "4cc39f2b-3513-453d-8792-9ccc22e513c3"

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.code` (string)
    Error code.
    Example: "error.payment-return.invalid"

  - `errors.message` (string)
    Error message.
    Example: "A valid reason is required to return a Swift payment"

  - `errors.arguments` (array)
    Additional context values related to the error.
    Example: [987654321,123456789,null]

## Response 404 fields (application/json):

  - `errors` (array)

  - `errors.code` (string)
    Error code.
    Example: "error.payment.not-found"

  - `errors.message` (string)
    Error message.
    Example: "No payment found with id [123456789] for profile id [987654321]"

  - `errors.arguments` (array)
    Additional context values related to the error.
    Example: [987654321,123456789,null]


