> For the complete documentation index, see [llms.txt](https://invoice4u.gitbook.io/invoice4u-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://invoice4u.gitbook.io/invoice4u-docs/he/clearing-payments/clearing-logs.md).

# לוגים של סליקה

‫כל בקשת סליקה ותשובה נרשמות כשורת `ClearingLog`. השתמשו במתודות האלה לשאילתת היסטוריית חיובים ולהתאמת עסקאות.‬

## ‫אובייקט ה-ClearingLog‬

| ‫שדה‬                                         | ‫טיפוס‬       | ‫תיאור‬                                                                                                               |
| --------------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------- |
| `Id`                                          | int           | ‫מזהה שורת הלוג.‬                                                                                                     |
| `Date`                                        | datetime      | ‫חותמת זמן.‬                                                                                                          |
| `LogType`                                     | int           | ‫`1` בקשה, `2` תשובה.‬                                                                                                |
| `ClientName`                                  | string        | ‫שם הלקוח.‬                                                                                                           |
| `Amount`                                      | double        | ‫הסכום שחויב.‬                                                                                                        |
| `Currency`                                    | int           | ‫`1` שקל, `2` דולר, `3` אירו.‬                                                                                        |
| `PaymentNumber`                               | int           | ‫מספר תשלומים.‬                                                                                                       |
| `CreditNumber`                                | string        | ‫4 ספרות אחרונות של הכרטיס.‬                                                                                          |
| `ClearingCompany` / `ClearingCompanyName`     | int / string  | ‫ספק הסליקה.‬                                                                                                         |
| `IsSuccess`                                   | boolean       | ‫תוצאת החיוב.‬                                                                                                        |
| `ErrorMessage`                                | string        | ‫טקסט השגיאה מהספק בכישלון.‬                                                                                          |
| `ClearingConfirmationNumber`                  | string        | ‫מספר אישור/אסמכתא מהספק.‬                                                                                            |
| `ClearingTraceId`                             | string        | ‫מזהה מעקב המקשר בקשה↔תשובה.‬                                                                                         |
| `PaymentId`                                   | string        | ‫אסמכתת התשלום אצל הספק — לשימוש ב[זיכויים](/invoice4u-docs/he/clearing-payments/process-api-request-v2.md#refunds).‬ |
| `IsCredit`                                    | boolean       | ‫`true` עבור שורות זיכוי.‬                                                                                            |
| `CreditedTransaction` / `CreditAmount`        | bool / double | ‫האם/בכמה חיוב זה זוכה מאוחר יותר.‬                                                                                   |
| `IsToken`                                     | boolean       | ‫חיוב מבוסס טוקן.‬                                                                                                    |
| `IsBitPayment` / `IsGooglePay` / `IsApplePay` | boolean       | ‫דגלי אמצעי תשלום חלופיים.‬                                                                                           |
| `IsDocumentCreated` / `DocId`                 | bool / GUID   | ‫הפניה למסמך שנוצר אוטומטית.‬                                                                                         |
| `TransactionType`                             | int           | ‫סוג מאוחד: 1 חיוב, 2 זיכוי/החזר, 3 תשלומים, 4 תשלומים עם עמלה, 5 יצירת טוקן, 6 טוקן+חיוב, 7 חיוב בטוקן.‬             |

## ‫שליפה לפי מזהה — `GetClearingLogById`‬

|             |                       |
| ----------- | --------------------- |
| ‫**מתודה**‬ | `POST`                |
| ‫**נתיב**‬  | `/GetClearingLogById` |

```json
{ "clearingLogId": 123456, "token": "<token>" }
```

‫מחזיר את ה-`ClearingLog`. לוגים השייכים לארגון אחר מחזירים `ApiUnauthorizedAccessForEntityNotBelongingToUser` (322).‬

## ‫חיפוש — `GetClearingLogByParams`‬

|             |                           |
| ----------- | ------------------------- |
| ‫**מתודה**‬ | `POST`                    |
| ‫**נתיב**‬  | `/GetClearingLogByParams` |

```json
{
  "searchParams": {
    "FromDate": "2026-06-01T00:00:00",
    "ToDate": "2026-06-30T23:59:59",
    "IsSuccess": true
  },
  "token": "<token>"
}
```

‫מחזיר `ClearingLog[]` התואם לפילטרים, מוגבל לארגון שלכם.‬

## ‫הוספת לוג חיצוני — `ProcessApiRequestClearingLogInsertREST_V2`‬

‫לאינטגרציות שסולקות כרטיסים מחוץ ל-Invoice4U אך רוצות שהחיוב יירשם (למשל להופעה בדוחות):‬

|             |                                              |
| ----------- | -------------------------------------------- |
| ‫**מתודה**‬ | `GET`                                        |
| ‫**נתיב**‬  | `/ProcessApiRequestClearingLogInsertREST_V2` |

‫שלחו אובייקט `ClearingLog` ‏(`clearingLog`) עם לפחות `ClientName`, `Amount`, `PaymentNumber`, `Currency`, `CreditNumber` ‏(4 אחרונות), `IsSuccess`, `ClearingConfirmationNumber`, בתוספת ה-`token` שלכם. וריאציות legacy מבוססות פרטי גישה (`ProcessApiRequestClearingLogInsertREST`) קיימות לאינטגרציות ישנות.‬

## ‫שגיאות‬

| ‫שגיאה (ID)‬                                             | ‫משמעות‬                    |
| -------------------------------------------------------- | --------------------------- |
| `UnauthorizedUser` (80)                                  | ‫טוקן/פרטי גישה לא תקינים.‬ |
| `ApiUnauthorizedAccessForEntityNotBelongingToUser` (322) | ‫הלוג שייך לארגון אחר.‬     |
| `ClearingCompanyUndefined` (8)                           | ‫לא מוגדר חשבון סליקה.‬     |

## ‫נסו את זה‬

## POST /GetClearingLogById

> Get a clearing log row

```json
{"openapi":"3.0.3","info":{"title":"Invoice4U API","version":"1.0.0"},"tags":[{"name":"Clearing","description":"Credit-card charges, tokens, standing orders and clearing logs."}],"servers":[{"url":"https://api.invoice4u.co.il/Services/ApiService.svc","description":"Production"},{"url":"https://apiqa.invoice4u.co.il/Services/ApiService.svc","description":"QA (staging)"}],"paths":{"/GetClearingLogById":{"post":{"tags":["Clearing"],"operationId":"GetClearingLogById","summary":"Get a clearing log row","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["clearingLogId","token"],"properties":{"clearingLogId":{"type":"integer"},"token":{"type":"string"}}}}}},"responses":{"200":{"description":"The clearing log.","content":{"application/json":{"schema":{"type":"object","properties":{"GetClearingLogByIdResult":{"$ref":"#/components/schemas/ClearingLog"}}}}}}}}}},"components":{"schemas":{"ClearingLog":{"allOf":[{"$ref":"#/components/schemas/CommonObject"},{"type":"object","properties":{"Id":{"type":"integer"},"Date":{"type":"string","format":"date-time"},"LogType":{"type":"integer","nullable":true,"description":"1 Request, 2 Response."},"ClientName":{"type":"string","nullable":true},"Amount":{"type":"number","format":"double"},"PaymentNumber":{"type":"integer","description":"Installments."},"Currency":{"type":"integer","description":"1 NIS, 2 USD, 3 EUR."},"CreditNumber":{"type":"string","nullable":true,"description":"Last 4 card digits."},"ClearingCompany":{"type":"integer","description":"ClearingCompanies enum: 6 UPay, 7 Meshulam, 12 YaadSarig, 15 Cardcom."},"ClearingCompanyName":{"type":"string","nullable":true},"IsSuccess":{"type":"boolean"},"ErrorMessage":{"type":"string","nullable":true},"ClearingConfirmationNumber":{"type":"string","nullable":true},"ClearingTraceId":{"type":"string","nullable":true},"PaymentId":{"type":"string","nullable":true,"description":"Provider payment reference — use for refunds."},"IsCredit":{"type":"boolean","description":"true for refund rows."},"CreditedTransaction":{"type":"boolean","nullable":true},"CreditAmount":{"type":"number","format":"double","nullable":true},"IsToken":{"type":"boolean","nullable":true},"IsBitPayment":{"type":"boolean","nullable":true},"IsGooglePay":{"type":"boolean","nullable":true},"IsApplePay":{"type":"boolean","nullable":true},"IsDocumentCreated":{"type":"boolean","nullable":true},"DocId":{"type":"string","format":"uuid","nullable":true},"TransactionType":{"type":"integer","nullable":true,"description":"1 Charge, 2 Credit, 3 PaymentInNumbers, 4 PaymentWithFees, 5 TokenCreation, 6 TokenAndCharge, 7 ChargeByToken."}}}]},"CommonObject":{"type":"object","description":"Response envelope inherited by most objects. Server-generated — never send these fields in requests. Always check Errors before using the payload.","properties":{"Errors":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/CommonError"}},"Info":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/CommonInfo"}},"OpenInfo":{"type":"object","readOnly":true,"additionalProperties":{"type":"string"},"nullable":true}}},"CommonError":{"type":"object","properties":{"ID":{"type":"integer","description":"Numeric error code, e.g. 80 = UnauthorizedUser, 134 = DocumentAlreadyCreated."},"Error":{"type":"string","description":"Error name."},"Paramters":{"type":"string","nullable":true,"description":"Optional context, e.g. \"Row Number - 0\"."}}},"CommonInfo":{"type":"object","properties":{"ID":{"type":"integer"},"Info":{"type":"string"},"Paramters":{"type":"string","nullable":true}}}}}}
```

## POST /GetClearingLogByParams

> Search clearing logs

```json
{"openapi":"3.0.3","info":{"title":"Invoice4U API","version":"1.0.0"},"tags":[{"name":"Clearing","description":"Credit-card charges, tokens, standing orders and clearing logs."}],"servers":[{"url":"https://api.invoice4u.co.il/Services/ApiService.svc","description":"Production"},{"url":"https://apiqa.invoice4u.co.il/Services/ApiService.svc","description":"QA (staging)"}],"paths":{"/GetClearingLogByParams":{"post":{"tags":["Clearing"],"operationId":"GetClearingLogByParams","summary":"Search clearing logs","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["searchParams","token"],"properties":{"searchParams":{"type":"object","description":"Filter object (date range, success flag, etc.).","properties":{"FromDate":{"type":"string","format":"date-time"},"ToDate":{"type":"string","format":"date-time"},"IsSuccess":{"type":"boolean"}}},"token":{"type":"string"}}}}}},"responses":{"200":{"description":"Matching clearing logs.","content":{"application/json":{"schema":{"type":"object","properties":{"GetClearingLogByParamsResult":{"type":"array","items":{"$ref":"#/components/schemas/ClearingLog"}}}}}}}}}}},"components":{"schemas":{"ClearingLog":{"allOf":[{"$ref":"#/components/schemas/CommonObject"},{"type":"object","properties":{"Id":{"type":"integer"},"Date":{"type":"string","format":"date-time"},"LogType":{"type":"integer","nullable":true,"description":"1 Request, 2 Response."},"ClientName":{"type":"string","nullable":true},"Amount":{"type":"number","format":"double"},"PaymentNumber":{"type":"integer","description":"Installments."},"Currency":{"type":"integer","description":"1 NIS, 2 USD, 3 EUR."},"CreditNumber":{"type":"string","nullable":true,"description":"Last 4 card digits."},"ClearingCompany":{"type":"integer","description":"ClearingCompanies enum: 6 UPay, 7 Meshulam, 12 YaadSarig, 15 Cardcom."},"ClearingCompanyName":{"type":"string","nullable":true},"IsSuccess":{"type":"boolean"},"ErrorMessage":{"type":"string","nullable":true},"ClearingConfirmationNumber":{"type":"string","nullable":true},"ClearingTraceId":{"type":"string","nullable":true},"PaymentId":{"type":"string","nullable":true,"description":"Provider payment reference — use for refunds."},"IsCredit":{"type":"boolean","description":"true for refund rows."},"CreditedTransaction":{"type":"boolean","nullable":true},"CreditAmount":{"type":"number","format":"double","nullable":true},"IsToken":{"type":"boolean","nullable":true},"IsBitPayment":{"type":"boolean","nullable":true},"IsGooglePay":{"type":"boolean","nullable":true},"IsApplePay":{"type":"boolean","nullable":true},"IsDocumentCreated":{"type":"boolean","nullable":true},"DocId":{"type":"string","format":"uuid","nullable":true},"TransactionType":{"type":"integer","nullable":true,"description":"1 Charge, 2 Credit, 3 PaymentInNumbers, 4 PaymentWithFees, 5 TokenCreation, 6 TokenAndCharge, 7 ChargeByToken."}}}]},"CommonObject":{"type":"object","description":"Response envelope inherited by most objects. Server-generated — never send these fields in requests. Always check Errors before using the payload.","properties":{"Errors":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/CommonError"}},"Info":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/CommonInfo"}},"OpenInfo":{"type":"object","readOnly":true,"additionalProperties":{"type":"string"},"nullable":true}}},"CommonError":{"type":"object","properties":{"ID":{"type":"integer","description":"Numeric error code, e.g. 80 = UnauthorizedUser, 134 = DocumentAlreadyCreated."},"Error":{"type":"string","description":"Error name."},"Paramters":{"type":"string","nullable":true,"description":"Optional context, e.g. \"Row Number - 0\"."}}},"CommonInfo":{"type":"object","properties":{"ID":{"type":"integer"},"Info":{"type":"string"},"Paramters":{"type":"string","nullable":true}}}}}}
```
