POST /{merchantId}/payment

The request allows you to create a link to the imoje payment gateway with all available payment methods or only those selected using the visibleMethod array.

Each unpaid link will expire automatically 15 months after its creation date. If you want it to expire sooner, use the validTo parameter.

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

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

  • orderId string Required

    Order ID

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

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

  • title string

    Transaction title

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

  • additionalDescription string

    Details of the products or services ordered

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

  • visibleMethod array[string]

    Payment methods visible on the payment gateway. If this field is missing or empty, all payment methods enabled in the customer's shop are displayed. There are many configurations for displaying payment methods. They should always be separated by commas.

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

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

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

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

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

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

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

  • billing object

    Payer's billing address

    Hide billing attributes Show billing 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"']+$.

    • company string

      Payer's company name

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

    • street string

      Street

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

    • city string

      City

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

    • region string

      Region

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

    • postalCode string

      Postal code

      Maximum length is 30.

    • countryCodeAlpha2 string

      Alpha2 country code

      Maximum length is 2.

    • taxId string

      Tax identification number

      Maximum length is 12.

  • shipping object

    Shipping address

    Hide shipping attributes Show shipping attributes object
    • firstName string Required

      First name

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

    • lastName string Required

      Last name

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

    • company string

      Company name

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

    • street string

      Street

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

    • city string

      City

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

    • region string

      Region

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

    • postalCode string

      Postal code

      Maximum length is 30.

    • countryCodeAlpha2 string

      Alpha2 country code

      Maximum length is 2.

  • cart object

    Information about ordered products. Required for active service ING Lease Now.

    Hide cart attribute Show cart attribute object
    • items array[object] Required
      Hide items attributes Show items attributes object
      • id string Required

        Product ID

      • name string Required

        Product name

      • amount integer Required

        The net unit value of the product in the smallest currency unit, e.g. pence. The value 0 is also acceptable.

      • tax number Required

        Unit value of tax

      • taxStake number | string Required

        Tax stake

        Values are 23, 22, 8, 7, 5, 3, 0, TAX_EXEMPT, TAX_NOT_LIABLE, TAX_REVERSE_CHARGE, or TAX_EXCLUDING.

      • quantity integer Required

        Quantity. The minimum value is 1.

      • url string Required

        URL address for a given product

      • categoryId string Required

        Category name

      • unit string

        Unit

        Maximum length is 35.

      • state string

        Product state

        Values are NEW or USED.

      • discount.amount integer

        Discount amount

      • discount.tax number

        Discount tax amount

  • multipayout array[object]

    Information about the account numbers to which the funds from the transaction are to be paid.
    The active multipayout function is required.

    Hide multipayout attributes Show multipayout attributes object
    • ban string Required

      Bank account number

      Minimum length is 26, maximum length is 26. Format should match the following pattern: ^[0-9]{26}$.

    • amount integer Required

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

    • label string Required

      Recipent name

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

    • title string

      Transfer title.
      Its presence causes the transaction to be separated in the recipient's account. Specifying a parameter for one element requires it to be provided for the others.

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

  • invoice object

    Invoice details required for the active service ING Księgowość and for Split payment.

    Hide invoice attributes Show invoice attributes object
    • buyer object Required

      Buyer data

      Hide buyer attributes Show buyer attributes object
      • type string Required

        Buyer type. Takes the value PERSON individual recipient or COMPANY company

        Values are PERSON or COMPANY.

      • email string(email) Required

        E-mail address in a format compliant with the RFC 5322 and RFC 6531 standards

        Maximum length is 200.

      • fullName string Required

        Buyer's name and surname/company name

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

      • street string Required

        Street

        Maximum length is 200. Format should match the following pattern: ^[0-9a-zA-Z\s\-#.'"&,_/\u00C0-\u02C0]*$`.

      • city string Required

        City

        Maximum length is 100. Format should match the following pattern: ^[0-9a-zA-Z\s\-#.'"&,_/\u00C0-\u02C0]*$`.

      • postalCode string Required

        Postal code

        Maximum length is 30.

      • countryCodeAlpha2 string Required

        Alpha2 country code

        Maximum length is 2.

      • idCountryCodeAlpha2 string

        Country code identifier Alpha2. Required for the VAT_ID value of the idType parameter.

        Maximum length is 2.

      • idType string

        Identification number type. Required for the COMPANY value of the type parameter. Takes the value ID for PESEL or VAT_ID for NIP.

        Values are ID or VAT_ID.

      • idNumber string

        Tax Identification Number or Personal Identification Number. Required for the COMPANY value for the type parameter.

        Maximum length is 30.

    • positions array[object] Required

      List of products

      Hide positions attributes Show positions attributes object
      • name string Required

        Product name

      • code string Required

        Product code

      • quantity number Required

        Quantity. The minimum value is 0.

      • unit string Required

        Unit

      • grossAmount integer Required

        Gross unit value

      • taxStake string Required

        Tax stake

        Values are TAX_23, TAX_22, TAX_8, TAX_7, TAX_5, TAX_3, TAX_0, TAX_EXEMPT, TAX_NOT_LIABLE, TAX_REVERSE_CHARGE, or TAX_EXCLUDING.

      • discountAmount integer

        Discount amount

      • taxAmount integer

        Tax value in pence. Required only for Split Payment.

    • issueInvoice boolean

      Automatic invoice dispatch

    • basisForVatExemption object

      Basis for tax exemption

      Hide basisForVatExemption attributes Show basisForVatExemption attributes object
      • type string Required

        Values are DENTAL_TECHNICAN_SERVICES, DOCTOR_DENTIST_SERVICES, PHYSIOTHERAPY_SERVICES, NURSING_SERVICES, PSYCHOLOGICAL_SERVICES, MEDICAL_TRANSPORT_SERVICES, CARE_SERVICES, TUTORING, TEACHING_FOREIGN_LANGUAGES, ARTISTS, RENTING_PROPERTY, INSURANCE_SERVICES, CREDITS_AND_LOANS_SERVICES, GUARANTIEES, SPECIAL_CONDITIONS_FOR_EXEMPTION, UE_TRANSACTIONS, SUBJECTIVE_EXEMPTIONS, OTHER, or OTHER_OBJECTIVE_EXEMPTIONS.

      • text string

        Description. This parameter is required when the value OTHER is specified in the type parameter.

    • invoiceId string

      Invoice number. Required only for Split Payment.

  • isKsef boolean

    Generate KSeF payment identifier (IPKSeF)

Responses

  • 200 application/json

    Request executed correctly

    Hide response attribute Show response attribute object
    • 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}$.

      • url string

        Payment redirect address

      • 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

        SIMP account number with mass payment service enabled

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

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

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

      • customer object

        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.

      • isActive boolean

        Information on whether the payment link is active

      • 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

  • 422 application/json

    The payload is correct but does not contain the required parameters.

    Hide response attribute Show response attribute 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.

      • errors array[object]

        List of errors

        Hide errors attributes Show errors attributes object
        • property string

          Location of the error

        • message string

          Cause of error

POST /{merchantId}/payment
curl \
 --request POST 'https://api.imoje.pl/v1/merchant/{merchantId}/payment' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"title":"yourTitle","amount":10000,"orderId":"yourOrderId","currency":"PLN","customer":{"email":"john.doe@example.com","lastName":"Doe","firstName":"John"},"returnUrl":"https://yourshopdomain.com/return","serviceId":"ab16c18c-e83b-424f-80c9-f839ed23181f","notificationUrl":"https://yourshopdomain.com/notification","failureReturnUrl":"https://yourshopdomain.com/failure","successReturnUrl":"https://yourshopdomain.com/success"}'
