POST https://sandbox.payme.io/api/partner/api/income-documents/hooks/error/{docId}POST https://live.payme.io/api/partner/api/income-documents/hooks/error/{docId}No credentials are documented for this endpoint.
Webhook callback endpoint for failed document issuance. Called by external invoicing services when document creation fails.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
docId |
path | string | yes | Document ID that failed to issue |
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
docId |
string | yes | Document ID that failed to issue |
errorCode |
string | yes | Error code identifying the type of failure |
errorMessage |
string | yes | Human-readable error description |
failedAt |
string | no | Timestamp when the failure occurred |
{
"docId": "12345",
"errorCode": "TAX_AUTHORITY_REJECTED",
"errorMessage": "Document rejected by tax authority - invalid VAT number",
"failedAt": "2024-01-15T10:30:00Z"
}
curl -X POST 'https://sandbox.payme.io/api/partner/api/income-documents/hooks/error/<docId>' \
-H 'Content-Type: application/json' \
--data-raw '{
"docId": "12345",
"errorCode": "TAX_AUTHORITY_REJECTED",
"errorMessage": "Document rejected by tax authority - invalid VAT number",
"failedAt": "2024-01-15T10:30:00Z"
}'
const response = await fetch("https://sandbox.payme.io/api/partner/api/income-documents/hooks/error/<docId>", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"docId": "12345",
"errorCode": "TAX_AUTHORITY_REJECTED",
"errorMessage": "Document rejected by tax authority - invalid VAT number",
"failedAt": "2024-01-15T10:30:00Z"
}),
});
console.log(await response.text());
import requests
response = requests.post(
"https://sandbox.payme.io/api/partner/api/income-documents/hooks/error/<docId>",
json={
"docId": "12345",
"errorCode": "TAX_AUTHORITY_REJECTED",
"errorMessage": "Document rejected by tax authority - invalid VAT number",
"failedAt": "2024-01-15T10:30:00Z",
},
)
print(response.text)
<?php
$body = <<<'BODY'
{
"docId": "12345",
"errorCode": "TAX_AUTHORITY_REJECTED",
"errorMessage": "Document rejected by tax authority - invalid VAT number",
"failedAt": "2024-01-15T10:30:00Z"
}
BODY;
$ch = curl_init('https://sandbox.payme.io/api/partner/api/income-documents/hooks/error/<docId>');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
| Field | Type | Description |
|---|---|---|
statusCode |
integer | |
message |
string | |
error |
string |
{
"statusCode": 400,
"message": [
"Validation failed"
],
"error": "Bad Request"
}