POST https://sandbox.payme.io/api/partner/api/income-documents/hooks/success/{docId}POST https://live.payme.io/api/partner/api/income-documents/hooks/success/{docId}No credentials are documented for this endpoint.
Webhook callback endpoint for successfully issued documents. Called by external invoicing services when a document is successfully created.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
docId |
path | string | yes | Document ID that was successfully issued |
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
docId |
string | yes | Document ID that was successfully issued |
docNumber |
string | no | Official document number assigned by invoicing service |
docUrl |
string | no | URL to download the issued document |
issuedAt |
string | no | Timestamp when document was issued |
{
"docId": "12345",
"docNumber": "INV-2024-001",
"docUrl": "https://invoicing.service/docs/12345.pdf",
"issuedAt": "2024-01-15T10:30:00Z"
}
curl -X POST 'https://sandbox.payme.io/api/partner/api/income-documents/hooks/success/<docId>' \
-H 'Content-Type: application/json' \
--data-raw '{
"docId": "12345",
"docNumber": "INV-2024-001",
"docUrl": "https://invoicing.service/docs/12345.pdf",
"issuedAt": "2024-01-15T10:30:00Z"
}'
const response = await fetch("https://sandbox.payme.io/api/partner/api/income-documents/hooks/success/<docId>", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"docId": "12345",
"docNumber": "INV-2024-001",
"docUrl": "https://invoicing.service/docs/12345.pdf",
"issuedAt": "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/success/<docId>",
json={
"docId": "12345",
"docNumber": "INV-2024-001",
"docUrl": "https://invoicing.service/docs/12345.pdf",
"issuedAt": "2024-01-15T10:30:00Z",
},
)
print(response.text)
<?php
$body = <<<'BODY'
{
"docId": "12345",
"docNumber": "INV-2024-001",
"docUrl": "https://invoicing.service/docs/12345.pdf",
"issuedAt": "2024-01-15T10:30:00Z"
}
BODY;
$ch = curl_init('https://sandbox.payme.io/api/partner/api/income-documents/hooks/success/<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"
}