Request example
{
  "title": "yourTitle",
  "amount": 10000,
  "orderId": "yourOrderId",
  "currency": "PLN",
  "customer": {
    "email": "john.doe@example.com",
    "lastName": "Doe",
    "firstName": "John"
  },
  "returnUrl": "https://yourshopdomain.com/return",
  "serviceId": "ab16c18c-e83b-424f-80c9-f839ed23181f",
  "notificationUrl": "https://yourshopdomain.com/notification",
  "failureReturnUrl": "https://yourshopdomain.com/failure",
  "successReturnUrl": "https://yourshopdomain.com/success"
}
Response examples (200)
{
  "payment": {
    "id": "0f0cc3d0-aae8-410b-bf5c-358955c348e3",
    "url": "https://paywall.imoje.pl/s/yfnZFcUOG7",
    "simp": "",
    "title": "yourTitle",
    "amount": 10000,
    "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": "f69bb41c-af75-4e1f-8e03-ebce650bbd25",
    "notificationUrl": "https://yourshopdomain.com/notification",
    "failureReturnUrl": "https://yourshopdomain.com/failure",
    "successReturnUrl": "https://yourshopdomain.com/success"
  }
}
Response examples (422)
{
  "apiErrorResponse": {
    "code": "REQ-ERROR-100002",
    "errors": [
      {
        "message": "requires property \"orderId\"",
        "property": "instance"
      }
    ],
    "message": "Unprocessable Entity.",
    "instance": {
      "title": "yourTitle",
      "amount": 10000,
      "currency": "PLN",
      "customer": {
        "email": "john.doe@example.com",
        "lastName": "Doe",
        "firstName": "John"
      },
      "returnUrl": "https://yourshopdomain.com/return",
      "serviceId": "ab16c18c-e83b-424f-80c9-f839ed23181f",
      "notificationUrl": "https://yourshopdomain.com/notification",
      "failureReturnUrl": "https://yourshopdomain.com/failure",
      "successReturnUrl": "https://yourshopdomain.com/success"
    }
  }
}