Anulowanie linku płatności Run in API Explorer
Ask AI
Body
Required
-
Identyfikator sklepu jako
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}$. -
Identyfikator linku płatności jako
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}$.
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"
}
}