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

    • url string Required

      Adres przekierowania do płatności

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

    • orderId string Required

      Order ID

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

    • title string Required

      Transaction title

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

    • simp string Required

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

    • amount integer Required

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

    • currency string Required

      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 Required

      Informacja czy link płatności jest aktywny

    • validTo integer | null Required

      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 Required

      Creation date as timestamp

    • modified integer | null Required

      Modification date as timestamp

    • isGenerated boolean Required

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

    • isUsed boolean Required

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

    • usedAt integer Required

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

    • isConfirmVisited boolean Required

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

    • confirmVisitedAt integer | null Required

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

    • returnUrl string(uri) Required

      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) Required

      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) Required

      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) Required

      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 Required

      Payer data

      Hide customer attributes Show customer attributes object
      • firstName string Required

        Payer's first name

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

      • lastName string Required

        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) Required

        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.

    • transactions array[object] Required

      List of transactions assigned to the payment link.

      Hide transactions attributes Show transactions attributes object
      • id 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}$.

      • type string Required

        Transaction type

        Values are sale or refund.

      • status string Required

        Status

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

      • source string Required

        Transaction source

        Values are web or api.

      • created integer | null Required

        Creation date as timestamp

      • modified integer | null Required

        Modification date as timestamp

      • notificationUrl string(uri) Required

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

      • currency string Required

        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 Required

        Transaction title

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

      • orderId string Required

        Order ID

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

      • paymentMethod string Required

        Payment method description

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

      • paymentMethodCode string Required

        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 Required
        Hide payment attributes Show payment attributes object
        • id 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}$.

        • status string Required

          Status

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

  • 400 application/json

    The link cannot be canceled.

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