POST https://sandbox.payme.io/api/partner/api/documents/income/hook/morningPOST https://live.payme.io/api/partner/api/documents/income/hook/morningNo credentials are documented for this endpoint.
Webhook endpoint for Morning.co invoice integration. Receives notifications when invoices are created in Morning system.
This endpoint takes no path, query or header parameters.
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
event |
string | no | Event type (e.g., document.issued) |
documentId |
string | no | Morning document ID |
documentType |
string | no | Document type (tax_invoice, receipt, etc.) |
amount |
number | no | Total document amount |
currency |
string | no | Currency code |
customerEmail |
string | no | Customer email address |
issuedAt |
string | no | Document issuance timestamp |
{
"event": "document.issued",
"documentId": "doc_123456",
"documentType": "tax_invoice",
"amount": 1170,
"currency": "ILS",
"customerEmail": "customer@example.com",
"issuedAt": "2024-01-15T10:30:00Z"
}
curl -X POST 'https://sandbox.payme.io/api/partner/api/documents/income/hook/morning' \
-H 'Content-Type: application/json' \
--data-raw '{
"event": "document.issued",
"documentId": "doc_123456",
"documentType": "tax_invoice",
"amount": 1170,
"currency": "ILS",
"customerEmail": "customer@example.com",
"issuedAt": "2024-01-15T10:30:00Z"
}'
const response = await fetch("https://sandbox.payme.io/api/partner/api/documents/income/hook/morning", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"event": "document.issued",
"documentId": "doc_123456",
"documentType": "tax_invoice",
"amount": 1170,
"currency": "ILS",
"customerEmail": "customer@example.com",
"issuedAt": "2024-01-15T10:30:00Z"
}),
});
console.log(await response.text());
import requests
response = requests.post(
"https://sandbox.payme.io/api/partner/api/documents/income/hook/morning",
json={
"event": "document.issued",
"documentId": "doc_123456",
"documentType": "tax_invoice",
"amount": 1170,
"currency": "ILS",
"customerEmail": "customer@example.com",
"issuedAt": "2024-01-15T10:30:00Z",
},
)
print(response.text)
<?php
$body = <<<'BODY'
{
"event": "document.issued",
"documentId": "doc_123456",
"documentType": "tax_invoice",
"amount": 1170,
"currency": "ILS",
"customerEmail": "customer@example.com",
"issuedAt": "2024-01-15T10:30:00Z"
}
BODY;
$ch = curl_init('https://sandbox.payme.io/api/partner/api/documents/income/hook/morning');
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": 401,
"message": "Unauthorized",
"error": "Unauthorized"
}