Refund a transaction

POST/v1.0/merchants/{merchant_code}/payments/{transaction_id}/refunds

Refunds a transaction identified by its SumUp transaction ID. Omit the request body to request a full refund, or provide amount for a partial refund in the transaction's currency.

Retrieve the transaction afterwards to inspect its refunded amount and refund events. The transaction must be eligible for a refund; see the error responses for invalid amounts, permissions, and processing failures.

OAuth scopes: Requires one of: payments, refunds.write.

Authorization

Use one of the following alternatives:

  • apiKey
  • oauth2 with scopes paymentsrefunds.write
Authorization guide

Path parameters

  • merchant_codestringrequired

    Short unique identifier for the merchant.

    Example: "MH4H92C7"

  • transaction_idstringrequired

    Unique identifier of the transaction.

    Example: "4ffb8dfc-7f2b-413d-a497-2ad00766585e"

Body parameters

application/json

Optional amount for partial refunds.

  • amountnumber
    format: float

    Amount to refund in major units of the transaction's currency, for example 5 for EUR 5.00. It must be greater than zero and cannot exceed the amount eligible for a refund. Eligibility depends on the transaction and country/currency rules. If omitted, the system requests a full refund.

    Example: 5

Responses

201application/json

The transaction was refunded in full or partially based on the request.

    400application/problem+json

    The refund request is invalid.

    • typestringrequired
      format: uri

      A URI reference that identifies the problem type.

      Example: "https://developer.sumup.com/problem/not-found"

    • titlestring

      A short, human-readable summary of the problem type.

      Example: "Requested resource couldn't be found."

    • statusinteger

      The HTTP status code generated by the origin server for this occurrence of the problem.

      Example: 404

    • detailstring

      A human-readable explanation specific to this occurrence of the problem.

      Example: "The requested resource doesn't exist or does not belong to you."

    • instancestring
      format: uri

      A URI reference that identifies the specific occurrence of the problem.

      Example: "https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"

    403application/problem+json

    The request is authenticated but not permitted for this operation.

    • typestringrequired
      format: uri

      A URI reference that identifies the problem type.

      Example: "https://developer.sumup.com/problem/not-found"

    • titlestring

      A short, human-readable summary of the problem type.

      Example: "Requested resource couldn't be found."

    • statusinteger

      The HTTP status code generated by the origin server for this occurrence of the problem.

      Example: 404

    • detailstring

      A human-readable explanation specific to this occurrence of the problem.

      Example: "The requested resource doesn't exist or does not belong to you."

    • instancestring
      format: uri

      A URI reference that identifies the specific occurrence of the problem.

      Example: "https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"

    404application/problem+json

    The requested transaction does not exist or does not belong to the merchant.

    • typestringrequired
      format: uri

      A URI reference that identifies the problem type.

      Example: "https://developer.sumup.com/problem/not-found"

    • titlestring

      A short, human-readable summary of the problem type.

      Example: "Requested resource couldn't be found."

    • statusinteger

      The HTTP status code generated by the origin server for this occurrence of the problem.

      Example: 404

    • detailstring

      A human-readable explanation specific to this occurrence of the problem.

      Example: "The requested resource doesn't exist or does not belong to you."

    • instancestring
      format: uri

      A URI reference that identifies the specific occurrence of the problem.

      Example: "https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"

    409application/problem+json

    The transaction cannot be refunded due to business constraints.

    • typestringrequired
      format: uri

      A URI reference that identifies the problem type.

      Example: "https://developer.sumup.com/problem/not-found"

    • titlestring

      A short, human-readable summary of the problem type.

      Example: "Requested resource couldn't be found."

    • statusinteger

      The HTTP status code generated by the origin server for this occurrence of the problem.

      Example: 404

    • detailstring

      A human-readable explanation specific to this occurrence of the problem.

      Example: "The requested resource doesn't exist or does not belong to you."

    • instancestring
      format: uri

      A URI reference that identifies the specific occurrence of the problem.

      Example: "https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"

    422application/problem+json

    The refund could not be processed by the payment processor.

    • typestringrequired
      format: uri

      A URI reference that identifies the problem type.

      Example: "https://developer.sumup.com/problem/not-found"

    • titlestring

      A short, human-readable summary of the problem type.

      Example: "Requested resource couldn't be found."

    • statusinteger

      The HTTP status code generated by the origin server for this occurrence of the problem.

      Example: 404

    • detailstring

      A human-readable explanation specific to this occurrence of the problem.

      Example: "The requested resource doesn't exist or does not belong to you."

    • instancestring
      format: uri

      A URI reference that identifies the specific occurrence of the problem.

      Example: "https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"

    Type to search…