Payment link cancellation. 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}/payment/cancel

Path parameters

  • merchantId string Required

    Merchant identifier

application/json

Body Required

  • 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}$.

  • paymentId string(uuid) Required

    Payment link 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}$.

Responses

  • 200 application/json

    Request executed correctly

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

      Payment link 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}$.

    • url string

      Adres przekierowania do płatności

    • 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}$.

    • orderId string

      Order ID

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

    • title string

      Transaction title

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

    • simp string

      Numer rachunku SIMP przy włączonej usłudze płatności masowych

    • amount integer

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

    • currency string

      Status

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

    • status string

      Status

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

    • isActive boolean

      Informacja czy link płatności jest aktywny

    • validTo integer | null

      Transaction expiry date as a timestamp in seconds. Failure to complete the payment by this time will result in its cancellation. If not specified, the transaction is valid until the time set in the Payment activity parameter in the imoje Administration Panel (shop settings) or after 15 months. Passing the parameter validTo= NULL causes the transaction not to expire, ignoring the settings in the Payment activity parameter in the imoje Administration Panel (shop settings). The minimum link validity time is 60 seconds.

    • created integer | null

      Creation date as timestamp

    • modified integer | null

      Modification date as timestamp

    • isGenerated boolean

      Informacja czy link płatności został wygenerowany z poziomu panelu imoje.

    • isUsed boolean

      Informacja czy link płatności został użyty.

    • usedAt integer

      Data użycia linku płatności jako timestamp

    • isConfirmVisited boolean

      Information on whether the payer visited the payment confirmation page in the imoje gateway.

    • confirmVisitedAt integer | null

      The date of transition to the payment confirmation page in the imoje gateway as a timestamp.

    • returnUrl string(uri)

      Return address from the external payment processing site in the event of an undetermined transaction status. The address must comply with the RFC 3986` URL standard.

      Maximum length is 300.

    • failureReturnUrl string(uri)

      Return address from the external payment processing site in the event of a payment error. The address must comply with the RFC 3986` URL standard.

      Maximum length is 300.

    • successReturnUrl string(uri)

      Return address from the external payment processing site in case of successful payment. The address must comply with the RFC 3986` URL standard.

      Maximum length is 300.

    • notificationUrl string(uri)

      Dynamic notification address, possibility to set a specific address for a single transaction. Addresses containing localhost and ports will be rejected.

      Maximum length is 300.

    • customer object

      Payer data

      Hide customer attributes Show customer attributes object
      • firstName string

        Payer's first name

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

      • lastName string

        Payer's last name

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

      • email string(email)

        The payer's e-mail address in a format compliant with the RFC 5322 and RFC 6531 standards.

        Maximum length is 200.

      • phone string

        Payer's phone number

        Maximum length is 20. Format should match the following pattern: ^[0-9\+\- ]+$.

      • cid string

        Payer ID. (Required for oneclick and recurring payments).

        Maximum length is 36. Format should match the following pattern: ^[A-Za-z0-9\x2D]+$.

      • company string

        Payer's company name

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

      • locale string

        Maximum length is 2. Values are pl, en, cs, de, es, fr, it, lt, ru, sk, sl, uk, nl, hu, ro, bg, or sv.

      • * 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.

    • transactions array[object]

      List of transactions assigned to the payment link.

      Hide transactions attributes Show transactions 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

        Transaction type

        Values are sale or 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

      • notificationUrl string(uri)

        Dynamic notification address, possibility to set a specific address for a single transaction. Addresses containing localhost and ports will be rejected.

        Maximum length is 300.

      • 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.

      • title string

        Transaction title

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

      • 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

        The payment channel set as default and automatically selected when the payment gateway is opened. If this field is not present, the gateway opens without a selected payment channel. The field cannot be defined and left without a value.

        Maximum length is 20. 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.

      • payment object
        Hide payment attributes Show payment attributes object
        • id string(uuid)

          Payment link 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}$.

        • status string

          Status

          Values are new, pending, settled, authorized, rejected, cancelled, or 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.

  • 400 application/json

    The link cannot be canceled.

    Hide response attributes Show response attributes object
    • apiErrorResponse object
      Hide apiErrorResponse attributes Show apiErrorResponse attributes object
      • message string
      • * 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}/payment/cancel
curl \
 --request POST 'https://api.imoje.pl/v1/merchant/{merchantId}/payment/cancel' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"serviceId":"2a249f52-d29c-46e7-9575-e65a889c7d38","paymentId":"50d38a51-8e95-4b8b-94f4-188c90c0dfdd"}'
Request example
{
  "serviceId": "2a249f52-d29c-46e7-9575-e65a889c7d38",
  "paymentId": "50d38a51-8e95-4b8b-94f4-188c90c0dfdd"
}
Response examples (200)
{
  "id": "50d38a51-8e95-4b8b-94f4-188c90c0dfdd",
  "url": "https://paywall.imoje.pl/s/ev3rBoIc3v",
  "serviceId": "2a249f52-d29c-46e7-9575-e65a889c7d38",
  "orderId": "yourOrderId",
  "title": "yourTitle",
  "simp": "",
  "amount": 100,
  "currency": "PLN",
  "status": "cancelled",
  "isActive": true,
  "validTo": null,
  "created": 1735686000,
  "modified": 1735686000,
  "isGenerated": false,
  "isUsed": true,
  "usedAt": 1735686000,
  "isConfirmVisited": true,
  "confirmVisitedAt": 1735686000,
  "returnUrl": "https://yourshopdomain.com/return",
  "failureReturnUrl": "https://yourshopdomain.com/failure",
  "successReturnUrl": "https://yourshopdomain.com/success",
  "notificationUrl": "https://yourshopdomain.com/notification",
  "customer": {
    "firstName": "John",
    "lastName": "Doe",
    "phone": "+48501501501",
    "email": "john.doe@example.com",
    "locale": "pl"
  },
  "transactions": [
    {
      "id": "50d38a51-8e95-4b8b-94f4-188c90c0dfdd",
      "type": "sale",
      "status": "pending",
      "source": "web",
      "created": 1735686000,
      "modified": 1735686000,
      "notificationUrl": "https://yourshopdomain.com/notification",
      "serviceId": "2a249f52-d29c-46e7-9575-e65a889c7d38",
      "amount": 100,
      "currency": "PLN",
      "title": "yourTitle",
      "orderId": "yourOrderId",
      "paymentMethod": "blik",
      "paymentMethodCode": "blik",
      "payment": {
        "id": "50d38a51-8e95-4b8b-94f4-188c90c0dfdd",
        "status": "cancelled"
      }
    }
  ]
}
Response examples (400)
{
  "apiErrorResponse": {
    "message": "Cannot cancel payment"
  }
}