iCount invoice webhook

Credentials

No credentials are documented for this endpoint.

Webhook endpoint for iCount invoice integration. Receives notifications when invoices are created in iCount system.

Parameters

Name In Type Required Description
x-icount-secret header string yes iCount webhook secret for authentication

Request body

Content type: application/json

Field Type Required Description
event string no Event type (e.g., invoice.created, receipt.created)
docType string no Document type
docId string no iCount document ID
clientId string no iCount client ID
totalAmount number no Total document amount
currency string no Currency code
createdAt string no Document creation timestamp

Request example

{
  "event": "invoice.created",
  "docType": "invoice",
  "docId": "12345",
  "clientId": "67890",
  "totalAmount": 1170,
  "currency": "ILS",
  "createdAt": "2024-01-15T10:30:00Z"
}

Code samples

curl

curl -X POST 'https://sandbox.payme.io/api/partner/api/documents/income/hook/icount' \
  -H 'Content-Type: application/json' \
  -H 'x-icount-secret: <x-icount-secret>' \
  --data-raw '{
  "event": "invoice.created",
  "docType": "invoice",
  "docId": "12345",
  "clientId": "67890",
  "totalAmount": 1170,
  "currency": "ILS",
  "createdAt": "2024-01-15T10:30:00Z"
}'

Node.js

const response = await fetch("https://sandbox.payme.io/api/partner/api/documents/income/hook/icount", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-icount-secret": "<x-icount-secret>",
  },
  body: JSON.stringify({
    "event": "invoice.created",
    "docType": "invoice",
    "docId": "12345",
    "clientId": "67890",
    "totalAmount": 1170,
    "currency": "ILS",
    "createdAt": "2024-01-15T10:30:00Z"
  }),
});

console.log(await response.text());

Python

import requests

response = requests.post(
    "https://sandbox.payme.io/api/partner/api/documents/income/hook/icount",
    headers={
        "x-icount-secret": "<x-icount-secret>",
    },
    json={
        "event": "invoice.created",
        "docType": "invoice",
        "docId": "12345",
        "clientId": "67890",
        "totalAmount": 1170,
        "currency": "ILS",
        "createdAt": "2024-01-15T10:30:00Z",
    },
)

print(response.text)

PHP

<?php

$body = <<<'BODY'
{
  "event": "invoice.created",
  "docType": "invoice",
  "docId": "12345",
  "clientId": "67890",
  "totalAmount": 1170,
  "currency": "ILS",
  "createdAt": "2024-01-15T10:30:00Z"
}
BODY;

$ch = curl_init('https://sandbox.payme.io/api/partner/api/documents/income/hook/icount');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'x-icount-secret: <x-icount-secret>',
    ],
    CURLOPT_POSTFIELDS => $body,
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;

Responses

200 — Webhook processed successfully (success)

401 — Invalid webhook secret (error)