Utworzenie zwrotu 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/mcp

Standard setup for AI tools providing an mcp.json file

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

Zapytanie umożliwia wykonanie zwrotu do opłaconej transakcji.

Podczas wykonywania wielu transakcji zwrotu jednocześnie, należy wprowadzić co najmniej 5-cio sekundowe opóźnienie pomiędzy kolejnymi transakcjami.

Ze względów bezpieczeństwa zwroty można wykonywać:

  • w przypadku BLIK maksymalnie do 12 miesięcy
  • dla imoje płacę później maksymalnie do 12 miesięcy
  • dla kart płatniczych do 3 lat

Path parameters

  • merchantId string Required

    Identyfikator klienta

  • transactionId string(uuid) Required

    Identyfikator transakcji jako 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

    Typ transakcji

    Value is refund.

  • serviceId string(uuid) Required

    Identyfikator sklepu jako 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

    Kwota transakcji w najmniejszej jednostce waluty np. grosze.

  • title string

    Tytuł transakcji

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

  • sendRefundConfirmationEmail boolean

    Wyślij e-mail z potwierdzeniem zwrotu do płatnika. Mail jest wysyłany po poprawnym zrealizowaniu zwrotu (status settled) na adres e-mail podany przy składaniu zamówienia.

Responses

  • 200 application/json

    Zapytanie wykonane poprawnie

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

        Identyfikator transakcji jako 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

        Żródło transakcji

        Values are web or api.

      • created integer | null

        Data utworzenia jako timestamp

      • modified integer | null

        Data modyfikacji jako timestamp

      • serviceId string(uuid)

        Identyfikator sklepu jako 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

        Kwota transakcji w najmniejszej jednostce waluty np. grosze.

      • currency string

        Waluta transakcji w standardzie ISO 4217

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

      • orderId string

        Numer zamówienia

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

      • paymentMethod string

        Oznaczenie metody płatności

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

      • paymentMethodCode string

        Oznaczenie kanału płatności

        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

        Dodatkowe parametry, które nie są opisane i mogą pojawić się w odpowiedzi w ramach rozwoju API.

        Twój schemat walidacyjny odpowiedzi API powinien zawsze dopuszczać nowe parametry.

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

      Dodatkowe parametry, które nie są opisane i mogą pojawić się w odpowiedzi w ramach rozwoju API.

      Twój schemat walidacyjny odpowiedzi API powinien zawsze dopuszczać nowe parametry.

  • 422 application/json

    Payload nie zawiera wymaganaych parametrów, zawiera niedopuszczalne parametry, lub przesłane w nich wartości nie spełniają wymogów.

    Hide response attributes Show response attributes object
    • apiErrorResponse object

      Szczegóły błędu

      Hide apiErrorResponse attributes Show apiErrorResponse attributes object
      • code string

        Kod błędu

      • message string

        Komunikat błędu

      • instance object

        Body przesłanego zapytania HTTP do imoje.

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

          Dodatkowe parametry, które nie są opisane i mogą pojawić się w odpowiedzi w ramach rozwoju API.

          Twój schemat walidacyjny odpowiedzi API powinien zawsze dopuszczać nowe parametry.

      • errors array[object]

        Lista błędów

        Hide errors attributes Show errors attributes object
        • property string

          Miejsce wystąpienia błędu

        • message string

          Powód wystąpienia błędu

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

          Dodatkowe parametry, które nie są opisane i mogą pojawić się w odpowiedzi w ramach rozwoju API.

          Twój schemat walidacyjny odpowiedzi API powinien zawsze dopuszczać nowe parametry.

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

        Dodatkowe parametry, które nie są opisane i mogą pojawić się w odpowiedzi w ramach rozwoju API.

        Twój schemat walidacyjny odpowiedzi API powinien zawsze dopuszczać nowe parametry.

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

      Dodatkowe parametry, które nie są opisane i mogą pojawić się w odpowiedzi w ramach rozwoju API.

      Twój schemat walidacyjny odpowiedzi API powinien zawsze dopuszczać nowe parametry.

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": []
  }
}