כל עסקה מאושרת בדף התשלום של Cardcom מפיקה אוטומטית חשבונית מס קבלה, ונשלחת ללקוח.
התקנה (5 דקות)#
- ב-SLK Invoices: חיבורים → סליקה ותשלומים → Cardcom, והעתיקו את כתובת ה-Webhook.
- הגדירו סוד (טוקן) משלכם, למשל מחרוזת אקראית ארוכה. הוא ישמש כהגנה, כי Cardcom לא חותמת על ההודעות.
- הוסיפו לסוף הכתובת
?token=ואחריו הסוד. לדוגמה:https://invoice.slk.co.il/api/billing/ecommerce/cardcom/<hookId>?token=<הסוד>. - בקריאת ה-API שיוצרת את דף התשלום (
LowProfile/Create, גרסה 11) שימו את הכתובת המלאה בשדהWebHookUrl. אם האתר שלכם עובד עם תוסף או מודול של Cardcom, בקשו מהמפתח או מהתמיכה של Cardcom להגדיר אותה שם. - הזינו ב-
ReturnValueאת מספר ההזמנה שלכם. הוא יופיע בנושא המסמך. - בחרו סוג מסמך (ברירת מחדל: חשבונית מס קבלה) ולחצו על "שליחת הזמנת בדיקה".
חשוב: החיבור עובד עם WebHookUrl של API גרסה 11 (הודעת POST עם JSON). ה-"IndicatorUrl" הישן של API 10 נשלח כבקשת GET ולא נתמך.
Developer reference#
- Endpoint:
POST /api/billing/ecommerce/cardcom/<hookId>?token=<secret>(JSON; a form body is also parsed). - Docs: Cardcom LowProfile v11 — https://cardcomapi.zendesk.com/hc/he/articles/25264402497426 , https://cardcomapi.zendesk.com/hc/he/articles/26985443818514 . The portal blocked automated fetching, so field names were verified from the official article excerpts plus two open-source integrations.
- Auth: shared token —
?token=<secret>(or thex-slk-tokenheader). Cardcom has no HMAC, so the check is token plus the strict success rules below. - Issues a document when ALL hold: top-level
ResponseCode= 0;TranzactionInfo.ResponseCodeis 0 when present;TranzactionInfo.TranzactionId(or top-levelTranzactionId) is non-zero; currency is ILS (CoinId1 or absent);TranzactionInfo.Amount> 0. Everything else (declines, token-only / suspended operations, foreign currency) is acknowledged with 200 andskipped. - Idempotency:
externalId=TranzactionInfo.TranzactionId;apiIdentifier=cardcom-<TranzactionId>. A redelivery returns the same document.
| Cardcom field | Document |
|---|---|
TranzactionInfo.Amount (shekels) | one line + one credit-card payment, ×100 → agorot, taxIncluded: true |
UIValues.CardOwnerName | customer name (fallback "לקוח/ה") |
UIValues.CardOwnerEmail | customer email |
UIValues.CardOwnerIdentityNumber | customerUniqueId |
ReturnValue | subject / external comments (your order id) |
TranzactionInfo.Last4CardDigitsString | payment cardLast4 |
Line name is "תשלום באתר" (Cardcom sends no item list). Refunds are not mapped.
curl -X POST "https://invoice.slk.co.il/api/billing/ecommerce/cardcom/<hookId>?token=<secret>" \
-H "content-type: application/json" \
-d '{"ResponseCode":0,"LowProfileId":"8d3a1c2e-4b7f-4c1a-9e55-3f2b6a7d9c10","TranzactionId":173947118,"ReturnValue":"ORD-10457","Operation":"ChargeOnly","UIValues":{"CardOwnerName":"Dana Cohen","CardOwnerEmail":"[email protected]"},"TranzactionInfo":{"ResponseCode":0,"TranzactionId":173947118,"Amount":118.0,"CoinId":1,"Last4CardDigitsString":"4580"}}'Troubleshooting#
- 401
invalid signature: הטוקן בכתובת שונה מהסוד שהגדרתם, או שלא הוגדר סוד בכלל. העתיקו שוב את הכתובת. - 404: מזהה ה-hook בכתובת שגוי. העתיקו אותו מחדש ממסך החיבור.
- 200 עם
skipped: העסקה לא הסתיימה בהצלחה, לא בשקלים, או שהייתה יצירת טוקן בלי חיוב. זו התנהגות תקינה. - לא מגיעה שום הודעה: ודאו ש-
WebHookUrlמוגדר בגרסה 11 של ה-API, ושהכתובת נגישה מהאינטרנט. - "חסום" / "רדום": החבילה או המכסה החודשית לא מאפשרות הפקה. ההזמנה נרשמת ביומן ההזמנות, ואפשר לנסות שוב ידנית משם.