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 '{"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"
}
}