Creation of a refund Run in API Explorer

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://bump.sh/pgw/doc/imoje-api-en/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"imoje API eng MCP server": {
  "url": "https://bump.sh/pgw/doc/imoje-api-en/mcp"
}
Close
POST /{merchantId}/transaction/{transactionId}/refund

This request allows you to make a refund for a paid transaction.

When making multiple refund transactions simultaneously, please allow at least a 5-second delay between each transaction.

For security reasons, refunds can be made:

  • for BLIK, up to a maximum of 12 months
  • for imoje pay later, up to a maximum of 12 months
  • for payment cards, up to 3 years

Path parameters

  • merchantId string Required

    Merchant identifier

  • transactionId string(uuid) Required

    Transaction identifier as UUID v4

    Maximum length is 36. Format should match the following pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$.

application/json

Body Required

  • type string Required

    Transaction type

    Value is refund.

  • serviceId string(uuid) Required

    Shop identifier as UUID v4

    Maximum length is 36. Format should match the following pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$.

  • amount integer Required

    The transaction amount in the smallest currency unit, e.g. pennies.

  • title string

    Transaction title

    Maximum length is 255. Format should match the following pattern: ^[A-Za-z0-9#&_\-\,\.\\\\/ \u00C0-\u02C0"']+$.

  • sendRefundConfirmationEmail boolean

    Send an e-mail confirming the refund to the payer. The e-mail is sent after the refund has been successfully processed (status settled) to the e-mail address provided when placing the order.

Responses

  • 200 application/json

    Request executed correctly

    Hide response attributes Show response attributes object
    • transaction object
      Hide transaction attributes Show transaction attributes object
      • id string(uuid)

        Transaction identifier as UUID v4

        Maximum length is 36. Format should match the following pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$.

      • type string

        Typ transakcji

        Value is refund.

      • status string

        Status

        Values are new, pending, settled, authorized, rejected, cancelled, or error.

      • source string

        Transaction source

        Values are web or api.

      • created integer | null

        Creation date as timestamp

      • modified integer | null

        Modification date as timestamp

      • serviceId string(uuid)

        Shop identifier as UUID v4

        Maximum length is 36. Format should match the following pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$.

      • amount integer

        The transaction amount in the smallest currency unit, e.g. pennies.

      • currency string

        Transaction currency in the ISO 4217 standard

        Maximum length is 3. Values are PLN, EUR, USD, GBP, CHF, SEK, HUF, CZK, BGN, or RON.

      • orderId string

        Order ID

        Maximum length is 100. Format should match the following pattern: ^[A-Za-z0-9#_\-\.\\\\/ \u00C0-\u02C0]+$.

      • paymentMethod string

        Payment method description

        Values are blik, pbl, ing, card, wallet, imoje_paylater, wt, or imoje_installments.

      • paymentMethodCode string

        Payment method code

        Values are blik, imoje_twisto, paypo, blik_paylater, pragma_go, gpay, applepay, visa_mobile, paypal, ecom3ds, oneclick, recurring, ing, mtransfer, bzwbk, pekao24, inteligo, ipko, getin, noble, creditagricole, alior, millennium, citi, bos, bnpparibas, pocztowy, plusbank, bs, bspb, nest, pbs, cs, mp, kb, rf, pg, pf, cb, uc, posta, sporo, tatra, viamo, vub, wt, wt_split, inbank, or inbank_0.

      • * string | integer | number | boolean | object | array Additional properties

        Additional parameters that are not described and may appear in the response as part of API development.

        Your API response validation scheme should always allow new parameters.

    • * string | integer | number | boolean | object | array Additional properties

      Additional parameters that are not described and may appear in the response as part of API development.

      Your API response validation scheme should always allow new parameters.

  • 422 application/json

    The payload does not contain the required parameters, contains unacceptable parameters, or the values sent in them do not meet the requirements.

    Hide response attributes Show response attributes object
    • apiErrorResponse object

      Error details

      Hide apiErrorResponse attributes Show apiErrorResponse attributes object
      • code string

        Error code

      • message string

        Error message

      • instance object

        Body of the HTTP request sent to imoje.

        Hide instance attribute Show instance attribute object
        • * string | integer | number | boolean | object | array Additional properties

          Additional parameters that are not described and may appear in the response as part of API development.

          Your API response validation scheme should always allow new parameters.

      • errors array[object]

        List of errors

        Hide errors attributes Show errors attributes object
        • property string

          Location of the error

        • message string

          Cause of error

        • * string | integer | number | boolean | object | array Additional properties

          Additional parameters that are not described and may appear in the response as part of API development.

          Your API response validation scheme should always allow new parameters.

      • * string | integer | number | boolean | object | array Additional properties

        Additional parameters that are not described and may appear in the response as part of API development.

        Your API response validation scheme should always allow new parameters.

    • * string | integer | number | boolean | object | array Additional properties

      Additional parameters that are not described and may appear in the response as part of API development.

      Your API response validation scheme should always allow new parameters.

POST /{merchantId}/transaction/{transactionId}/refund
curl \
 --request POST 'https://api.imoje.pl/v1/merchant/{merchantId}/transaction/{transactionId}/refund' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"type":"refund","serviceId":"24737aab-a507-4feb-8248-3f42bfdbb006","amount":100,"title":"yourRefundTitle","sendRefundConfirmationEmail":true}'
Request example
{
  "type": "refund",
  "serviceId": "24737aab-a507-4feb-8248-3f42bfdbb006",
  "amount": 100,
  "title": "yourRefundTitle",
  "sendRefundConfirmationEmail": true
}
Response examples (200)
{
  "transaction": {
    "id": "2eea6c95-51fc-446a-bedc-03e4b197ffd0",
    "type": "refund",
    "status": "settled",
    "source": "api",
    "created": 1735686000,
    "modified": 1735686000,
    "serviceId": "51cd18a7-68dc-49a7-bb23-3854bbc34627",
    "amount": 1000,
    "currency": "PLN",
    "orderId": "yourOrderId",
    "paymentMethod": "blik",
    "paymentMethodCode": "blik"
  }
}
Response examples (422)
{
  "apiErrorResponse": {
    "code": "TRX-ERROR-120100",
    "message": "Refund amount too large.",
    "instance": {
      "type": "refund",
      "serviceId": "51cd18a7-68dc-49a7-bb23-3854bbc34627",
      "amount": 2000
    },
    "errors": []
  }
}