Creating a payment link Run in API Explorer
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
validToparameter.
Body
Required
-
Shop identifier as
UUID v4Maximum 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}$. -
The transaction amount in the smallest currency unit, e.g. pennies.
-
Transaction currency in the ISO 4217 standard
Maximum length is
3. Values arePLN,EUR,USD,GBP,CHF,SEK,HUF,CZK,BGN, orRON. -
Order ID
Maximum length is
100. Format should match the following pattern:^[A-Za-z0-9#_\-\.\\\\/ \u00C0-\u02C0]+$. -
Payer data
-
Transaction title
Maximum length is
255. Format should match the following pattern:^[A-Za-z0-9#&_\-\,\.\\\\/ \u00C0-\u02C0"']+$. -
Details of the products or services ordered
Maximum length is
255. Format should match the following pattern:^[A-Za-z0-9#&_\s\-\,\.\/ \u00C0-\u02C0"']+$. -
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, orimoje_installments. -
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 areblik,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, orinbank_0. -
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. -
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. -
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. -
Dynamic notification address, possibility to set a specific address for a single transaction. Addresses containing
localhostand ports will be rejected.Maximum length is
300. -
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=NULLcauses 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. -
Payer's billing address
-
Shipping address
-
Information about ordered products. Required for active service ING Lease Now.
-
Information about the account numbers to which the funds from the transaction are to be paid.
The active multipayout function is required. -
Invoice details required for the active service ING Księgowość and for
Split payment. -
Generate KSeF payment identifier (IPKSeF)
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"}'
{
"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"
}
{
"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"
}
}
{
"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"
}
}
}