FREEPAY API
REST API להפקת חשבוניות וקבלות כחוק (כולל מספרי הקצאה מרשות המסים), ניהול לקוחות, הצעות מחיר, הוצאות, תשלומים בקישור (UPAY), חיובים חוזרים, הנהלת חשבונות ו-webhooks.
JSON בלבד, גרסה v1, כתובת בסיס: https://freepay.clickdrop.online/api/v1.
התחלה מהירה Quickstart
- צרו מפתח בהגדרות ← API (מומלץ: רק ההרשאות שהחיבור צריך). המפתח מוצג פעם אחת.
- שמרו אותו כמשתנה סביבה בצד השרת:
FREEPAY_API_KEY=fp_.... לעולם לא בקוד דפדפן או ב-Git. - בדקו חיבור:
GET /business. אחר כך הפיקו מסמך עםPOST /documentsו-Idempotency-Key= מספר ההזמנה.
curl -X POST 'https://freepay.clickdrop.online/api/v1/documents' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: order-1001" \
-H "Content-Type: application/json" \
-d '{"type":320,"customer":{"name":"לקוח לדוגמה בע\"מ","tax_id":"515555555","email":"billing@example.co.il","address":"הרצל 1, תל אביב"},"prices_include_vat":true,"lines":[{"description":"בניית אתר","quantity":1,"unit_price":5900}],"payments":[{"method":"transfer","amount":5900,"reference":"TR-88"}],"external_ref":"order-1001","send_email":true}'const res = await fetch("https://freepay.clickdrop.online/api/v1/documents", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "order-1001" },
body: JSON.stringify({
"type": 320,
"customer": {
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"address": "הרצל 1, תל אביב"
},
"prices_include_vat": true,
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit_price": 5900
}
],
"payments": [
{
"method": "transfer",
"amount": 5900,
"reference": "TR-88"
}
],
"external_ref": "order-1001",
"send_email": true
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/documents",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "order-1001"},
json={
"type": 320,
"customer": {
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"address": "הרצל 1, תל אביב"
},
"prices_include_vat": True,
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit_price": 5900
}
],
"payments": [
{
"method": "transfer",
"amount": 5900,
"reference": "TR-88"
}
],
"external_ref": "order-1001",
"send_email": True
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/documents');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: order-1001"],
CURLOPT_POSTFIELDS => '{"type":320,"customer":{"name":"לקוח לדוגמה בע\\"מ","tax_id":"515555555","email":"billing@example.co.il","address":"הרצל 1, תל אביב"},"prices_include_vat":true,"lines":[{"description":"בניית אתר","quantity":1,"unit_price":5900}],"payments":[{"method":"transfer","amount":5900,"reference":"TR-88"}],"external_ref":"order-1001","send_email":true}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);אימות Authentication
כל קריאה (מלבד openapi.json, postman.json וקישורי PDF חתומים) דורשת Authorization: Bearer fp_.... מפתח שגוי / מבוטל - 401 unauthorized.
המפתח הסודי מיועד לשרת בלבד. לדפדפן (כפתורי "קנה עכשיו") יש מפתח ציבורי pk_ עם API מצומצם ב-/api/public/v1 (רשימת מוצרים ותשלום) - ראו חיבור לאתר.
ביטול מפתח בהגדרות עוצר אותו מיד. כל שימוש נרשם ביומן הקריאות.
הרשאות Scopes
מפתח read (ותיק) = כל הרשאות הקריאה; מפתח write = הכל. מפתח עם הרשאות מפורטות מקבל רק את מה שנבחר (הרשאת כתיבה כוללת קריאה של אותו משאב). חוסר הרשאה - 403 insufficient_scope עם details.required_scope.
| הרשאה | מאפשרת |
|---|---|
settings:read | צפייה בפרטי העסק וההגדרות |
settings:write | שינוי מספור מסמכים |
customers:read | צפייה בלקוחות |
customers:write | יצירה ועדכון לקוחות והערות |
documents:read | צפייה במסמכים, PDF ודוח חייבים |
documents:write | הפקה, שליחה, ביטול וזיכוי מסמכים |
quotes:read | צפייה בהצעות מחיר |
quotes:write | יצירה, שליחה והמרה של הצעות מחיר |
items:read | צפייה בקטלוג הפריטים |
items:write | יצירה ועדכון פריטים |
expenses:read | צפייה בהוצאות |
expenses:write | קליטה, עדכון ואישור הוצאות |
payments:read | צפייה בבקשות תשלום, תשלומים, מוצרים ומנויים |
payments:write | בקשות תשלום, מוצרים ומנויים |
books:read | צפייה בהנהלת החשבונות ובדוחות |
books:write | רישום פקודות יומן ידניות |
money:read | צפייה בתנועות ממקורות כסף |
money:write | יבוא קובצי תנועות |
mailing_list:read | צפייה ברשימת התפוצה |
mailing_list:write | הוספה והסרה מרשימת התפוצה |
webhooks:read | צפייה ב-webhooks ובאירועים |
webhooks:write | רישום, בדיקה ומחיקה של webhooks |
אידמפוטנטיות Idempotency
שלחו Idempotency-Key: <מזהה ייחודי> בכל בקשת כתיבה (POST / PUT / PATCH / DELETE). חזרה עם אותו מפתח מחזירה את התשובה המקורית (כותרת Idempotent-Replayed: true) ולא מפיקה מסמך שני - חיוני ב-retry אחרי timeout.
אותו מפתח עם בקשה שונה (נתיב / גוף) - 409 idempotency_key_reused. המפתחות נשמרים לצמיתות לכל עסק, כך שמספר הזמנה הוא בחירה טובה. בנוסף, external_ref במסמך ייחודי.
עימוד וסינון Pagination & filtering
רשימות מחזירות { "object": "list", "data": [...], "has_more": true, "next_cursor": "123" }. לעמוד הבא שלחו starting_after=<next_cursor> (או cursor בנקודות קצה שמסומנות כך). limit עד 100 (במסמכים עד 200); ערך גדול יותר מוגבל אוטומטית.
order=desc מחדש לישן. סינון לפי תאריכים: from / to בפורמט YYYY-MM-DD (כולל). פרמטר לא תקין - 422 עם details.field.
סכומים ותאריכים Amounts & dates
סכומים בשקלים כמספר עשרוני (2 ספרות), ולצידם *_agorot (מספר שלם) - מומלץ לחישובים. בקלט אפשר לשלוח amount או amount_agorot. כמויות עשרוניות (1.5). תאריכים YYYY-MM-DD (שעון ישראל); חותמות זמן ISO-8601 ב-UTC.
שיעור המע"מ נקבע לפי תאריך העסקה (GET /vat-rate?date=). מסמך שהונפק אינו ניתן לשינוי - רק ביטול / זיכוי. pdf_url במסמך הוא קישור חתום ל-15 דקות שעובד בלי מפתח (אפשר להפנות אליו לקוח).
שגיאות Errors
מבנה אחיד ותואם לאחור: השדה error נשאר מחרוזת (הודעה בעברית), ונוספים error_code יציב ו-details.
{
"error": "lines[0].unit_price: מספר לא תקין",
"error_code": "validation_error",
"details": {
"message": "lines[0].unit_price: מספר לא תקין",
"field": "lines[0].unit_price",
"docs_url": "https://freepay.clickdrop.online/developers#error-validation_error",
"request_id": "req_8yQ…"
}
}
| HTTP | error_code | משמעות |
|---|---|---|
| 401 | unauthorized | מפתח API חסר, שגוי או מבוטל Missing, invalid or revoked API key |
| 403 | insufficient_scope | למפתח אין הרשאה לפעולה הזו The key lacks the scope required for this action |
| 404 | not_found | המשאב לא נמצא (או שייך לעסק אחר) Resource not found (or belongs to another business) |
| 409 | conflict | התנגשות - הרשומה כבר קיימת או שהמצב אינו מאפשר את הפעולה Conflict - duplicate or invalid state |
| 409 | idempotency_key_reused | אותו Idempotency-Key נשלח עם בקשה שונה Same Idempotency-Key reused with a different request |
| 409 | numbering_locked | המספור ננעל - כבר הונפק מסמך מסוג זה Numbering is locked - a document of this type was already issued |
| 413 | payload_too_large | גוף הבקשה גדול מדי Request body too large |
| 415 | unsupported_media_type | סוג תוכן לא נתמך Unsupported content type |
| 422 | validation_error | קלט לא תקין Validation failed |
| 422 | csv_mapping_required | פורמט הקובץ לא זוהה - יש לבחור preset CSV format not recognized - choose a preset |
| 422 | email_not_sent | המייל לא נשלח Email was not sent |
| 423 | account_frozen | החשבון מוקפא - קריאה בלבד Account is frozen - read only |
| 429 | rate_limited | יותר מדי בקשות למפתח הזה Too many requests for this key |
| 502 | upstream_error | שירות חיצוני לא זמין כרגע Upstream service unavailable |
| 500 | internal_error | שגיאה פנימית Internal error |
חשבון מוקפא: קריאה בלבד - כל כתיבה מחזירה 423 account_frozen. כל תשובה כוללת X-Request-Id - ציינו אותו בפנייה לתמיכה (מופיע גם ב"כרטיס" ביומן הקריאות).
מגבלת קצב Rate limits
עד 120 קריאות לדקה לכל מפתח (חלון קבוע). כל תשובה כוללת X-RateLimit-Limit, X-RateLimit-Remaining ו-X-RateLimit-Reset (שניות epoch). בחריגה: 429 rate_limited עם Retry-After. בנוסף יש הגבלה כללית לכל כתובת IP. לעבודה במנות השתמשו ב-POST /books/journal-entries/batch ובעימוד עם limit גבוה.
Webhooks REST hooks
רשמו כתובת עם POST /webhooks (או במסך חיבור לאתר). מתאים ל-Make, Zapier ו-n8n: הרשמה, בדיקה (POST /webhooks/{id}/test) ומחיקה דרך ה-API.
כל אירוע נשלח כ-POST עם JSON { "id": "evt_…", "type": "document.issued", "created_at": "…", "data": {…} } והכותרות X-FreePay-Event ו-X-FreePay-Signature: sha256=<HMAC-SHA256 של הגוף הגולמי>.
החזירו 2xx מהר. כשל - עד 3 ניסיונות חוזרים (5 שניות, 30 שניות, 2 דקות), לכן זהו כפילויות לפי id. אירועים מ-30 הימים האחרונים זמינים ב-GET /events לשחזור.
| אירוע | מתי | data |
|---|---|---|
document.issued | מסמך הונפק | { id, type, number, issue_date, customer_name, total, external_ref } |
document.cancelled | מסמך בוטל (ביטול מלא) | { id, type, number, cancelled_by_document_id, reason } |
payment.succeeded | תשלום התקבל וקבלה הופקה | { payment_request, amount, product_id, document_id, document_number } |
payment.failed | תשלום נכשל / נדחה | { payment_request, amount, reason } |
subscription.charged | חיוב חוזר שולם | { subscription_id, payment_request, amount, document_id } |
quote.accepted | לקוח אישר הצעת מחיר | { id, kind, number, customer_name, total, accepted_name } |
expense.created | הוצאה חדשה נקלטה | { id, source, file_name } |
ping | אירוע בדיקה (POST /webhooks/{id}/test) | { message, business } |
אימות חתימה
import crypto from "node:crypto";
// rawBody: הגוף הגולמי (Buffer / string) לפני JSON.parse
function verify(rawBody, header, secret) {
const expected = "sha256=" + crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
const a = Buffer.from(expected), b = Buffer.from(header || "");
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
// Express: app.post("/hooks/freepay", express.raw({ type: "*/*" }), (req, res) => {
// if (!verify(req.body, req.get("X-FreePay-Signature"), process.env.FREEPAY_WEBHOOK_SECRET)) return res.sendStatus(401);
// const event = JSON.parse(req.body); /* dedupe by event.id */ res.sendStatus(200);
// });import hmac, hashlib
def verify(raw_body: bytes, header: str, secret: str) -> bool:
expected = "sha256=" + hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, header or "")<?php
$raw = file_get_contents("php://input");
$expected = "sha256=" . hash_hmac("sha256", $raw, getenv("FREEPAY_WEBHOOK_SECRET"));
if (!hash_equals($expected, $_SERVER["HTTP_X_FREEPAY_SIGNATURE"] ?? "")) { http_response_code(401); exit; }
$event = json_decode($raw, true);SDKs רשמיים Official SDKs
שלוש ספריות באותו מבנה, שנוצרות אוטומטית מאותו מרשם שממנו נבנה התיעוד הזה (scripts/gen-sdks.js): משאבים (customers, documents, paymentRequests...), עימוד אוטומטי, Idempotency-Key אוטומטי לכל כתיבה, ניסיונות חוזרים ב-429 / 5xx לפי Retry-After, שגיאות עם code / status / requestId, ואימות חתימת webhook.
התחלה מהירה: קבלה, קישור תשלום, רשימת מסמכים, webhook
// npm install ./freepay-js (מתוך freepay-js.zip; עדיין לא ב-npm)
const FreePay = require("freepay"); // ESM: import FreePay from "freepay";
const freepay = new FreePay({ apiKey: process.env.FREEPAY_API_KEY, baseUrl: "https://freepay.clickdrop.online" });
// קבלה (400) - Idempotency-Key אוטומטי, או מספר ההזמנה שלכם
const receipt = await freepay.documents.create({
type: 400,
customer: { name: "דנה כהן", email: "dana@example.co.il" },
notes: "ייעוץ אוקטובר",
payments: [{ method: "transfer", amount: 350, reference: "TR-88" }],
send_email: true,
}, { idempotencyKey: "order-1001" });
// קישור תשלום (UPAY) - הקבלה מופקת אוטומטית כשמשלמים
const link = await freepay.paymentRequests.create({ description: "סדנה", amount: 250, customer: { name: "נועה" } });
console.log(link.pay_url);
// כל המסמכים, עם עימוד אוטומטי
for await (const doc of freepay.documents.list({ from: "2026-01-01", type: 320 })) console.log(doc.number, doc.total);
// שגיאות
try { await freepay.documents.get(999); } catch (e) { console.log(e.status, e.code, e.requestId); } // FreePay.FreePayError
// webhook (Express): app.post("/hooks/freepay", express.raw({ type: "*/*" }), (req, res) => {
// const event = FreePay.webhooks.constructEvent(req.body, req.get("X-FreePay-Signature"), process.env.FREEPAY_WEBHOOK_SECRET);
// res.sendStatus(200); });# pip install "git+https://github.com/testamind-svg/FREEPAY.git#subdirectory=sdks/python" (או: pip install ./freepay-python)
import os
from freepay import FreePay, FreePayError, webhooks
client = FreePay(api_key=os.environ["FREEPAY_API_KEY"], base_url="https://freepay.clickdrop.online")
receipt = client.documents.create(
type=400,
customer={"name": "דנה כהן", "email": "dana@example.co.il"},
notes="ייעוץ אוקטובר",
payments=[{"method": "transfer", "amount": 350, "reference": "TR-88"}],
idempotency_key="order-1001",
)
link = client.payment_requests.create(description="סדנה", amount=250, customer={"name": "נועה"})
print(link["pay_url"])
for doc in client.documents.list({"from": "2026-01-01"}): # עימוד אוטומטי ("from" שמור בפייתון - מילון)
print(doc["number"], doc["total"])
try:
client.documents.get(999)
except FreePayError as e:
print(e.status, e.code, e.request_id)
# webhook (Flask): event = webhooks.construct_event(request.get_data(), request.headers.get("X-FreePay-Signature"), SECRET)<?php
// composer: "repositories": [{"type": "path", "url": "./freepay-php"}], "require": {"freepay/freepay-php": "*"}
// בלי composer: require __DIR__ . '/freepay-php/src/autoload.php';
$freepay = new \FreePay\FreePay(['api_key' => getenv('FREEPAY_API_KEY'), 'base_url' => 'https://freepay.clickdrop.online']);
$receipt = $freepay->documents->create([
'type' => 400,
'customer' => ['name' => 'דנה כהן', 'email' => 'dana@example.co.il'],
'notes' => 'ייעוץ אוקטובר',
'payments' => [['method' => 'transfer', 'amount' => 350, 'reference' => 'TR-88']],
], ['idempotency_key' => 'order-1001']);
$link = $freepay->paymentRequests->create(['description' => 'סדנה', 'amount' => 250, 'customer' => ['name' => 'נועה']]);
echo $link['pay_url'];
foreach ($freepay->documents->list(['from' => '2026-01-01']) as $doc) { echo $doc['number'], "\n"; } // עימוד אוטומטי
try { $freepay->documents->get(999); } catch (\FreePay\FreePayException $e) { echo $e->status, $e->errorCode, $e->requestId; }
// webhook
$raw = file_get_contents('php://input');
if (!\FreePay\Webhook::verify($raw, $_SERVER['HTTP_X_FREEPAY_SIGNATURE'] ?? '', getenv('FREEPAY_WEBHOOK_SECRET'))) { http_response_code(401); exit; }MCP / סוכני AI MCP & AI agents
FREEPAY מדבר Model Context Protocol, כך שעוזרי AI (Claude, Cursor ואחרים) יכולים לקרוא נתונים ולבצע פעולות בחשבון - עם אותם מפתחות, הרשאות, הגבלת קצב ויומן קריאות של ה-API.
שתי דרכים: שרת מרוחק בכתובת https://freepay.clickdrop.online/mcp (Streamable HTTP), או חבילה מקומית freepay-mcp (stdio).
confirm: true, אחרי שאישרתם. כל קריאה נרשמת ביומן הקריאות בערוץ "סוכן AI (MCP)". רשימת הכלים כ-JSON: /api/v1/mcp-tools.json.חיבור
claude mcp add --transport http freepay https://freepay.clickdrop.online/mcp \
--header "Authorization: Bearer fp_YOUR_READ_ONLY_KEY"claude mcp add --transport stdio --env FREEPAY_API_KEY=fp_YOUR_KEY --env FREEPAY_BASE_URL=https://freepay.clickdrop.online \
freepay -- node /path/to/freepay-mcp/bin/freepay-mcp.js// claude_desktop_config.json (Settings → Developer → Edit Config)
{
"mcpServers": {
"freepay": {
"command": "node",
"args": [
"C:\\path\\to\\freepay-mcp\\bin\\freepay-mcp.js"
],
"env": {
"FREEPAY_API_KEY": "fp_YOUR_KEY",
"FREEPAY_BASE_URL": "https://freepay.clickdrop.online"
}
}
}
}// ~/.cursor/mcp.json (או .cursor/mcp.json בפרויקט)
{
"mcpServers": {
"freepay": {
"url": "https://freepay.clickdrop.online/mcp",
"headers": {
"Authorization": "Bearer fp_YOUR_READ_ONLY_KEY"
}
}
}
}POST https://freepay.clickdrop.online/mcp
Authorization: Bearer fp_...
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2025-11-25
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"my-agent","version":"1.0"}}}הכלים (28)
| כלי | מה עושה | הרשאה | סוג |
|---|---|---|---|
get_business_overview | סקירת העסק · Business overview | settings:read | קריאה |
search_customers | חיפוש לקוחות · Search customers | customers:read | קריאה |
get_customer | פרטי לקוח ויתרה · Customer & balance | customers:read | קריאה |
create_or_find_customer | יצירת לקוח / מציאה · Create or find customer | customers:write | כתיבה |
list_documents | רשימת מסמכים · List documents | documents:read | קריאה |
get_document | פרטי מסמך · Get document | documents:read | קריאה |
issue_document | הפקת קבלה / חשבונית · Issue receipt or invoice | documents:write | כתיבה · דורש confirm |
send_document_email | שליחת מסמך במייל · Email document | documents:write | כתיבה |
cancel_document | ביטול מסמך · Cancel document | documents:write | כתיבה · דורש confirm |
list_open_invoices | חשבוניות פתוחות · Unpaid invoices | documents:read | קריאה |
receivables_report | דוח חייבים (גיול) · Receivables aging | documents:read | קריאה |
list_quotes | הצעות מחיר · List quotes | quotes:read | קריאה |
create_quote | יצירת הצעת מחיר · Create quote | quotes:write | כתיבה |
convert_quote | המרת הצעה למסמך · Convert quote | quotes:write | כתיבה · דורש confirm |
create_payment_link | קישור תשלום · Create payment link | payments:write | כתיבה · דורש confirm |
list_payments | תשלומים שהתקבלו · Payments received | payments:read | קריאה |
list_payment_requests | קישורי תשלום · Payment links | payments:read | קריאה |
list_expenses | הוצאות · List expenses | expenses:read | קריאה |
add_expense | קליטת הוצאה מקובץ · Add expense from file | expenses:write | כתיבה |
approve_expense | אישור הוצאה · Approve expense | expenses:write | כתיבה · דורש confirm |
pnl_report | רווח והפסד · Profit & loss | books:read | קריאה |
trial_balance | מאזן בוחן · Trial balance | books:read | קריאה |
list_subscriptions | מנויים וחיובים חוזרים · Subscriptions | payments:read | קריאה |
create_subscription | יצירת חיוב חוזר · Create subscription | payments:write | כתיבה · דורש confirm |
cancel_subscription | ביטול מנוי · Cancel subscription | payments:write | כתיבה · דורש confirm |
list_items | קטלוג פריטים · Items catalog | items:read | קריאה |
exchange_rate | שער יציג · Exchange rate | settings:read | קריאה |
vat_rate | שיעור מע"מ · VAT rate | settings:read | קריאה |
משאבים: freepay://business, freepay://documents/{id}. הנחיות (prompts): monthly_close (סגירת חודש), issue_receipt_from_payment (קבלה מתשלום).
גרסאות פרוטוקול: 2026-07-28 (בלי session, _meta בכל בקשה) וגם 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize). השרת stateless: בלי Mcp-Session-Id ובלי GET stream. אימות: מפתח API, או OAuth 2.1 (חיבור בלחיצה - ראו הפרק הבא).
חיבור Claude / ChatGPT בלחיצה (OAuth) Connect AI apps with OAuth
במקום להדביק מפתח API, אפליקציות AI מתחברות דרך OAuth 2.1: המשתמש מתחבר ל-FREEPAY, רואה מסך אישור בעברית (איזו אפליקציה, איזה עסק, אילו הרשאות - ברירת מחדל קריאה בלבד) ומאשר. הטוקן מוגבל לעסק ולהרשאות שנבחרו, תקף לשעה ומתחדש אוטומטית, ואפשר לנתק בכל רגע בהגדרות ← API ← אפליקציות מחוברות.
Claude (claude.ai, Claude Desktop, נייד)
- Customize ← Connectors ← Add custom connector (בחשבון Team / Enterprise: בעל הארגון ב-Organization settings ← Connectors ← Add ← Custom ← Web).
- Remote MCP server URL:
https://freepay.clickdrop.online/mcp· אין צורך למלא OAuth Client ID / Secret. - Add ← Connect ← מתחברים ל-FREEPAY ומאשרים.
Claude Code
claude mcp add --transport http freepay https://freepay.clickdrop.online/mcp
# ואז בתוך Claude Code: /mcp -> freepay -> Authenticate
ChatGPT (Developer mode / Apps)
- Settings ← Apps & Connectors ← Advanced settings ← הפעלת Developer mode (בחשבונות עסקיים ייתכן שמנהל צריך לאשר).
- Create ← שם: FREEPAY · MCP Server URL:
https://freepay.clickdrop.online/mcp· Authentication: OAuth. - ChatGPT יפתח את מסך ההתחברות של FREEPAY - מאשרים.
שמות התפריטים ב-ChatGPT משתנים לעתים קרובות (Connectors / Apps); אם לא מוצאים - חפשו "Developer mode" בהגדרות.
Cursor ולקוחות MCP אחרים
{
"mcpServers": {
"freepay": {
"url": "https://freepay.clickdrop.online/mcp"
}
}
}
לקוח שתומך ב-OAuth של MCP יזהה לבד את שרת ההרשאות (401 + WWW-Authenticate: Bearer resource_metadata=…). אפשר עדיין להשתמש במפתח API עם כותרת Authorization.
ChatGPT GPTs (Custom GPT Actions)
- ב-ChatGPT: Explore GPTs ← Create ← Configure ← Actions ← Create new action.
- Import from URL:
https://freepay.clickdrop.online/api/v1/openapi-gpt.json(עד 30 פעולות שימושיות, עם operationId קבועים). - Authentication - אחת משתיים:
- API Key ← Auth Type: Bearer ← מפתח
fp_…מהגדרות ← API (מומלץ מפתח לקריאה בלבד או הרשאות מפורטות). כל מי שמשתמש ב-GPT פועל עם אותו מפתח - מתאים ל-GPT פרטי. - OAuth ← בהגדרות ← API ← אפליקציות מחוברות לוחצים "צור לקוח OAuth ל-GPT" ומעתיקים: Client ID, Client Secret, Authorization URL
https://freepay.clickdrop.online/oauth/authorize, Token URLhttps://freepay.clickdrop.online/oauth/token, Scopemcp:read, Token Exchange Method: Default (POST request). אחרי השמירה ה-GPT מציג Callback URL - מדביקים אותו בחזרה בהגדרות.
- API Key ← Auth Type: Bearer ← מפתח
- Privacy policy:
https://freepay.clickdrop.online/legal/privacy.
פעולות כתיבה ב-GPT מסומנות x-openai-isConsequential, כך ש-ChatGPT מבקש אישור לפני כל ביצוע. שימו לב: ב-REST אין שלב "תצוגה מקדימה" כמו ב-MCP - קריאה ל-createDocument מפיקה מסמך.
נקודות קצה למפתחים
| Authorization server metadata (RFC 8414) | https://freepay.clickdrop.online/.well-known/oauth-authorization-server |
| Protected resource metadata (RFC 9728) | https://freepay.clickdrop.online/.well-known/oauth-protected-resource/mcp · /api/v1 · root |
| Authorize / Token / Revoke | https://freepay.clickdrop.online/oauth/authorize · /oauth/token · /oauth/revoke |
| רישום לקוח | Client ID Metadata Document (client_id = כתובת https), או POST https://freepay.clickdrop.online/oauth/register (RFC 7591) |
| PKCE / scopes | S256 בלבד (חובה ללקוח ציבורי) · mcp:read, mcp:write או הרשאות ה-API (documents:read…) |
עסק והגדרות Business & settings
GET /business
פרטי העסק Get business settings:read v1.0
פרטי העסק, סוג העוסק, שיעור המע"מ וסוגי המסמכים שהעסק רשאי להפיק.
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/business' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/business", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/business",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/business');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"name": "סטודיו לדוגמה",
"legal_type": "murshe",
"tax_id": "515555555",
"vat_rate": 18,
"allowed_document_types": [
{
"type": 320,
"name": "חשבונית מס קבלה"
}
],
"frozen": false
}
GET /settings
הגדרות ומספור Get settings settings:read v1.1
שיעור מע"מ, סוג עוסק, הזנת מחירים, ומצב המספור לכל סוג מסמך (המספר הבא והאם ננעל).
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/settings' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/settings", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/settings",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/settings');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "settings",
"legal_type": "murshe",
"vat_rate": 18,
"prices_include_vat": true,
"allocation_threshold": 5000,
"ready": true,
"numbering": [
{
"type": 320,
"name": "חשבונית מס קבלה",
"next_number": 1006,
"locked": true
}
]
}
GET /vat-rate
שיעור מע"מ לתאריך VAT rate for a date settings:read v1.1
השיעור לפי תאריך העסקה (18% מ-1.1.2025, 17% לפני כן). לעוסק פטור applies=false.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
date | query | date | תאריך (ברירת מחדל: היום) |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/vat-rate?date=2024-12-31' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/vat-rate?date=2024-12-31", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/vat-rate?date=2024-12-31",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/vat-rate?date=2024-12-31');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "vat_rate",
"date": "2024-12-31",
"vat_rate": 17,
"vat_rate_bp": 1700,
"applies": true
}
GET /exchange-rate
שער יציג של בנק ישראל Bank of Israel exchange rate settings:read v1.1
השער היציג לתאריך (או האחרון שפורסם לפניו, עד 10 ימים). מתאים לחישוב שווי בשקלים של חשבונית במטבע חוץ.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
currency חובה | query | string | קוד מטבע (USD, EUR, GBP...) |
date | query | date | תאריך (ברירת מחדל: היום) |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/exchange-rate?currency=USD&date=2026-10-20' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/exchange-rate?currency=USD&date=2026-10-20", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/exchange-rate?currency=USD&date=2026-10-20",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/exchange-rate?currency=USD&date=2026-10-20');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "exchange_rate",
"currency": "USD",
"date": "2026-10-20",
"rate": 3.712,
"effective_date": "2026-10-20",
"source": "boi:2026-10-20"
}
GET /document-types
סוגי מסמכים מותרים Allowed document types settings:read v1.1
סוגי המסמכים שהעסק רשאי להפיק לפי סוג העוסק, ומה כל סוג כולל.
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/document-types' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/document-types", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/document-types",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/document-types');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"type": 320,
"name": "חשבונית מס קבלה",
"vat": true,
"payments": true,
"allocation": true,
"credit": false,
"issuable": true
}
]
}
GET /numbering/{type}
המספר הבא Next document number settings:read v1.1
המספר שיקבל המסמך הבא מהסוג הזה, והאם ניתן עדיין לשנות את המספר ההתחלתי.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
type חובה | path | integer | סוג מסמך (300/305/320/330/400) |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/numbering/320' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/numbering/320", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/numbering/320",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/numbering/320');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "numbering",
"type": 320,
"name": "חשבונית מס קבלה",
"next_number": 1006,
"locked": true,
"can_change": false
}
PUT /numbering/{type}
קביעת מספר התחלתי Set start number settings:write v1.1
קובע את המספר הראשון בסדרה - רק לפני שהונפק מסמך ראשון מהסוג הזה (חובת מספור רציף). אחרי ההנפקה הראשונה תתקבל שגיאה numbering_locked (409).
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
type חובה | path | integer | סוג מסמך |
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
start_number חובה | integer | המספר הראשון |
confirm | boolean | גם לסמן "המספור אושר" (נדרש לפני הפקה ראשונה) |
דוגמה
curl -X PUT 'https://freepay.clickdrop.online/api/v1/numbering/320' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"start_number":1001,"confirm":true}'const res = await fetch("https://freepay.clickdrop.online/api/v1/numbering/320", {
method: "PUT",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"start_number": 1001,
"confirm": true
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.put(
"https://freepay.clickdrop.online/api/v1/numbering/320",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
json={
"start_number": 1001,
"confirm": True
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/numbering/320');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{"start_number":1001,"confirm":true}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "numbering",
"type": 320,
"name": "חשבונית מס קבלה",
"next_number": 1001,
"locked": false,
"can_change": true
}
לקוחות Customers
POST /customers
יצירת לקוח / מציאה Create or find customer customers:write v1.0
יוצר לקוח. עם match_by (external_id | tax_id | email | phone) - אם קיים לקוח תואם הוא מוחזר (200, matched:true) ולא נוצר כפול.
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
name חובה | string | שם הלקוח |
tax_id | string | ת.ז / ח.פ / מספר עוסק (9 ספרות) |
email | string (email) | מייל |
phone | string | טלפון |
address | string | כתובת |
city | string | עיר |
private | boolean | לקוח פרטי (לא עוסק) - בחשבונית מס בלי מספר עוסק |
external_id | string | המזהה שלכם ללקוח. אם נשלח - הלקוח יימצא או ייווצר (find-or-create) |
notes | string | הערות |
digital_consent | boolean | הלקוח הסכים לקבל מסמכים ממוחשבים במייל |
match_by | string | שדה להתאמה לפני יצירה external_id | tax_id | email | phone |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/customers' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"name":"לקוח לדוגמה בע\"מ","tax_id":"515555555","email":"billing@example.co.il","address":"הרצל 1","city":"תל אביב","external_id":"crm-1001","match_by":"external_id"}'const res = await fetch("https://freepay.clickdrop.online/api/v1/customers", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"address": "הרצל 1",
"city": "תל אביב",
"external_id": "crm-1001",
"match_by": "external_id"
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/customers",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"address": "הרצל 1",
"city": "תל אביב",
"external_id": "crm-1001",
"match_by": "external_id"
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/customers');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"name":"לקוח לדוגמה בע\\"מ","tax_id":"515555555","email":"billing@example.co.il","address":"הרצל 1","city":"תל אביב","external_id":"crm-1001","match_by":"external_id"}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "customer",
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": "0501234567",
"address": "הרצל 1",
"city": "תל אביב",
"notes": null,
"external_id": "crm-1001",
"digital_consent": true,
"digital_consent_at": "2026-01-01 10:00:00",
"created_at": "2026-01-01 10:00:00",
"matched": false
}
GET /customers
רשימת לקוחות List customers customers:read v1.0
חיפוש (q: שם, מייל, טלפון, מספר עוסק, מזהה חיצוני) ועימוד. בלי פרמטרי עימוד מוחזרים עד 1000 (תאימות לגרסה 1.0).
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
q | query | string | חיפוש חופשי |
email | query | string | סינון לפי מייל מדויק |
tax_id | query | string | סינון לפי מספר עוסק |
external_id | query | string | סינון לפי מזהה חיצוני |
limit | query | integer | מספר תוצאות (ברירת מחדל 100, עד 100) |
starting_after | query | integer | סמן עימוד: next_cursor מהתשובה הקודמת |
order | query | string | סדר לפי מזהה (ברירת מחדל asc) asc | desc |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/customers?q=%D7%93%D7%95%D7%92%D7%9E%D7%94&limit=20' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/customers?q=%D7%93%D7%95%D7%92%D7%9E%D7%94&limit=20", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/customers?q=%D7%93%D7%95%D7%92%D7%9E%D7%94&limit=20",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/customers?q=%D7%93%D7%95%D7%92%D7%9E%D7%94&limit=20');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "customer",
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": "0501234567",
"address": "הרצל 1",
"city": "תל אביב",
"notes": null,
"external_id": "crm-1001",
"digital_consent": true,
"digital_consent_at": "2026-01-01 10:00:00",
"created_at": "2026-01-01 10:00:00"
}
],
"has_more": false,
"next_cursor": null
}
GET /customers/{id}
לקוח Get customer customers:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה לקוח |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/customers/12' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/customers/12", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/customers/12",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/customers/12');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "customer",
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": "0501234567",
"address": "הרצל 1",
"city": "תל אביב",
"notes": null,
"external_id": "crm-1001",
"digital_consent": true,
"digital_consent_at": "2026-01-01 10:00:00",
"created_at": "2026-01-01 10:00:00"
}
PATCH /customers/{id}
עדכון לקוח Update customer customers:write v1.1
עדכון חלקי: רק השדות שנשלחו משתנים. מסמכים שכבר הונפקו אינם משתנים.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה לקוח |
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
name | string | שם הלקוח |
tax_id | string | ת.ז / ח.פ / מספר עוסק (9 ספרות) |
email | string (email) | מייל |
phone | string | טלפון |
address | string | כתובת |
city | string | עיר |
private | boolean | לקוח פרטי (לא עוסק) - בחשבונית מס בלי מספר עוסק |
external_id | string | המזהה שלכם ללקוח. אם נשלח - הלקוח יימצא או ייווצר (find-or-create) |
notes | string | הערות |
digital_consent | boolean | הסכמה למסמכים ממוחשבים |
דוגמה
curl -X PATCH 'https://freepay.clickdrop.online/api/v1/customers/12' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone":"0527654321","digital_consent":true}'const res = await fetch("https://freepay.clickdrop.online/api/v1/customers/12", {
method: "PATCH",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"phone": "0527654321",
"digital_consent": true
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.patch(
"https://freepay.clickdrop.online/api/v1/customers/12",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
json={
"phone": "0527654321",
"digital_consent": True
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/customers/12');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{"phone":"0527654321","digital_consent":true}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "customer",
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": "0501234567",
"address": "הרצל 1",
"city": "תל אביב",
"notes": null,
"external_id": "crm-1001",
"digital_consent": true,
"digital_consent_at": "2026-01-01 10:00:00",
"created_at": "2026-01-01 10:00:00"
}
POST /customers/{id}/notes
הוספת הערה ללקוח Add customer note customers:write v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה לקוח |
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
text חובה | string | תוכן ההערה |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/customers/12/notes' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"text":"ביקש חשבונית חודשית מרוכזת"}'const res = await fetch("https://freepay.clickdrop.online/api/v1/customers/12/notes", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"text": "ביקש חשבונית חודשית מרוכזת"
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/customers/12/notes",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"text": "ביקש חשבונית חודשית מרוכזת"
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/customers/12/notes');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"text":"ביקש חשבונית חודשית מרוכזת"}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "customer_note",
"id": 9,
"customer_id": 42,
"text": "ביקש חשבונית חודשית מרוכזת",
"author": "api:CRM",
"created_at": "2026-10-20 09:00:00"
}
GET /customers/{id}/notes
הערות הלקוח List customer notes customers:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה לקוח |
limit | query | integer | מספר תוצאות (ברירת מחדל 50, עד 100) |
starting_after | query | integer | סמן עימוד: next_cursor מהתשובה הקודמת |
order | query | string | סדר לפי מזהה (ברירת מחדל asc) asc | desc |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/customers/12/notes' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/customers/12/notes", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/customers/12/notes",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/customers/12/notes');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "customer_note",
"id": 9,
"customer_id": 42,
"text": "ביקש חשבונית חודשית מרוכזת",
"author": "api:CRM",
"created_at": "2026-10-20 09:00:00"
}
],
"has_more": false,
"next_cursor": null
}
GET /customers/{id}/balance
יתרת חוב Customer balance customers:read v1.1
חוב פתוח לפי חשבוניות שלא נסגרו בקבלה / זיכוי (כמו דוח החייבים), כולל גיול ויתרת זכות.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה לקוח |
as_of | query | date | נכון לתאריך (ברירת מחדל: היום) |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/customers/12/balance' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/customers/12/balance", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/customers/12/balance",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/customers/12/balance');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "customer_balance",
"customer_id": 42,
"as_of": "2026-10-25",
"open_balance": 5900,
"open_balance_agorot": 590000,
"credit_balance": 0,
"aging": {
"0-30": 5900,
"31-60": 0,
"61-90": 0,
"90+": 0
},
"open_invoices": [
{
"id": 13,
"type": 305,
"number": 210,
"issue_date": "2026-10-20",
"total": 5900,
"open": 5900,
"days": 5
}
]
}
GET /customers/{id}/documents
מסמכי הלקוח Customer documents documents:read v1.1
מסמכים שהונפקו ללקוח (לפי מזהה הלקוח, או לפי מספר העוסק שלו).
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה לקוח |
type | query | integer | סוג מסמך |
from | query | date | מתאריך (כולל), YYYY-MM-DD |
to | query | date | עד תאריך (כולל), YYYY-MM-DD |
limit | query | integer | מספר תוצאות (ברירת מחדל 50, עד 100) |
starting_after | query | integer | סמן עימוד: next_cursor מהתשובה הקודמת |
order | query | string | סדר לפי מזהה (ברירת מחדל asc) asc | desc |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/customers/12/documents' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/customers/12/documents", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/customers/12/documents",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/customers/12/documents');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "document",
"id": 12,
"type": 320,
"type_name": "חשבונית מס קבלה",
"number": 1005,
"issue_date": "2026-10-20",
"issued_at": "2026-10-20T09:12:00.000Z",
"status": "issued",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": "0501234567",
"address": "הרצל 1, תל אביב"
},
"currency": "ILS",
"amount_before_discount": 5000,
"discount": 0,
"amount_before_vat": 5000,
"vat_rate": 18,
"vat": 900,
"total": 5900,
"paid": 5900,
"total_agorot": 590000,
"vat_agorot": 90000,
"amount_before_vat_agorot": 500000,
"paid_agorot": 590000,
"allocation": {
"status": "approved",
"number": "123456789"
},
"ref_document_id": null,
"cancelled_by_document_id": null,
"notes": null,
"source": "api",
"external_ref": "order-1001",
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit": "יח'",
"unit_price": 5000,
"discount": 0,
"total": 5000,
"vat_type": "standard"
}
],
"payments": [
{
"method": "transfer",
"amount": 5900,
"date": "2026-10-20",
"reference": "TR-88"
}
],
"pdf_url": "https://freepay.clickdrop.online/api/v1/documents/12/pdf?expires=1793000000&signature=…",
"pdf_url_expires_at": "2026-10-20T09:27:00.000Z",
"links": {
"self": "https://freepay.clickdrop.online/api/v1/documents/12",
"pdf": "https://freepay.clickdrop.online/api/v1/documents/12/pdf",
"customer": "https://freepay.clickdrop.online/api/v1/customers/42",
"app": "https://freepay.clickdrop.online/documents/12"
}
}
],
"has_more": false,
"next_cursor": null
}
מסמכים Documents
POST /documents
הפקת מסמך Issue document documents:write v1.0
מפיק חשבונית / קבלה (המסמך אינו ניתן לשינוי אחרי ההנפקה). הלקוח: customer (בתוך הבקשה), customer_id, או customer.external_id (find-or-create). שורות יכולות להפנות ל-item_id. send_email שולח ללקוח. חובה לשלוח Idempotency-Key.
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
type חובה | integer | סוג מסמך 300 | 305 | 320 | 400 |
issue_date | string (date) | תאריך (ברירת מחדל: היום; לא עתידי) |
supply_date | string (date) | תאריך אספקה אם שונה |
customer_id | integer | מזהה לקוח קיים |
customer | object | |
customer.name | string | שם הלקוח |
customer.tax_id | string | ת.ז / ח.פ / מספר עוסק (9 ספרות) |
customer.email | string (email) | מייל |
customer.phone | string | טלפון |
customer.address | string | כתובת |
customer.city | string | עיר |
customer.private | boolean | לקוח פרטי (לא עוסק) - בחשבונית מס בלי מספר עוסק |
customer.external_id | string | המזהה שלכם ללקוח. אם נשלח - הלקוח יימצא או ייווצר (find-or-create) |
prices_include_vat | boolean | המחירים כוללים מע"מ |
notes | string | הערות / בגין (בקבלה ללא שורות - חובה) |
lines | array<object> | שורות |
lines[].item_id | integer | מזהה פריט מהקטלוג - ממלא תיאור, יחידה, מחיר וסוג מע"מ כשהם חסרים |
lines[].description | string | תיאור |
lines[].quantity | number | כמות (ברירת מחדל 1) |
lines[].unit | string | יחידה (ברירת מחדל יח') |
lines[].unit_price | number | מחיר ליחידה (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
lines[].discount | number | הנחה בשורה (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
lines[].vat_type | string | סוג מע"מ standard | zero | exempt |
payments | array<object> | תקבולים (בקבלה / חשבונית מס קבלה - סכומם = סכום המסמך) |
payments[].method חובה | string | אמצעי תשלום cash | check | credit | transfer | app | withholding | other |
payments[].amount | number | סכום (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
payments[].date | string (date) | תאריך תשלום / פירעון |
payments[].card_last4 | string | 4 ספרות אחרונות |
payments[].installments | integer | תשלומים |
payments[].approval_number | string | מספר אישור |
payments[].check_number | string | מספר המחאה |
payments[].bank | string | בנק |
payments[].branch | string | סניף |
payments[].account | string | חשבון |
payments[].reference | string | אסמכתא / מספר העברה |
payments[].app | string | שם האפליקציה (ביט, פייבוקס...) |
external_ref | string | מזהה ההזמנה אצלכם (ייחודי) |
send_email | boolean | לשלוח ללקוח במייל |
language | string | שפה (כרגע רק he; ערך אחר - מתעלמים ומחזירים אזהרה) |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/documents' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: order-1001" \
-H "Content-Type: application/json" \
-d '{"type":320,"customer":{"name":"לקוח לדוגמה בע\"מ","tax_id":"515555555","email":"billing@example.co.il","address":"הרצל 1, תל אביב"},"prices_include_vat":true,"lines":[{"description":"בניית אתר","quantity":1,"unit_price":5900}],"payments":[{"method":"transfer","amount":5900,"reference":"TR-88"}],"external_ref":"order-1001","send_email":true}'const res = await fetch("https://freepay.clickdrop.online/api/v1/documents", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "order-1001" },
body: JSON.stringify({
"type": 320,
"customer": {
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"address": "הרצל 1, תל אביב"
},
"prices_include_vat": true,
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit_price": 5900
}
],
"payments": [
{
"method": "transfer",
"amount": 5900,
"reference": "TR-88"
}
],
"external_ref": "order-1001",
"send_email": true
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/documents",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "order-1001"},
json={
"type": 320,
"customer": {
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"address": "הרצל 1, תל אביב"
},
"prices_include_vat": True,
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit_price": 5900
}
],
"payments": [
{
"method": "transfer",
"amount": 5900,
"reference": "TR-88"
}
],
"external_ref": "order-1001",
"send_email": True
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/documents');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: order-1001"],
CURLOPT_POSTFIELDS => '{"type":320,"customer":{"name":"לקוח לדוגמה בע\\"מ","tax_id":"515555555","email":"billing@example.co.il","address":"הרצל 1, תל אביב"},"prices_include_vat":true,"lines":[{"description":"בניית אתר","quantity":1,"unit_price":5900}],"payments":[{"method":"transfer","amount":5900,"reference":"TR-88"}],"external_ref":"order-1001","send_email":true}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "document",
"id": 12,
"type": 320,
"type_name": "חשבונית מס קבלה",
"number": 1005,
"issue_date": "2026-10-20",
"issued_at": "2026-10-20T09:12:00.000Z",
"status": "issued",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": "0501234567",
"address": "הרצל 1, תל אביב"
},
"currency": "ILS",
"amount_before_discount": 5000,
"discount": 0,
"amount_before_vat": 5000,
"vat_rate": 18,
"vat": 900,
"total": 5900,
"paid": 5900,
"total_agorot": 590000,
"vat_agorot": 90000,
"amount_before_vat_agorot": 500000,
"paid_agorot": 590000,
"allocation": {
"status": "approved",
"number": "123456789"
},
"ref_document_id": null,
"cancelled_by_document_id": null,
"notes": null,
"source": "api",
"external_ref": "order-1001",
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit": "יח'",
"unit_price": 5000,
"discount": 0,
"total": 5000,
"vat_type": "standard"
}
],
"payments": [
{
"method": "transfer",
"amount": 5900,
"date": "2026-10-20",
"reference": "TR-88"
}
],
"pdf_url": "https://freepay.clickdrop.online/api/v1/documents/12/pdf?expires=1793000000&signature=…",
"pdf_url_expires_at": "2026-10-20T09:27:00.000Z",
"links": {
"self": "https://freepay.clickdrop.online/api/v1/documents/12",
"pdf": "https://freepay.clickdrop.online/api/v1/documents/12/pdf",
"customer": "https://freepay.clickdrop.online/api/v1/customers/42",
"app": "https://freepay.clickdrop.online/documents/12"
}
}
GET /documents
רשימת מסמכים List documents documents:read v1.0
סינון לפי סוג, תאריכים, לקוח, סטטוס, מספר הקצאה וחיפוש. עימוד: starting_after (או after_id הוותיק) + next_cursor.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
type | query | integer | סוג מסמך |
from | query | date | מתאריך (כולל), YYYY-MM-DD |
to | query | date | עד תאריך (כולל), YYYY-MM-DD |
customer_id | query | integer | מזהה לקוח |
status | query | string | סטטוס issued | cancelled |
allocation_status | query | string | סטטוס מספר הקצאה |
external_ref | query | string | המזהה שלכם |
q | query | string | חיפוש חופשי |
limit | query | integer | מספר תוצאות (ברירת מחדל 50, עד 200) |
starting_after | query | integer | סמן עימוד: next_cursor מהתשובה הקודמת |
after_id | query | integer | כמו starting_after (גרסה 1.0) |
order | query | string | סדר לפי מזהה (ברירת מחדל asc) asc | desc |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/documents?type=320&from=2026-10-01&to=2026-10-31&limit=50' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/documents?type=320&from=2026-10-01&to=2026-10-31&limit=50", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/documents?type=320&from=2026-10-01&to=2026-10-31&limit=50",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/documents?type=320&from=2026-10-01&to=2026-10-31&limit=50');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "document",
"id": 12,
"type": 320,
"type_name": "חשבונית מס קבלה",
"number": 1005,
"issue_date": "2026-10-20",
"issued_at": "2026-10-20T09:12:00.000Z",
"status": "issued",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": "0501234567",
"address": "הרצל 1, תל אביב"
},
"currency": "ILS",
"amount_before_discount": 5000,
"discount": 0,
"amount_before_vat": 5000,
"vat_rate": 18,
"vat": 900,
"total": 5900,
"paid": 5900,
"total_agorot": 590000,
"vat_agorot": 90000,
"amount_before_vat_agorot": 500000,
"paid_agorot": 590000,
"allocation": {
"status": "approved",
"number": "123456789"
},
"ref_document_id": null,
"cancelled_by_document_id": null,
"notes": null,
"source": "api",
"external_ref": "order-1001",
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit": "יח'",
"unit_price": 5000,
"discount": 0,
"total": 5000,
"vat_type": "standard"
}
],
"payments": [
{
"method": "transfer",
"amount": 5900,
"date": "2026-10-20",
"reference": "TR-88"
}
],
"pdf_url": "https://freepay.clickdrop.online/api/v1/documents/12/pdf?expires=1793000000&signature=…",
"pdf_url_expires_at": "2026-10-20T09:27:00.000Z",
"links": {
"self": "https://freepay.clickdrop.online/api/v1/documents/12",
"pdf": "https://freepay.clickdrop.online/api/v1/documents/12/pdf",
"customer": "https://freepay.clickdrop.online/api/v1/customers/42",
"app": "https://freepay.clickdrop.online/documents/12"
}
}
],
"has_more": false,
"next_cursor": null,
"next_after_id": null
}
GET /documents/open
חשבוניות פתוחות Unpaid invoices documents:read v1.1
חשבוניות (305 / 300) שטרם נסגרו בקבלה או בזיכוי, עם הסכום הפתוח וימי פיגור.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
customer_id | query | integer | רק ללקוח הזה |
as_of | query | date | נכון לתאריך |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/documents/open' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/documents/open", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/documents/open",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/documents/open');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"as_of": "2026-10-25",
"total_open": 5900,
"total_open_agorot": 590000,
"data": [
{
"id": 13,
"type": 305,
"number": 210,
"issue_date": "2026-10-20",
"customer_name": "לקוח לדוגמה בע\"מ",
"customer_id": 42,
"total": 5900,
"open": 5900,
"days": 5
}
]
}
GET /documents/{id}
מסמך Get document documents:read v1.0
כל פרטי המסמך: שורות, תקבולים, מספר הקצאה, הפניות, וקישור PDF חתום לזמן קצר (pdf_url, 15 דקות, בלי מפתח).
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה מסמך |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/documents/12' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/documents/12", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/documents/12",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/documents/12');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "document",
"id": 12,
"type": 320,
"type_name": "חשבונית מס קבלה",
"number": 1005,
"issue_date": "2026-10-20",
"issued_at": "2026-10-20T09:12:00.000Z",
"status": "issued",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": "0501234567",
"address": "הרצל 1, תל אביב"
},
"currency": "ILS",
"amount_before_discount": 5000,
"discount": 0,
"amount_before_vat": 5000,
"vat_rate": 18,
"vat": 900,
"total": 5900,
"paid": 5900,
"total_agorot": 590000,
"vat_agorot": 90000,
"amount_before_vat_agorot": 500000,
"paid_agorot": 590000,
"allocation": {
"status": "approved",
"number": "123456789"
},
"ref_document_id": null,
"cancelled_by_document_id": null,
"notes": null,
"source": "api",
"external_ref": "order-1001",
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit": "יח'",
"unit_price": 5000,
"discount": 0,
"total": 5000,
"vat_type": "standard"
}
],
"payments": [
{
"method": "transfer",
"amount": 5900,
"date": "2026-10-20",
"reference": "TR-88"
}
],
"pdf_url": "https://freepay.clickdrop.online/api/v1/documents/12/pdf?expires=1793000000&signature=…",
"pdf_url_expires_at": "2026-10-20T09:27:00.000Z",
"links": {
"self": "https://freepay.clickdrop.online/api/v1/documents/12",
"pdf": "https://freepay.clickdrop.online/api/v1/documents/12/pdf",
"customer": "https://freepay.clickdrop.online/api/v1/customers/42",
"app": "https://freepay.clickdrop.online/documents/12"
}
}
GET /documents/{id}/pdf
PDF של מסמך Document PDF documents:read v1.0
קובץ PDF חתום (תמיד "העתק נאמן למקור"). ?format=base64 מחזיר JSON עם content_base64.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה מסמך |
format | query | string | pdf (ברירת מחדל) או base64 (JSON) pdf | base64 |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/documents/12/pdf' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-o file.pdfconst res = await fetch("https://freepay.clickdrop.online/api/v1/documents/12/pdf", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const pdf = Buffer.from(await res.arrayBuffer());
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/documents/12/pdf",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
open("file.pdf", "wb").write(r.content)<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/documents/12/pdf');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
file_put_contents("file.pdf", $response);תשובה 200 application/pdf (או JSON עם ?format=base64)
{
"object": "file",
"filename": "320-1005.pdf",
"content_type": "application/pdf",
"size": 48211,
"content_base64": "JVBERi0xLjQK…"
}
POST /documents/{id}/send
שליחת מסמך במייל Email document documents:write v1.1
שולח את ה-PDF ללקוח (או לכתובת to). מסמך שממתין למספר הקצאה לא נשלח.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה מסמך |
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
to | string (email) | כתובת יעד (ברירת מחדל: מייל הלקוח במסמך) |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/documents/12/send' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"to":"billing@example.co.il"}'const res = await fetch("https://freepay.clickdrop.online/api/v1/documents/12/send", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"to": "billing@example.co.il"
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/documents/12/send",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"to": "billing@example.co.il"
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/documents/12/send');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"to":"billing@example.co.il"}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "delivery",
"document_id": 12,
"channel": "email",
"to": "billing@example.co.il",
"sent": true
}
POST /documents/{id}/cancel
ביטול מסמך Cancel document documents:write v1.0
ביטול מלא: מפיק חשבונית מס זיכוי (לחשבונית) או מסמך ביטול (לקבלה). מחזיר את מסמך הביטול.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה מסמך |
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
reason | string | סיבת הביטול |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/documents/12/cancel' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"reason":"הזמנה בוטלה"}'const res = await fetch("https://freepay.clickdrop.online/api/v1/documents/12/cancel", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"reason": "הזמנה בוטלה"
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/documents/12/cancel",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"reason": "הזמנה בוטלה"
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/documents/12/cancel');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"reason":"הזמנה בוטלה"}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "document",
"id": 14,
"type": 330,
"type_name": "חשבונית מס זיכוי",
"number": 1005,
"issue_date": "2026-10-20",
"issued_at": "2026-10-20T09:12:00.000Z",
"status": "issued",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": "0501234567",
"address": "הרצל 1, תל אביב"
},
"currency": "ILS",
"amount_before_discount": 5000,
"discount": 0,
"amount_before_vat": 5000,
"vat_rate": 18,
"vat": 900,
"total": -5900,
"paid": 5900,
"total_agorot": 590000,
"vat_agorot": 90000,
"amount_before_vat_agorot": 500000,
"paid_agorot": 590000,
"allocation": {
"status": "approved",
"number": "123456789"
},
"ref_document_id": 12,
"cancelled_by_document_id": null,
"notes": null,
"source": "api",
"external_ref": "order-1001",
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit": "יח'",
"unit_price": 5000,
"discount": 0,
"total": 5000,
"vat_type": "standard"
}
],
"payments": [
{
"method": "transfer",
"amount": 5900,
"date": "2026-10-20",
"reference": "TR-88"
}
],
"pdf_url": "https://freepay.clickdrop.online/api/v1/documents/12/pdf?expires=1793000000&signature=…",
"pdf_url_expires_at": "2026-10-20T09:27:00.000Z",
"links": {
"self": "https://freepay.clickdrop.online/api/v1/documents/12",
"pdf": "https://freepay.clickdrop.online/api/v1/documents/12/pdf",
"customer": "https://freepay.clickdrop.online/api/v1/customers/42",
"app": "https://freepay.clickdrop.online/documents/12"
}
}
POST /documents/{id}/credit
זיכוי חלקי Partial credit documents:write v1.1
חשבונית מס זיכוי חלקית (החזרה / הנחה בדיעבד) לחשבונית מס או חשבונית מס קבלה. הסכום כולל מע"מ ולא יעלה על היתרה שטרם זוכתה.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה מסמך |
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
amount | number | סכום הזיכוי כולל מע"מ (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
description | string | תיאור |
reason | string | סיבה |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/documents/12/credit' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"amount":590,"description":"החזר על פריט פגום","reason":"החזרה"}'const res = await fetch("https://freepay.clickdrop.online/api/v1/documents/12/credit", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"amount": 590,
"description": "החזר על פריט פגום",
"reason": "החזרה"
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/documents/12/credit",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"amount": 590,
"description": "החזר על פריט פגום",
"reason": "החזרה"
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/documents/12/credit');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"amount":590,"description":"החזר על פריט פגום","reason":"החזרה"}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "document",
"id": 15,
"type": 330,
"type_name": "חשבונית מס זיכוי",
"number": 1005,
"issue_date": "2026-10-20",
"issued_at": "2026-10-20T09:12:00.000Z",
"status": "issued",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": "0501234567",
"address": "הרצל 1, תל אביב"
},
"currency": "ILS",
"amount_before_discount": 5000,
"discount": 0,
"amount_before_vat": 5000,
"vat_rate": 18,
"vat": 900,
"total": -590,
"paid": 5900,
"total_agorot": 590000,
"vat_agorot": 90000,
"amount_before_vat_agorot": 500000,
"paid_agorot": 590000,
"allocation": {
"status": "approved",
"number": "123456789"
},
"ref_document_id": 12,
"cancelled_by_document_id": null,
"notes": null,
"source": "api",
"external_ref": "order-1001",
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit": "יח'",
"unit_price": 5000,
"discount": 0,
"total": 5000,
"vat_type": "standard"
}
],
"payments": [
{
"method": "transfer",
"amount": 5900,
"date": "2026-10-20",
"reference": "TR-88"
}
],
"pdf_url": "https://freepay.clickdrop.online/api/v1/documents/12/pdf?expires=1793000000&signature=…",
"pdf_url_expires_at": "2026-10-20T09:27:00.000Z",
"links": {
"self": "https://freepay.clickdrop.online/api/v1/documents/12",
"pdf": "https://freepay.clickdrop.online/api/v1/documents/12/pdf",
"customer": "https://freepay.clickdrop.online/api/v1/customers/42",
"app": "https://freepay.clickdrop.online/documents/12"
}
}
GET /reports/receivables
דוח חייבים (גיול) Receivables aging documents:read v1.1
חוב פתוח לפי לקוח, מחולק לתקופות 0-30 / 31-60 / 61-90 / 90+ ימים.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
as_of | query | date | נכון לתאריך |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/reports/receivables' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/reports/receivables", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/reports/receivables",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/reports/receivables');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "receivables_report",
"as_of": "2026-10-25",
"buckets": [
"0-30",
"31-60",
"61-90",
"90+"
],
"totals": {
"open": 5900,
"credit": 0,
"aging": {
"0-30": 5900,
"31-60": 0,
"61-90": 0,
"90+": 0
}
},
"customers": [
{
"customer_id": 42,
"name": "לקוח לדוגמה בע\"מ",
"open": 5900,
"credit": 0,
"aging": {
"0-30": 5900,
"31-60": 0,
"61-90": 0,
"90+": 0
},
"invoices": []
}
]
}
הצעות מחיר Quotes
POST /quotes
יצירת הצעת מחיר Create quote quotes:write v1.1
הצעת מחיר או הזמנת עבודה (אינן מסמך חשבונאי). לקוח: customer, customer_id או customer.external_id.
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
kind | string | סוג quote | order |
issue_date | string (date) | תאריך |
valid_until | string (date) | בתוקף עד (ברירת מחדל: 30 יום) |
customer_id | integer | מזהה לקוח |
customer | object | |
customer.name | string | שם הלקוח |
customer.tax_id | string | ת.ז / ח.פ / מספר עוסק (9 ספרות) |
customer.email | string (email) | מייל |
customer.phone | string | טלפון |
customer.address | string | כתובת |
customer.city | string | עיר |
customer.private | boolean | לקוח פרטי (לא עוסק) - בחשבונית מס בלי מספר עוסק |
customer.external_id | string | המזהה שלכם ללקוח. אם נשלח - הלקוח יימצא או ייווצר (find-or-create) |
lines | array<object> | שורות |
lines[].item_id | integer | מזהה פריט מהקטלוג - ממלא תיאור, יחידה, מחיר וסוג מע"מ כשהם חסרים |
lines[].description | string | תיאור |
lines[].quantity | number | כמות (ברירת מחדל 1) |
lines[].unit | string | יחידה (ברירת מחדל יח') |
lines[].unit_price | number | מחיר ליחידה (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
lines[].discount | number | הנחה בשורה (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
lines[].vat_type | string | סוג מע"מ standard | zero | exempt |
prices_include_vat | boolean | המחירים כוללים מע"מ |
notes | string | הערות |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/quotes' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"customer_id":42,"lines":[{"description":"בניית אתר","quantity":1,"unit_price":5000}],"valid_until":"2026-11-30"}'const res = await fetch("https://freepay.clickdrop.online/api/v1/quotes", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"customer_id": 42,
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit_price": 5000
}
],
"valid_until": "2026-11-30"
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/quotes",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"customer_id": 42,
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit_price": 5000
}
],
"valid_until": "2026-11-30"
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/quotes');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"customer_id":42,"lines":[{"description":"בניית אתר","quantity":1,"unit_price":5000}],"valid_until":"2026-11-30"}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "quote",
"id": 7,
"kind": "quote",
"kind_name": "הצעת מחיר",
"number": 3,
"status": "sent",
"issue_date": "2026-10-01",
"valid_until": "2026-10-31",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": null,
"address": null
},
"prices_include_vat": false,
"vat_rate": 18,
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit": "יח'",
"unit_price": 5000,
"total": 5000,
"vat_type": "standard"
}
],
"subtotal": 5000,
"vat": 900,
"total": 5900,
"total_agorot": 590000,
"notes": null,
"public_url": "https://freepay.clickdrop.online/q/…",
"sent_at": "2026-10-01 10:00:00",
"accepted_at": null,
"converted_document_id": null
}
GET /quotes
רשימת הצעות List quotes quotes:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
status | query | string | סטטוס draft | sent | accepted | rejected | expired | converted |
kind | query | string | סוג quote | order |
customer_id | query | integer | מזהה לקוח |
from | query | date | מתאריך (כולל), YYYY-MM-DD |
to | query | date | עד תאריך (כולל), YYYY-MM-DD |
limit | query | integer | מספר תוצאות (ברירת מחדל 50, עד 100) |
starting_after | query | integer | סמן עימוד: next_cursor מהתשובה הקודמת |
order | query | string | סדר לפי מזהה (ברירת מחדל asc) asc | desc |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/quotes' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/quotes", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/quotes",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/quotes');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "quote",
"id": 7,
"kind": "quote",
"kind_name": "הצעת מחיר",
"number": 3,
"status": "sent",
"issue_date": "2026-10-01",
"valid_until": "2026-10-31",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": null,
"address": null
},
"prices_include_vat": false,
"vat_rate": 18,
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit": "יח'",
"unit_price": 5000,
"total": 5000,
"vat_type": "standard"
}
],
"subtotal": 5000,
"vat": 900,
"total": 5900,
"total_agorot": 590000,
"notes": null,
"public_url": "https://freepay.clickdrop.online/q/…",
"sent_at": "2026-10-01 10:00:00",
"accepted_at": null,
"converted_document_id": null
}
],
"has_more": false,
"next_cursor": null
}
GET /quotes/{id}
הצעת מחיר Get quote quotes:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה הצעה |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/quotes/12' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/quotes/12", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/quotes/12",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/quotes/12');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "quote",
"id": 7,
"kind": "quote",
"kind_name": "הצעת מחיר",
"number": 3,
"status": "sent",
"issue_date": "2026-10-01",
"valid_until": "2026-10-31",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": null,
"address": null
},
"prices_include_vat": false,
"vat_rate": 18,
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit": "יח'",
"unit_price": 5000,
"total": 5000,
"vat_type": "standard"
}
],
"subtotal": 5000,
"vat": 900,
"total": 5900,
"total_agorot": 590000,
"notes": null,
"public_url": "https://freepay.clickdrop.online/q/…",
"sent_at": "2026-10-01 10:00:00",
"accepted_at": null,
"converted_document_id": null
}
POST /quotes/{id}/send
שליחת הצעה במייל Email quote quotes:write v1.1
שולח PDF וקישור אישור ללקוח ומסמן "נשלחה". כשהלקוח מאשר נשלח האירוע quote.accepted.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה הצעה |
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
to | string (email) | כתובת יעד (ברירת מחדל: מייל הלקוח בהצעה) |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/quotes/12/send' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123"const res = await fetch("https://freepay.clickdrop.online/api/v1/quotes/12/send", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Idempotency-Key": "unique-request-id-123" },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/quotes/12/send",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/quotes/12/send');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Idempotency-Key: unique-request-id-123"],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "quote",
"id": 7,
"kind": "quote",
"kind_name": "הצעת מחיר",
"number": 3,
"status": "sent",
"issue_date": "2026-10-01",
"valid_until": "2026-10-31",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": null,
"address": null
},
"prices_include_vat": false,
"vat_rate": 18,
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit": "יח'",
"unit_price": 5000,
"total": 5000,
"vat_type": "standard"
}
],
"subtotal": 5000,
"vat": 900,
"total": 5900,
"total_agorot": 590000,
"notes": null,
"public_url": "https://freepay.clickdrop.online/q/…",
"sent_at": "2026-10-01 10:00:00",
"accepted_at": null,
"converted_document_id": null
}
POST /quotes/{id}/convert
המרה למסמך Convert quote quotes:write v1.1
בלי issue - מחזיר טיוטת מסמך (גוף מוכן ל-POST /documents). עם issue:true - מפיק מיד את המסמך (נדרשת גם documents:write) ומסמן את ההצעה "הומרה".
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה הצעה |
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
type | integer | סוג מסמך (ברירת מחדל: חשבונית מס / חשבון עסקה) 300 | 305 | 320 | 400 |
issue | boolean | להפיק מיד |
issue_date | string (date) | תאריך |
payments | array<object> | תקבולים (למסמך עם קבלה) |
payments[].method חובה | string | אמצעי תשלום cash | check | credit | transfer | app | withholding | other |
payments[].amount | number | סכום (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
payments[].date | string (date) | תאריך תשלום / פירעון |
payments[].card_last4 | string | 4 ספרות אחרונות |
payments[].installments | integer | תשלומים |
payments[].approval_number | string | מספר אישור |
payments[].check_number | string | מספר המחאה |
payments[].bank | string | בנק |
payments[].branch | string | סניף |
payments[].account | string | חשבון |
payments[].reference | string | אסמכתא / מספר העברה |
payments[].app | string | שם האפליקציה (ביט, פייבוקס...) |
send_email | boolean | לשלוח ללקוח |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/quotes/12/convert' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"type":305,"issue":true}'const res = await fetch("https://freepay.clickdrop.online/api/v1/quotes/12/convert", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"type": 305,
"issue": true
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/quotes/12/convert",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"type": 305,
"issue": True
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/quotes/12/convert');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"type":305,"issue":true}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "quote_conversion",
"quote": {
"object": "quote",
"id": 7,
"kind": "quote",
"kind_name": "הצעת מחיר",
"number": 3,
"status": "converted",
"issue_date": "2026-10-01",
"valid_until": "2026-10-31",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": null,
"address": null
},
"prices_include_vat": false,
"vat_rate": 18,
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit": "יח'",
"unit_price": 5000,
"total": 5000,
"vat_type": "standard"
}
],
"subtotal": 5000,
"vat": 900,
"total": 5900,
"total_agorot": 590000,
"notes": null,
"public_url": "https://freepay.clickdrop.online/q/…",
"sent_at": "2026-10-01 10:00:00",
"accepted_at": null,
"converted_document_id": 13
},
"document": {
"object": "document",
"id": 13,
"type": 305,
"type_name": "חשבונית מס",
"number": 1005,
"issue_date": "2026-10-20",
"issued_at": "2026-10-20T09:12:00.000Z",
"status": "issued",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"tax_id": "515555555",
"email": "billing@example.co.il",
"phone": "0501234567",
"address": "הרצל 1, תל אביב"
},
"currency": "ILS",
"amount_before_discount": 5000,
"discount": 0,
"amount_before_vat": 5000,
"vat_rate": 18,
"vat": 900,
"total": 5900,
"paid": 5900,
"total_agorot": 590000,
"vat_agorot": 90000,
"amount_before_vat_agorot": 500000,
"paid_agorot": 590000,
"allocation": {
"status": "approved",
"number": "123456789"
},
"ref_document_id": null,
"cancelled_by_document_id": null,
"notes": null,
"source": "api",
"external_ref": "order-1001",
"lines": [
{
"description": "בניית אתר",
"quantity": 1,
"unit": "יח'",
"unit_price": 5000,
"discount": 0,
"total": 5000,
"vat_type": "standard"
}
],
"payments": [
{
"method": "transfer",
"amount": 5900,
"date": "2026-10-20",
"reference": "TR-88"
}
],
"pdf_url": "https://freepay.clickdrop.online/api/v1/documents/12/pdf?expires=1793000000&signature=…",
"pdf_url_expires_at": "2026-10-20T09:27:00.000Z",
"links": {
"self": "https://freepay.clickdrop.online/api/v1/documents/12",
"pdf": "https://freepay.clickdrop.online/api/v1/documents/12/pdf",
"customer": "https://freepay.clickdrop.online/api/v1/customers/42",
"app": "https://freepay.clickdrop.online/documents/12"
}
}
}
פריטים Items
POST /items
יצירת פריט Create item items:write v1.1
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
name חובה | string | שם |
sku | string | מק"ט |
description | string | תיאור |
unit | string | יחידה |
unit_price | number | מחיר ליחידה (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
vat_type | string | סוג מע"מ standard | zero | exempt |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/items' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"name":"בניית אתר","sku":"WEB-1","unit_price":5000}'const res = await fetch("https://freepay.clickdrop.online/api/v1/items", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"name": "בניית אתר",
"sku": "WEB-1",
"unit_price": 5000
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/items",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"name": "בניית אתר",
"sku": "WEB-1",
"unit_price": 5000
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/items');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"name":"בניית אתר","sku":"WEB-1","unit_price":5000}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "item",
"id": 5,
"sku": "WEB-1",
"name": "בניית אתר",
"description": null,
"unit": "יח'",
"unit_price": 5000,
"unit_price_agorot": 500000,
"vat_type": "standard",
"active": true,
"usage_count": 3
}
GET /items
קטלוג פריטים List items items:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
q | query | string | חיפוש חופשי |
include_inactive | query | boolean | כולל פריטים מושבתים |
limit | query | integer | מספר תוצאות (ברירת מחדל 100, עד 100) |
starting_after | query | integer | סמן עימוד: next_cursor מהתשובה הקודמת |
order | query | string | סדר לפי מזהה (ברירת מחדל asc) asc | desc |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/items' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/items", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/items",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/items');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "item",
"id": 5,
"sku": "WEB-1",
"name": "בניית אתר",
"description": null,
"unit": "יח'",
"unit_price": 5000,
"unit_price_agorot": 500000,
"vat_type": "standard",
"active": true,
"usage_count": 3
}
],
"has_more": false,
"next_cursor": null
}
GET /items/{id}
פריט Get item items:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה פריט |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/items/12' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/items/12", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/items/12",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/items/12');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "item",
"id": 5,
"sku": "WEB-1",
"name": "בניית אתר",
"description": null,
"unit": "יח'",
"unit_price": 5000,
"unit_price_agorot": 500000,
"vat_type": "standard",
"active": true,
"usage_count": 3
}
PATCH /items/{id}
עדכון פריט Update item items:write v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה פריט |
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
name | string | שם |
sku | string | מק"ט |
description | string | תיאור |
unit | string | יחידה |
unit_price | number | מחיר (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
vat_type | string | סוג מע"מ standard | zero | exempt |
active | boolean | פעיל |
דוגמה
curl -X PATCH 'https://freepay.clickdrop.online/api/v1/items/12' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"unit_price":5500}'const res = await fetch("https://freepay.clickdrop.online/api/v1/items/12", {
method: "PATCH",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"unit_price": 5500
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.patch(
"https://freepay.clickdrop.online/api/v1/items/12",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
json={
"unit_price": 5500
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/items/12');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{"unit_price":5500}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "item",
"id": 5,
"sku": "WEB-1",
"name": "בניית אתר",
"description": null,
"unit": "יח'",
"unit_price": 5000,
"unit_price_agorot": 500000,
"vat_type": "standard",
"active": true,
"usage_count": 3
}
הוצאות Expenses
POST /expenses
קליטת הוצאה Upload expense expenses:write v1.1
קובץ חשבונית / קבלה (PDF / תמונה / CSV / TXT, עד 20MB). שלוש דרכים: JSON עם file.content_base64 (עד ~700KB), multipart/form-data (שדה file), או גוף בינארי עם Content-Type של הקובץ ו-X-Filename. הזיהוי האוטומטי רץ ברקע - בדקו GET /expenses/{id}. אותו קובץ פעמיים מחזיר את ההוצאה הקיימת (duplicate_file:true, 200).
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
file | object | |
file.name | string | שם קובץ |
file.mime | string | סוג |
file.content_base64 חובה | string | תוכן הקובץ ב-base64 |
notes | string | הערה |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/expenses' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"file":{"name":"invoice.pdf","mime":"application/pdf","content_base64":"JVBERi0xLjQK…"}}'const res = await fetch("https://freepay.clickdrop.online/api/v1/expenses", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"file": {
"name": "invoice.pdf",
"mime": "application/pdf",
"content_base64": "JVBERi0xLjQK…"
}
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/expenses",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"file": {
"name": "invoice.pdf",
"mime": "application/pdf",
"content_base64": "JVBERi0xLjQK…"
}
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/expenses');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"file":{"name":"invoice.pdf","mime":"application/pdf","content_base64":"JVBERi0xLjQK…"}}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "expense",
"id": 31,
"status": "extracting",
"doc_kind": "tax_invoice",
"doc_kind_name": "חשבונית מס",
"supplier_name": "ספק בע\"מ",
"supplier_tax_id": "514444444",
"doc_number": "8812",
"doc_date": "2026-10-10",
"currency": "ILS",
"amount_before_vat": 100,
"vat_amount": 18,
"total": 118,
"total_agorot": 11800,
"deductible_vat": 18,
"category": {
"id": 3,
"code": "software",
"name": "תוכנה, מנויים ואחסון"
},
"warnings": [],
"file": {
"name": "invoice.pdf",
"mime": "application/pdf",
"size": 48211
},
"created_at": "2026-10-10 08:00:00",
"duplicate_file": false
}
GET /expenses
רשימת הוצאות List expenses expenses:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
status | query | string | סטטוס new | extracting | review | approved | rejected | duplicate |
from | query | date | מתאריך מסמך |
to | query | date | עד תאריך מסמך |
category_id | query | integer | קטגוריה |
q | query | string | חיפוש חופשי |
limit | query | integer | מספר תוצאות (ברירת מחדל 50, עד 100) |
starting_after | query | integer | סמן עימוד: next_cursor מהתשובה הקודמת |
order | query | string | סדר לפי מזהה (ברירת מחדל asc) asc | desc |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/expenses' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/expenses", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/expenses",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/expenses');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "expense",
"id": 31,
"status": "review",
"doc_kind": "tax_invoice",
"doc_kind_name": "חשבונית מס",
"supplier_name": "ספק בע\"מ",
"supplier_tax_id": "514444444",
"doc_number": "8812",
"doc_date": "2026-10-10",
"currency": "ILS",
"amount_before_vat": 100,
"vat_amount": 18,
"total": 118,
"total_agorot": 11800,
"deductible_vat": 18,
"category": {
"id": 3,
"code": "software",
"name": "תוכנה, מנויים ואחסון"
},
"warnings": [],
"file": {
"name": "invoice.pdf",
"mime": "application/pdf",
"size": 48211
},
"created_at": "2026-10-10 08:00:00"
}
],
"has_more": false,
"next_cursor": null
}
GET /expenses/{id}
הוצאה Get expense expenses:read v1.1
כולל השדות שזוהו, אזהרות (כפילות, מספר הקצאה חסר, ת.ז קונה), מע"מ מוכר וסטטוס הזיהוי.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה הוצאה |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/expenses/12' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/expenses/12", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/expenses/12",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/expenses/12');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "expense",
"id": 31,
"status": "review",
"doc_kind": "tax_invoice",
"doc_kind_name": "חשבונית מס",
"supplier_name": "ספק בע\"מ",
"supplier_tax_id": "514444444",
"doc_number": "8812",
"doc_date": "2026-10-10",
"currency": "ILS",
"amount_before_vat": 100,
"vat_amount": 18,
"total": 118,
"total_agorot": 11800,
"deductible_vat": 18,
"category": {
"id": 3,
"code": "software",
"name": "תוכנה, מנויים ואחסון"
},
"warnings": [],
"file": {
"name": "invoice.pdf",
"mime": "application/pdf",
"size": 48211
},
"created_at": "2026-10-10 08:00:00"
}
GET /expenses/{id}/file
קובץ המקור Expense source file expenses:read v1.1
הקובץ המקורי כפי שהתקבל.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה הוצאה |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/expenses/12/file' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-o file.pdfconst res = await fetch("https://freepay.clickdrop.online/api/v1/expenses/12/file", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const pdf = Buffer.from(await res.arrayBuffer());
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/expenses/12/file",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
open("file.pdf", "wb").write(r.content)<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/expenses/12/file');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
file_put_contents("file.pdf", $response);תשובה 200 application/pdf
PATCH /expenses/{id}
עדכון הוצאה Update expense expenses:write v1.1
תיקון שדות וקטגוריה. הוצאה מאושרת אינה ניתנת לעריכה.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה הוצאה |
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
doc_kind | string | סוג מסמך |
supplier_name | string | ספק |
supplier_tax_id | string | מספר עוסק ספק |
doc_number | string | מספר מסמך |
doc_date | string (date) | תאריך |
currency | string | מטבע |
amount_before_vat | number | לפני מע"מ (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
vat_amount | number | מע"מ (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
total | number | סה"כ (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
allocation_number | string | מספר הקצאה |
category_id | integer | קטגוריה |
vat_pct | number | אחוז מע"מ מוכר |
car_number | string | מספר רכב |
payment_method | string | אמצעי תשלום |
notes | string | הערות |
דוגמה
curl -X PATCH 'https://freepay.clickdrop.online/api/v1/expenses/12' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"category_id":3,"total":118,"vat_amount":18,"amount_before_vat":100}'const res = await fetch("https://freepay.clickdrop.online/api/v1/expenses/12", {
method: "PATCH",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"category_id": 3,
"total": 118,
"vat_amount": 18,
"amount_before_vat": 100
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.patch(
"https://freepay.clickdrop.online/api/v1/expenses/12",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
json={
"category_id": 3,
"total": 118,
"vat_amount": 18,
"amount_before_vat": 100
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/expenses/12');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{"category_id":3,"total":118,"vat_amount":18,"amount_before_vat":100}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "expense",
"id": 31,
"status": "review",
"doc_kind": "tax_invoice",
"doc_kind_name": "חשבונית מס",
"supplier_name": "ספק בע\"מ",
"supplier_tax_id": "514444444",
"doc_number": "8812",
"doc_date": "2026-10-10",
"currency": "ILS",
"amount_before_vat": 100,
"vat_amount": 18,
"total": 118,
"total_agorot": 11800,
"deductible_vat": 18,
"category": {
"id": 3,
"code": "software",
"name": "תוכנה, מנויים ואחסון"
},
"warnings": [],
"file": {
"name": "invoice.pdf",
"mime": "application/pdf",
"size": 48211
},
"created_at": "2026-10-10 08:00:00"
}
POST /expenses/{id}/approve
אישור הוצאה Approve expense expenses:write v1.1
נדרשים סוג מסמך, תאריך וסכום, ואין חשד לכפילות.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה הוצאה |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/expenses/12/approve' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123"const res = await fetch("https://freepay.clickdrop.online/api/v1/expenses/12/approve", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Idempotency-Key": "unique-request-id-123" },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/expenses/12/approve",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/expenses/12/approve');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Idempotency-Key: unique-request-id-123"],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "expense",
"id": 31,
"status": "approved",
"doc_kind": "tax_invoice",
"doc_kind_name": "חשבונית מס",
"supplier_name": "ספק בע\"מ",
"supplier_tax_id": "514444444",
"doc_number": "8812",
"doc_date": "2026-10-10",
"currency": "ILS",
"amount_before_vat": 100,
"vat_amount": 18,
"total": 118,
"total_agorot": 11800,
"deductible_vat": 18,
"category": {
"id": 3,
"code": "software",
"name": "תוכנה, מנויים ואחסון"
},
"warnings": [],
"file": {
"name": "invoice.pdf",
"mime": "application/pdf",
"size": 48211
},
"created_at": "2026-10-10 08:00:00"
}
POST /expenses/{id}/reject
דחיית הוצאה Reject expense expenses:write v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה הוצאה |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/expenses/12/reject' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123"const res = await fetch("https://freepay.clickdrop.online/api/v1/expenses/12/reject", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Idempotency-Key": "unique-request-id-123" },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/expenses/12/reject",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/expenses/12/reject');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Idempotency-Key: unique-request-id-123"],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "expense",
"id": 31,
"status": "rejected",
"doc_kind": "tax_invoice",
"doc_kind_name": "חשבונית מס",
"supplier_name": "ספק בע\"מ",
"supplier_tax_id": "514444444",
"doc_number": "8812",
"doc_date": "2026-10-10",
"currency": "ILS",
"amount_before_vat": 100,
"vat_amount": 18,
"total": 118,
"total_agorot": 11800,
"deductible_vat": 18,
"category": {
"id": 3,
"code": "software",
"name": "תוכנה, מנויים ואחסון"
},
"warnings": [],
"file": {
"name": "invoice.pdf",
"mime": "application/pdf",
"size": 48211
},
"created_at": "2026-10-10 08:00:00"
}
GET /expense-categories
קטגוריות הוצאה Expense categories expenses:read v1.1
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/expense-categories' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/expense-categories", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/expense-categories",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/expense-categories');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"id": 3,
"code": "software",
"name": "תוכנה, מנויים ואחסון",
"vat_pct": 100,
"expense_pct": 100,
"is_asset": false,
"needs_car_number": false
}
]
}
תשלומים Payments
POST /payment-requests
בקשת תשלום (קישור) Create payment request payments:write v1.0
יוצר קישור תשלום מאובטח (UPAY). כשהלקוח משלם - הקבלה מופקת אוטומטית והאירוע payment.succeeded נשלח. send:true שולח את הקישור ללקוח.
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
description חובה | string | תיאור |
amount | number | סכום (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
max_installments | integer | תשלומים |
document_type | integer | סוג המסמך שיופק 320 | 400 |
customer_id | integer | מזהה לקוח |
customer | object | |
customer.name | string | שם הלקוח |
customer.tax_id | string | ת.ז / ח.פ / מספר עוסק (9 ספרות) |
customer.email | string (email) | מייל |
customer.phone | string | טלפון |
customer.address | string | כתובת |
customer.city | string | עיר |
customer.private | boolean | לקוח פרטי (לא עוסק) - בחשבונית מס בלי מספר עוסק |
customer.external_id | string | המזהה שלכם ללקוח. אם נשלח - הלקוח יימצא או ייווצר (find-or-create) |
send | boolean | לשלוח את הקישור ללקוח (מייל / וואטסאפ) |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/payment-requests' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"description":"ייעוץ","amount":250,"customer":{"name":"דנה","email":"dana@example.co.il"},"send":true}'const res = await fetch("https://freepay.clickdrop.online/api/v1/payment-requests", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"description": "ייעוץ",
"amount": 250,
"customer": {
"name": "דנה",
"email": "dana@example.co.il"
},
"send": true
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/payment-requests",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"description": "ייעוץ",
"amount": 250,
"customer": {
"name": "דנה",
"email": "dana@example.co.il"
},
"send": True
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/payment-requests');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"description":"ייעוץ","amount":250,"customer":{"name":"דנה","email":"dana@example.co.il"},"send":true}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "payment_request",
"id": "Xk2…",
"status": "pending",
"amount": 250,
"amount_agorot": 25000,
"description": "ייעוץ",
"pay_url": "https://freepay.clickdrop.online/pay/Xk2…",
"customer": {
"name": "דנה",
"email": "dana@example.co.il",
"phone": null,
"tax_id": null
},
"max_installments": 1,
"document_type": 320,
"document_id": null,
"created_at": "2026-10-20 09:00:00",
"paid_at": null,
"error": null
}
GET /payment-requests
רשימת בקשות תשלום List payment requests payments:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
status | query | string | סטטוס pending | paid | failed | cancelled |
from | query | date | מתאריך (כולל), YYYY-MM-DD |
to | query | date | עד תאריך (כולל), YYYY-MM-DD |
limit | query | integer | מספר תוצאות (ברירת מחדל 50, עד 100) |
starting_after | query | integer | סמן עימוד: next_cursor מהתשובה הקודמת |
order | query | string | סדר לפי מזהה (ברירת מחדל asc) asc | desc |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/payment-requests' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/payment-requests", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/payment-requests",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/payment-requests');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "payment_request",
"id": "Xk2…",
"status": "pending",
"amount": 250,
"amount_agorot": 25000,
"description": "ייעוץ",
"pay_url": "https://freepay.clickdrop.online/pay/Xk2…",
"customer": {
"name": "דנה",
"email": "dana@example.co.il",
"phone": null,
"tax_id": null
},
"max_installments": 1,
"document_type": 320,
"document_id": null,
"created_at": "2026-10-20 09:00:00",
"paid_at": null,
"error": null
}
],
"has_more": false,
"next_cursor": null
}
GET /payment-requests/{id}
בקשת תשלום Get payment request payments:read v1.0
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | string | מזהה ציבורי של הבקשה |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/payment-requests/Xk2abc' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/payment-requests/Xk2abc", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/payment-requests/Xk2abc",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/payment-requests/Xk2abc');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "payment_request",
"id": "Xk2…",
"status": "pending",
"amount": 250,
"amount_agorot": 25000,
"description": "ייעוץ",
"pay_url": "https://freepay.clickdrop.online/pay/Xk2…",
"customer": {
"name": "דנה",
"email": "dana@example.co.il",
"phone": null,
"tax_id": null
},
"max_installments": 1,
"document_type": 320,
"document_id": null,
"created_at": "2026-10-20 09:00:00",
"paid_at": null,
"error": null
}
POST /payment-requests/{id}/cancel
ביטול בקשת תשלום Cancel payment request payments:write v1.1
רק בקשה ממתינה. הקישור מפסיק לעבוד.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | string | מזהה ציבורי |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/payment-requests/Xk2abc/cancel' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123"const res = await fetch("https://freepay.clickdrop.online/api/v1/payment-requests/Xk2abc/cancel", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Idempotency-Key": "unique-request-id-123" },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/payment-requests/Xk2abc/cancel",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/payment-requests/Xk2abc/cancel');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Idempotency-Key: unique-request-id-123"],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "payment_request",
"id": "Xk2…",
"status": "cancelled",
"amount": 250,
"amount_agorot": 25000,
"description": "ייעוץ",
"pay_url": "https://freepay.clickdrop.online/pay/Xk2…",
"customer": {
"name": "דנה",
"email": "dana@example.co.il",
"phone": null,
"tax_id": null
},
"max_installments": 1,
"document_type": 320,
"document_id": null,
"created_at": "2026-10-20 09:00:00",
"paid_at": null,
"error": null
}
GET /payments
תשלומים שהתקבלו List payments payments:read v1.1
תשלומים מוצלחים: בקשות תשלום ששולמו + תנועות תקבול ממקורות כסף מחוברים. ממוין מהחדש לישן.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
from | query | date | מתאריך (כולל), YYYY-MM-DD |
to | query | date | עד תאריך (כולל), YYYY-MM-DD |
limit | query | integer | מספר תוצאות (ברירת מחדל 50, עד 100) |
cursor | query | string | סמן עימוד: next_cursor מהתשובה הקודמת |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/payments' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/payments", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/payments",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/payments');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"has_more": false,
"next_cursor": null,
"data": [
{
"object": "payment",
"id": "pr_Xk2…",
"source": "payment_request",
"date": "2026-10-20T10:00:00Z",
"amount": 250,
"amount_agorot": 25000,
"currency": "ILS",
"description": "ייעוץ",
"payer_name": "דנה",
"document_id": 16
}
]
}
מנויים ומוצרים Subscriptions & products
POST /products
יצירת מוצר Create product payments:write v1.1
מוצר עם דף תשלום קבוע (checkout_url). המחיר נקבע כאן בלבד.
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
name חובה | string | שם |
description | string | תיאור |
price | number | מחיר (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
max_installments | integer | תשלומים |
document_type | integer | סוג מסמך 320 | 400 |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/products' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"name":"סדנה","price":350,"max_installments":3}'const res = await fetch("https://freepay.clickdrop.online/api/v1/products", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"name": "סדנה",
"price": 350,
"max_installments": 3
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/products",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"name": "סדנה",
"price": 350,
"max_installments": 3
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/products');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"name":"סדנה","price":350,"max_installments":3}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "product",
"id": 2,
"slug": "aB3dE9",
"name": "סדנה",
"description": null,
"price": 350,
"price_agorot": 35000,
"currency": "ILS",
"max_installments": 3,
"document_type": 320,
"active": true,
"checkout_url": "https://freepay.clickdrop.online/p/aB3dE9"
}
GET /products
רשימת מוצרים List products payments:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
include_inactive | query | boolean | כולל מושבתים |
limit | query | integer | מספר תוצאות (ברירת מחדל 100, עד 100) |
starting_after | query | integer | סמן עימוד: next_cursor מהתשובה הקודמת |
order | query | string | סדר לפי מזהה (ברירת מחדל asc) asc | desc |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/products' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/products", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/products",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/products');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "product",
"id": 2,
"slug": "aB3dE9",
"name": "סדנה",
"price": 350,
"active": true
}
],
"has_more": false,
"next_cursor": null
}
POST /subscriptions
יצירת חיוב חוזר Create subscription payments:write v1.1
בכל מחזור נוצר קישור תשלום ונשלח ללקוח; כשהוא משולם מופקת קבלה והאירוע subscription.charged נשלח. אין שמירת כרטיס.
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
customer_id | integer | מזהה לקוח |
customer | object | |
customer.name | string | שם הלקוח |
customer.tax_id | string | ת.ז / ח.פ / מספר עוסק (9 ספרות) |
customer.email | string (email) | מייל |
customer.phone | string | טלפון |
customer.address | string | כתובת |
customer.city | string | עיר |
customer.private | boolean | לקוח פרטי (לא עוסק) - בחשבונית מס בלי מספר עוסק |
customer.external_id | string | המזהה שלכם ללקוח. אם נשלח - הלקוח יימצא או ייווצר (find-or-create) |
description חובה | string | תיאור |
amount | number | סכום למחזור (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
document_type | integer | סוג מסמך 320 | 400 |
interval_months | integer | כל כמה חודשים |
day_of_month | integer | יום בחודש |
start_date | string (date) | חיוב ראשון |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/subscriptions' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"customer_id":42,"description":"ריטיינר חודשי","amount":1500,"day_of_month":1,"start_date":"2026-11-01"}'const res = await fetch("https://freepay.clickdrop.online/api/v1/subscriptions", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"customer_id": 42,
"description": "ריטיינר חודשי",
"amount": 1500,
"day_of_month": 1,
"start_date": "2026-11-01"
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/subscriptions",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"customer_id": 42,
"description": "ריטיינר חודשי",
"amount": 1500,
"day_of_month": 1,
"start_date": "2026-11-01"
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/subscriptions');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"customer_id":42,"description":"ריטיינר חודשי","amount":1500,"day_of_month":1,"start_date":"2026-11-01"}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "subscription",
"id": 4,
"status": "active",
"description": "ריטיינר חודשי",
"amount": 1500,
"amount_agorot": 150000,
"document_type": 320,
"interval_months": 1,
"day_of_month": 1,
"next_charge_date": "2026-11-01",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"email": "billing@example.co.il",
"phone": null
},
"created_at": "2026-10-01 10:00:00"
}
GET /subscriptions
רשימת מנויים List subscriptions payments:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
status | query | string | סטטוס active | paused | cancelled |
customer_id | query | integer | לקוח |
limit | query | integer | מספר תוצאות (ברירת מחדל 50, עד 100) |
starting_after | query | integer | סמן עימוד: next_cursor מהתשובה הקודמת |
order | query | string | סדר לפי מזהה (ברירת מחדל asc) asc | desc |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/subscriptions' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/subscriptions", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/subscriptions",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/subscriptions');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "subscription",
"id": 4,
"status": "active",
"description": "ריטיינר חודשי",
"amount": 1500,
"amount_agorot": 150000,
"document_type": 320,
"interval_months": 1,
"day_of_month": 1,
"next_charge_date": "2026-11-01",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"email": "billing@example.co.il",
"phone": null
},
"created_at": "2026-10-01 10:00:00"
}
],
"has_more": false,
"next_cursor": null
}
GET /subscriptions/{id}
מנוי Get subscription payments:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה מנוי |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/subscriptions/12' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/subscriptions/12", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/subscriptions/12",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/subscriptions/12');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "subscription",
"id": 4,
"status": "active",
"description": "ריטיינר חודשי",
"amount": 1500,
"amount_agorot": 150000,
"document_type": 320,
"interval_months": 1,
"day_of_month": 1,
"next_charge_date": "2026-11-01",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"email": "billing@example.co.il",
"phone": null
},
"created_at": "2026-10-01 10:00:00"
}
PATCH /subscriptions/{id}
עדכון מנוי Update subscription payments:write v1.1
סכום, תיאור, מועד החיוב הבא, או השהיה (status: paused) והפעלה מחדש (active).
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה מנוי |
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
amount | number | סכום (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
description | string | תיאור |
next_charge_date | string (date) | מועד החיוב הבא |
day_of_month | integer | יום בחודש |
interval_months | integer | מחזור בחודשים |
status | string | סטטוס active | paused |
דוגמה
curl -X PATCH 'https://freepay.clickdrop.online/api/v1/subscriptions/12' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"paused"}'const res = await fetch("https://freepay.clickdrop.online/api/v1/subscriptions/12", {
method: "PATCH",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"status": "paused"
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.patch(
"https://freepay.clickdrop.online/api/v1/subscriptions/12",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
json={
"status": "paused"
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/subscriptions/12');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => '{"status":"paused"}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "subscription",
"id": 4,
"status": "paused",
"description": "ריטיינר חודשי",
"amount": 1500,
"amount_agorot": 150000,
"document_type": 320,
"interval_months": 1,
"day_of_month": 1,
"next_charge_date": "2026-11-01",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"email": "billing@example.co.il",
"phone": null
},
"created_at": "2026-10-01 10:00:00"
}
POST /subscriptions/{id}/cancel
ביטול מנוי Cancel subscription payments:write v1.1
סופי. הלקוח מקבל אישור ביטול בכתב.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה מנוי |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/subscriptions/12/cancel' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123"const res = await fetch("https://freepay.clickdrop.online/api/v1/subscriptions/12/cancel", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Idempotency-Key": "unique-request-id-123" },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/subscriptions/12/cancel",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/subscriptions/12/cancel');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Idempotency-Key: unique-request-id-123"],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "subscription",
"id": 4,
"status": "cancelled",
"description": "ריטיינר חודשי",
"amount": 1500,
"amount_agorot": 150000,
"document_type": 320,
"interval_months": 1,
"day_of_month": 1,
"next_charge_date": "2026-11-01",
"customer": {
"id": 42,
"name": "לקוח לדוגמה בע\"מ",
"email": "billing@example.co.il",
"phone": null
},
"created_at": "2026-10-01 10:00:00"
}
הנהלת חשבונות Books
GET /books/accounts
מפתח חשבונות Chart of accounts books:read v1.1
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/books/accounts' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/books/accounts", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/books/accounts",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/books/accounts');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "account",
"id": 10,
"code": "6000",
"name": "הוצאות",
"type": "expense",
"subtype": "category",
"system_key": null,
"active": true
}
]
}
POST /books/journal-entries
פקודת יומן ידנית Create journal entry books:write v1.1
פקודה מרובת שורות. חובה = זכות, לפחות 2 שורות, תקופה לא נעולה. חשבון: account_id או account_code.
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
date חובה | string (date) | תאריך |
ref | string | אסמכתא |
description | string | תיאור |
lines חובה | array<object> | שורות |
lines[].account_id | integer | חשבון |
lines[].account_code | string | קוד חשבון |
lines[].debit | number | חובה (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
lines[].credit | number | זכות (₪, עד 2 ספרות). אפשר במקום זאת <name>_agorot (מספר שלם) |
lines[].customer_id | integer | לקוח |
lines[].note | string | הערה |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/books/journal-entries' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"date":"2026-10-31","ref":"JV-1","description":"הפרשה","lines":[{"account_code":"6000","debit":1000},{"account_code":"2100","credit":1000}]}'const res = await fetch("https://freepay.clickdrop.online/api/v1/books/journal-entries", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"date": "2026-10-31",
"ref": "JV-1",
"description": "הפרשה",
"lines": [
{
"account_code": "6000",
"debit": 1000
},
{
"account_code": "2100",
"credit": 1000
}
]
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/books/journal-entries",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"date": "2026-10-31",
"ref": "JV-1",
"description": "הפרשה",
"lines": [
{
"account_code": "6000",
"debit": 1000
},
{
"account_code": "2100",
"credit": 1000
}
]
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/books/journal-entries');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"date":"2026-10-31","ref":"JV-1","description":"הפרשה","lines":[{"account_code":"6000","debit":1000},{"account_code":"2100","credit":1000}]}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "journal_entry",
"id": 88,
"date": "2026-10-31",
"source": "manual",
"ref": "JV-1",
"description": "הפרשה",
"total": 1000,
"total_agorot": 100000,
"lines": [
{
"account_id": 10,
"account_code": "6000",
"account_name": "הוצאות",
"debit": 1000,
"credit": 0
},
{
"account_id": 3,
"account_code": "2100",
"account_name": "זכאים",
"debit": 0,
"credit": 1000
}
]
}
POST /books/journal-entries/batch
פקודות יומן במנה Batch journal entries books:write v1.1
עד 100 פקודות. כל הפקודות נבדקות לפני הרישום - אם אחת לא תקינה, אף אחת לא נרשמת (השגיאה מציינת את האינדקס).
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
entries חובה | array<object> | פקודות |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/books/journal-entries/batch' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"entries":[{"date":"2026-10-31","lines":[{"account_code":"6000","debit":100},{"account_code":"2100","credit":100}]}]}'const res = await fetch("https://freepay.clickdrop.online/api/v1/books/journal-entries/batch", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"entries": [
{
"date": "2026-10-31",
"lines": [
{
"account_code": "6000",
"debit": 100
},
{
"account_code": "2100",
"credit": 100
}
]
}
]
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/books/journal-entries/batch",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"entries": [
{
"date": "2026-10-31",
"lines": [
{
"account_code": "6000",
"debit": 100
},
{
"account_code": "2100",
"credit": 100
}
]
}
]
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/books/journal-entries/batch');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"entries":[{"date":"2026-10-31","lines":[{"account_code":"6000","debit":100},{"account_code":"2100","credit":100}]}]}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "list",
"data": [
{
"object": "journal_entry",
"id": 88,
"date": "2026-10-31",
"source": "manual",
"ref": "JV-1",
"description": "הפרשה",
"total": 1000,
"total_agorot": 100000,
"lines": [
{
"account_id": 10,
"account_code": "6000",
"account_name": "הוצאות",
"debit": 1000,
"credit": 0
},
{
"account_id": 3,
"account_code": "2100",
"account_name": "זכאים",
"debit": 0,
"credit": 1000
}
]
}
],
"count": 1
}
GET /books/journal-entries
פקודות יומן List journal entries books:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
source | query | string | מקור document | expense | money | manual | opening |
account_id | query | integer | חשבון |
from | query | date | מתאריך (כולל), YYYY-MM-DD |
to | query | date | עד תאריך (כולל), YYYY-MM-DD |
q | query | string | חיפוש חופשי |
limit | query | integer | מספר תוצאות (ברירת מחדל 50, עד 100) |
cursor | query | string | סמן עימוד: next_cursor מהתשובה הקודמת |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/books/journal-entries' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/books/journal-entries", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/books/journal-entries",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/books/journal-entries');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "journal_entry",
"id": 88,
"date": "2026-10-31",
"source": "manual",
"ref": "JV-1",
"description": "הפרשה",
"total": 1000,
"total_agorot": 100000,
"lines": [
{
"account_id": 10,
"account_code": "6000",
"account_name": "הוצאות",
"debit": 1000,
"credit": 0
},
{
"account_id": 3,
"account_code": "2100",
"account_name": "זכאים",
"debit": 0,
"credit": 1000
}
]
}
],
"has_more": false,
"next_cursor": null
}
GET /books/journal-entries/{id}
פקודת יומן Get journal entry books:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה פקודה |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/books/journal-entries/12' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/books/journal-entries/12", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/books/journal-entries/12",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/books/journal-entries/12');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "journal_entry",
"id": 88,
"date": "2026-10-31",
"source": "manual",
"ref": "JV-1",
"description": "הפרשה",
"total": 1000,
"total_agorot": 100000,
"lines": [
{
"account_id": 10,
"account_code": "6000",
"account_name": "הוצאות",
"debit": 1000,
"credit": 0
},
{
"account_id": 3,
"account_code": "2100",
"account_name": "זכאים",
"debit": 0,
"credit": 1000
}
]
}
GET /books/reports/pnl
רווח והפסד Profit & loss books:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
from חובה | query | date | מתאריך (כולל), YYYY-MM-DD |
to חובה | query | date | עד תאריך (כולל), YYYY-MM-DD |
compare_from | query | date | תקופת השוואה - מ |
compare_to | query | date | תקופת השוואה - עד |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/books/reports/pnl?from=2026-01-01&to=2026-12-31' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/books/reports/pnl?from=2026-01-01&to=2026-12-31", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/books/reports/pnl?from=2026-01-01&to=2026-12-31",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/books/reports/pnl?from=2026-01-01&to=2026-12-31');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "pnl_report",
"from": "2026-01-01",
"to": "2026-12-31",
"income": {
"total": 120000,
"rows": []
},
"expense": {
"total": 40000,
"rows": []
},
"profit": 80000
}
GET /books/reports/trial-balance
מאזן בוחן Trial balance books:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
date | query | date | נכון לתאריך (כולל) |
from | query | date | מתאריך (כולל), YYYY-MM-DD |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/books/reports/trial-balance' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/books/reports/trial-balance", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/books/reports/trial-balance",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/books/reports/trial-balance');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "trial_balance",
"date": "2026-10-31",
"balanced": true,
"totals": {
"debit": 1000,
"credit": 1000
},
"rows": []
}
GET /books/reports/ledger
כרטסת Account ledger books:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
account_id חובה | query | integer | חשבון |
party_key | query | string | לקוח / ספק (מפתח צד) |
from | query | date | מתאריך (כולל), YYYY-MM-DD |
to | query | date | עד תאריך (כולל), YYYY-MM-DD |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/books/reports/ledger?account_id=10&from=2026-01-01' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/books/reports/ledger?account_id=10&from=2026-01-01", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/books/reports/ledger?account_id=10&from=2026-01-01",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/books/reports/ledger?account_id=10&from=2026-01-01');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "ledger_report",
"account": {
"id": 10,
"code": "6000",
"name": "הוצאות"
},
"opening": 0,
"closing": 1000,
"rows": []
}
מקורות כסף Money sources
GET /money/sources
מקורות כסף Money sources money:read v1.1
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/money/sources' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/money/sources", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/money/sources",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/money/sources');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "money_source",
"id": 1,
"provider": "csv",
"name": "בנק",
"status": "active",
"last_sync_at": "2026-10-20T10:00:00Z"
}
],
"import_presets": [
"payoneer"
]
}
GET /money/transactions
תנועות List transactions money:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
source_id | query | integer | מקור |
kind | query | string | סוג payment | refund | fee | payout | other |
status | query | string | needs = תקבול בלי מסמך, has = מקושר למסמך needs | has | ignored |
from | query | date | מתאריך (כולל), YYYY-MM-DD |
to | query | date | עד תאריך (כולל), YYYY-MM-DD |
q | query | string | חיפוש חופשי |
limit | query | integer | מספר תוצאות (ברירת מחדל 50, עד 100) |
cursor | query | string | סמן עימוד: next_cursor מהתשובה הקודמת |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/money/transactions' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/money/transactions", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/money/transactions",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/money/transactions');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"has_more": false,
"next_cursor": null,
"data": [
{
"object": "money_transaction",
"id": 77,
"source_id": 1,
"kind": "payment",
"occurred_at": "2026-10-20T10:00:00Z",
"amount": 100,
"currency": "USD",
"amount_ils": 371.2,
"document_id": null
}
]
}
POST /money/import
יבוא קובץ תנועות Import CSV money:write v1.1
קובץ CSV ב-base64 (עד ~700KB). הפורמט מזוהה אוטומטית, או preset. תנועות כפולות מדולגות.
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
content_base64 | string | תוכן הקובץ ב-base64 |
file | object | |
file.name | string | שם קובץ |
file.content_base64 | string | base64 |
preset | string | פורמט ידוע |
source_id | integer | מקור קיים |
source_name | string | שם למקור חדש |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/money/import' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"content_base64":"RGF0ZSxEZXNjcmlwdGlvbiwuLi4=","source_name":"Payoneer"}'const res = await fetch("https://freepay.clickdrop.online/api/v1/money/import", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"content_base64": "RGF0ZSxEZXNjcmlwdGlvbiwuLi4=",
"source_name": "Payoneer"
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/money/import",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"content_base64": "RGF0ZSxEZXNjcmlwdGlvbiwuLi4=",
"source_name": "Payoneer"
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/money/import');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"content_base64":"RGF0ZSxEZXNjcmlwdGlvbiwuLi4=","source_name":"Payoneer"}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "money_import",
"source": {
"id": 1,
"name": "Payoneer",
"provider": "payoneer_csv"
},
"format": "payoneer",
"rows": 3,
"inserted": 3,
"duplicates": 0,
"warnings": []
}
רשימת תפוצה Mailing list
GET /mailing-list/subscribers
רשימת התפוצה List subscribers mailing_list:read v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
status | query | string | מצב subscribed | unsubscribed |
limit | query | integer | מספר תוצאות (ברירת מחדל 100, עד 100) |
starting_after | query | integer | סמן עימוד: next_cursor מהתשובה הקודמת |
order | query | string | סדר לפי מזהה (ברירת מחדל asc) asc | desc |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/mailing-list/subscribers' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/mailing-list/subscribers", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/mailing-list/subscribers",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/mailing-list/subscribers');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "subscriber",
"email": "dana@example.co.il",
"subscribed": true,
"consent_at": "2026-10-20 09:00:00",
"source": "api:site-footer",
"revoked_at": null
}
],
"has_more": false,
"next_cursor": null
}
POST /mailing-list/subscribers
רישום הסכמה לדיוור Record marketing consent mailing_list:write v1.1
רושם הסכמה מפורשת לקבלת דבר פרסומת מהעסק (חוק התקשורת, סעיף 30א) עם מקור וזמן. שלחו רק אחרי שהלקוח סימן בעצמו הסכמה.
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
email חובה | string (email) | מייל |
source | string | מקור ההסכמה (טופס / עמוד) |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/mailing-list/subscribers' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"email":"dana@example.co.il","source":"site-footer"}'const res = await fetch("https://freepay.clickdrop.online/api/v1/mailing-list/subscribers", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"email": "dana@example.co.il",
"source": "site-footer"
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/mailing-list/subscribers",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"email": "dana@example.co.il",
"source": "site-footer"
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/mailing-list/subscribers');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"email":"dana@example.co.il","source":"site-footer"}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "subscriber",
"email": "dana@example.co.il",
"subscribed": true,
"consent_at": "2026-10-20 09:00:00",
"source": "api:site-footer",
"revoked_at": null
}
DELETE /mailing-list/subscribers/{email}
הסרה מרשימת התפוצה Unsubscribe mailing_list:write v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
email חובה | path | string | מייל (מקודד ב-URL) |
דוגמה
curl -X DELETE 'https://freepay.clickdrop.online/api/v1/mailing-list/subscribers/dana%40example.co.il' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/mailing-list/subscribers/dana%40example.co.il", {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.delete(
"https://freepay.clickdrop.online/api/v1/mailing-list/subscribers/dana%40example.co.il",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/mailing-list/subscribers/dana%40example.co.il');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "subscriber",
"email": "dana@example.co.il",
"subscribed": false,
"revoked_at": "2026-10-21 09:00:00"
}
Webhooks ואירועים Webhooks & events
GET /webhooks
רשימת webhooks List webhooks webhooks:read v1.1
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/webhooks' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/webhooks", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/webhooks",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/webhooks');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "webhook",
"id": 3,
"url": "https://example.co.il/hooks/freepay",
"events": [
"document.issued",
"payment.succeeded"
],
"active": true,
"created_at": "2026-10-20 09:00:00"
}
],
"has_more": false,
"next_cursor": null
}
POST /webhooks
רישום webhook Create webhook webhooks:write v1.1
REST hook (מתאים ל-Make / Zapier / n8n). מחזיר secret לחתימה - מוצג פעם אחת בלבד. events ריק = כל האירועים.
גוף הבקשה (JSON)
| שדה | סוג | תיאור |
|---|---|---|
url חובה | string | כתובת https |
events | array<string> | אירועים |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/webhooks' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.co.il/hooks/freepay","events":["document.issued","payment.succeeded"]}'const res = await fetch("https://freepay.clickdrop.online/api/v1/webhooks", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "unique-request-id-123" },
body: JSON.stringify({
"url": "https://example.co.il/hooks/freepay",
"events": [
"document.issued",
"payment.succeeded"
]
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/webhooks",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
json={
"url": "https://example.co.il/hooks/freepay",
"events": [
"document.issued",
"payment.succeeded"
]
},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/webhooks');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Content-Type: application/json", "Idempotency-Key: unique-request-id-123"],
CURLOPT_POSTFIELDS => '{"url":"https://example.co.il/hooks/freepay","events":["document.issued","payment.succeeded"]}',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 201
{
"object": "webhook",
"id": 3,
"url": "https://example.co.il/hooks/freepay",
"events": [
"document.issued",
"payment.succeeded"
],
"active": true,
"created_at": "2026-10-20 09:00:00",
"secret": "whsec_…"
}
DELETE /webhooks/{id}
מחיקת webhook Delete webhook webhooks:write v1.1
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה webhook |
דוגמה
curl -X DELETE 'https://freepay.clickdrop.online/api/v1/webhooks/12' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/webhooks/12", {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.delete(
"https://freepay.clickdrop.online/api/v1/webhooks/12",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/webhooks/12');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "webhook",
"id": 3,
"deleted": true
}
POST /webhooks/{id}/test
אירוע בדיקה Send test event webhooks:write v1.1
שולח אירוע ping חתום ומחזיר אם נמסר (2xx) תוך 10 שניות.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
id חובה | path | integer | מזהה webhook |
דוגמה
curl -X POST 'https://freepay.clickdrop.online/api/v1/webhooks/12/test' \
-H "Authorization: Bearer $FREEPAY_API_KEY" \
-H "Idempotency-Key: unique-request-id-123"const res = await fetch("https://freepay.clickdrop.online/api/v1/webhooks/12/test", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}`, "Idempotency-Key": "unique-request-id-123" },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.post(
"https://freepay.clickdrop.online/api/v1/webhooks/12/test",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}", "Idempotency-Key": "unique-request-id-123"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/webhooks/12/test');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY"), "Idempotency-Key: unique-request-id-123"],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "webhook_test",
"id": 3,
"delivered": true,
"response_code": 200
}
GET /events
יומן אירועים List events webhooks:read v1.1
אירועים מ-30 הימים האחרונים (גם כשאין webhook רשום) - לגיבוי במקרה של משלוח שנכשל.
פרמטרים
| שם | איפה | סוג | תיאור |
|---|---|---|---|
type | query | string | סוג אירוע |
limit | query | integer | מספר תוצאות (ברירת מחדל 50, עד 100) |
starting_after | query | integer | סמן עימוד: next_cursor מהתשובה הקודמת |
order | query | string | סדר לפי מזהה (ברירת מחדל asc) asc | desc |
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/events' \
-H "Authorization: Bearer $FREEPAY_API_KEY"const res = await fetch("https://freepay.clickdrop.online/api/v1/events", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.FREEPAY_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/events",
headers={"Authorization": f"Bearer {os.environ['FREEPAY_API_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/events');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("FREEPAY_API_KEY")],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"object": "list",
"data": [
{
"object": "event",
"id": "evt_…",
"type": "document.issued",
"created_at": "2026-10-20T09:12:00Z",
"data": {
"id": 12,
"number": 1005,
"total": 5900
}
}
],
"has_more": false,
"next_cursor": null
}
מסמכי API API documents
GET /openapi.json
מסמך OpenAPI 3.1 OpenAPI document ציבורי v1.1
ציבורי, בלי מפתח.
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/openapi.json'const res = await fetch("https://freepay.clickdrop.online/api/v1/openapi.json", {
method: "GET",
headers: { },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/openapi.json",
headers={},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/openapi.json');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"openapi": "3.1.0"
}
GET /postman.json
אוסף Postman Postman collection ציבורי v1.1
ציבורי, בלי מפתח.
דוגמה
curl 'https://freepay.clickdrop.online/api/v1/postman.json'const res = await fetch("https://freepay.clickdrop.online/api/v1/postman.json", {
method: "GET",
headers: { },
});
if (!res.ok) throw new Error((await res.json()).error);
const data = await res.json();
console.log(res.headers.get("x-request-id"));import os, requests
r = requests.get(
"https://freepay.clickdrop.online/api/v1/postman.json",
headers={},
timeout=30,
)
r.raise_for_status()
print(r.json())<?php
$ch = curl_init('https://freepay.clickdrop.online/api/v1/postman.json');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$data = json_decode($response, true);תשובה 200
{
"info": {
"name": "FREEPAY API v1"
}
}
שינויים Changelog
v1.1.0 2026-10-25
- נקודות קצה חדשות: לקוחות (find-or-create, הערות, יתרה), הצעות מחיר, פריטים, הוצאות, מוצרים ומנויים, הנהלת חשבונות, מקורות כסף, רשימת תפוצה, webhooks ואירועים.
- הרשאות מפורטות (documents:read וכו') לצד read / write הוותיקים.
- X-Request-Id בכל תשובה; מגבלת קצב למפתח עם כותרות X-RateLimit-*.
- מבנה שגיאה אחיד: error_code ו-details (השדה error נשאר מחרוזת).
- עימוד סמן אחיד: limit, starting_after, has_more, next_cursor.
- סכומים גם באגורות (*_agorot). pdf_url הוא קישור חתום לזמן קצר.
- OpenAPI 3.1, אוסף Postman, פורטל מפתחים וקונסולת ניסוי.
v1.0.0 2026-01-01
- גרסה ראשונה: עסק, מסמכים (הפקה, רשימה, PDF, ביטול), לקוחות, בקשות תשלום.
גרסה 1.1 תואמת לאחור במלואה ל-1.0: שדות קיימים לא הוסרו ולא שינו משמעות; נוספו שדות ונקודות קצה. שינוי שובר יגיע רק כ-/api/v2.