cardcom-payment-gateway
Cardcom Payment Gateway
Overview
Cardcom is an Israeli payment processor with a unique strength: integrated invoice and receipt generation compliant with Israeli tax law. While other Israeli gateways handle only the payment, Cardcom can automatically generate tax invoices (hashbonit mas) and receipts (kabala) as part of the payment flow -- something Israeli businesses are legally required to issue.
This skill guides integration with Cardcom's REST API V11 for payments, tokenization, recurring billing, and document generation.
Official docs: Available through Cardcom developer portal (contact dev@secure.cardcom.co.il for access)
Developer support: dev@secure.cardcom.co.il or 03-9436100 (press 2)
Instructions
Step 1: Choose Integration Pattern
| Pattern | Card Data Handling | Best For |
|---|---|---|
| Low Profile (iframe/redirect) | Cardcom handles card entry | Most integrations -- minimal PCI scope (SAQ-A) |
| OpenFields (embedded fields) | Card inputs hosted by Cardcom in your form | Custom UI with PCI compliance (SAQ-A) |
| ChargeToken (server-to-server) | Token only, no raw card data | Recurring charges, subscription billing |
| CreateDocument (server-to-server) | No card data | Standalone invoice/receipt generation |
Most Israeli merchants use Low Profile for initial payment + token creation, then ChargeToken for recurring charges. Use OpenFields when you need full control over the checkout design. Both payment methods can auto-generate invoices.
Step 2: Set Up Authentication
Cardcom API V11 credentials:
TerminalNumber-- Your terminal ID (use1000for testing)ApiName-- API username (usebWlyb24gY2FyZGNvbQ==for testing)ApiPassword-- API password
Test environment:
Terminal 1000 with the test credentials allows full API testing without real charges. Test card: 4580000000000000, any future expiry, CVV 123.
Store credentials securely -- never in source code or client-side JavaScript.
Step 3: Implement the Payment Flow
Low Profile Integration (Recommended)
This is a two-step process:
Step 3a: Create the payment page
POST https://secure.cardcom.solutions/Interface/LowProfile.aspx
Content-Type: application/json
{
"TerminalNumber": 1000,
"ApiName": "your-api-name",
"ApiPassword": "your-api-password",
"ReturnValue": "unique-order-id",
"Amount": 100.00,
"SuccessRedirectUrl": "https://example.com/success",
"FailedRedirectUrl": "https://example.com/failed",
"WebHookUrl": "https://example.com/webhook",
"Document": {
"DocTypeToCreate": 101,
"Name": "Customer Name",
"Products": [
{
"Description": "Product name",
"UnitCost": 100.00,
"Quantity": 1
}
]
},
"CoinID": 1,
"Language": "he"
}
Response includes Url -- redirect customer there or embed as iframe.
Step 3b: Get the results
After payment completes, Cardcom calls your WebHookUrl or you query:
POST https://secure.cardcom.solutions/Interface/BillGoldGetLowProfileIndicator.aspx
{
"TerminalNumber": 1000,
"ApiName": "your-api-name",
"ApiPassword": "your-api-password",
"LowProfileCode": "code-from-step-3a"
}
Check DealResponse = 0 for success. Extract Token for future charges.
OpenFields Integration (Custom UI)
OpenFields is Cardcom's newest integration pattern (2026). It lets you build your own payment form while Cardcom-hosted iframes handle sensitive card inputs:
- Create a Low Profile session via
/Interface/LowProfile.aspx - Embed Cardcom's OpenFields JS on your page
- Mount secure iframe fields for card number, expiry, and CVV inside your form
- On submit, the JS tokenizes card data and submits to Cardcom
- Retrieve results via
BillGoldGetLowProfileIndicator.aspx
This gives full design control while maintaining SAQ-A PCI compliance. Official examples: https://github.com/CardCom (React and vanilla JS).
Alternative Payment Methods
The Low Profile response includes URLs for alternative payment methods when enabled on your terminal:
| Method | Response Field | Notes |
|---|---|---|
| Bit | BitUrl |
Israel's most popular mobile payment app |
| Google Pay | GooglePayUrl |
For mobile and web |
| PayPal | PayPalUrl |
International payments |
Display these alongside the credit card form to give customers more payment options.
Step 4: Generate Israeli Tax Documents
Cardcom's standout feature is automatic document generation with payments. This is critical for Israeli businesses because tax law requires issuing proper documents for every transaction.
Document types (DocTypeToCreate):
| Code | Hebrew | English | When to Use |
|---|---|---|---|
| 1 | hashbonit mas | Tax Invoice | B2B sales, services |
| 2 | hashbonit zikui | Credit Note | Refunds, corrections |
| 3 | kabala | Receipt | Payment confirmation |
| 101 | hashbonit mas / kabala | Tax Invoice + Receipt | B2C with payment (most common) |
| 400 | -- | Iframe document | Low Profile context |
Include document in payment flow:
Add the Document object to your Low Profile or ChargeToken request (as shown in Step 3a). Cardcom generates the document automatically when payment succeeds.
Standalone document creation:
POST https://secure.cardcom.solutions/Interface/CreateDocument.aspx
{
"TerminalNumber": 1000,
"ApiName": "your-api-name",
"ApiPassword": "your-api-password",
"Document": {
"DocTypeToCreate": 1,
"Name": "Customer Ltd",
"VAT_Number": "123456789",
"Products": [
{
"Description": "Web development services",
"UnitCost": 5000.00,
"Quantity": 1,
"IsVatFree": false
}
],
"SendByEmail": true,
"Email": "customer@example.com",
"Language": "he",
"CoinID": 1
}
}
Response includes InvoiceNumber, InvoiceType, and Link to the PDF document.
Step 5: Implement Token-Based Recurring Payments
For subscriptions and recurring billing (hora'ot keva):
-
Create token during first payment:
- Use Low Profile with token creation enabled
- Response includes
Token,CardValidityMonth,CardValidityYear
-
Store token securely:
- Save token (UUID format), card expiry, and last 4 digits
- Token is bound to your terminal
-
Charge the token:
POST https://secure.cardcom.solutions/Interface/BillGoldCharge.aspx
{
"TerminalNumber": 1000,
"ApiName": "your-api-name",
"ApiPassword": "your-api-password",
"Token": "token-uuid",
"CardValidityMonth": "12",
"CardValidityYear": "2027",
"Amount": 99.00,
"Document": {
"DocTypeToCreate": 101,
"Name": "Subscriber Name",
"Products": [
{
"Description": "Monthly subscription - February 2026",
"UnitCost": 99.00,
"Quantity": 1
}
],
"SendByEmail": true,
"Email": "customer@example.com"
}
}
Each token charge can automatically generate and email an invoice.
Step 6: Process Refunds
Refund a transaction and optionally generate a credit note:
POST https://secure.cardcom.solutions/Interface/BillGoldRefund.aspx
{
"TerminalNumber": 1000,
"ApiName": "your-api-name",
"ApiPassword": "your-api-password",
"TransactionId": "original-transaction-id",
"Amount": 100.00,
"Document": {
"DocTypeToCreate": 2,
"Name": "Customer Name"
}
}
This both refunds the payment AND generates a credit note (hashbonit zikui) -- handling both the financial and tax compliance sides in one call.
Step 7: Handle Token Replacements (Muhlafim)
When credit cards are replaced (expired, lost, reissued), Cardcom can automatically update stored tokens:
- Check for updated tokens periodically via
GetMuhlafimByDateorGetNewMuhlafim - These endpoints return tokens where the underlying card was replaced by the issuer
- Update your stored token data (new expiry, last 4 digits) in your database
- Mark replacements as processed via
UpdateMuhlafimDone
This prevents failed charges when customers receive new cards -- critical for subscription-based businesses.
Step 8: Use Suspended Deals (Deferred Payments)
Suspended deals let you authorize a payment without immediate charge:
- Create a suspended deal via Low Profile with
Operation: "SuspendDealOnly" - The payment is authorized but not charged
- Activate the deal later via
SuspendedDealActivateOnewhen ready to charge - Optionally cancel unused suspended deals via
RevokeLowProfileDeal
Useful for pre-authorizations, hotel bookings, or services billed after delivery.
Step 9: Handle Errors
Check response codes in every API call. A response of 0 means success.
Common errors:
| Code | Meaning | Action |
|---|---|---|
| 0 | Success | Proceed normally |
| 5033 | Terminal number missing | Check TerminalNumber in request |
| 5034 | Authentication failed | Verify ApiName and ApiPassword |
| 5035 | Invalid amount | Ensure Amount is positive number |
| 5100 | Card declined | Ask user to try another card |
| 5101 | Expired card | Ask user to update card details |
| 5102 | CVV incorrect | Ask user to re-enter CVV |
| 5200 | Token not found | Verify token UUID and terminal match |
| 5300 | Invoice creation failed | Check Document parameters |
For the full API response reference, consult references/api-responses.md.
Examples
Example 1: E-commerce Checkout with Invoice
User says: "I need to accept payments on my Israeli e-commerce site and generate tax invoices automatically" Actions:
- Choose: Low Profile integration with DocTypeToCreate=101 (tax invoice + receipt)
- Guide: Create Low Profile page with product details in Document object
- Implement: WebHook handler for payment confirmation
- Result: Customer pays, gets automatic hashbonit mas/kabala emailed as PDF Result: Full checkout flow with automatic Israeli tax document compliance.
Example 2: Monthly SaaS Subscription
User says: "I run a SaaS product, I need to charge users 149 NIS monthly and send them invoices" Actions:
- First payment: Low Profile with token creation
- Store: Token, card expiry from response
- Monthly cron: ChargeToken with Document for each billing cycle
- Handle: Failed charges, expired cards, email invoices Result: Automated recurring billing with monthly invoice generation.
Example 3: Standalone Invoice Without Payment
User says: "I need to generate a tax invoice for a bank transfer payment I already received" Actions:
- Use: CreateDocument endpoint (no payment processing)
- Set: DocTypeToCreate=1 (tax invoice)
- Include: Customer details, line items, amounts
- Send: Set SendByEmail=true with customer email Result: Tax invoice generated and emailed without credit card processing.
Example 4: Process a Refund with Credit Note
User says: "Customer wants a refund for order #5678, need to issue a credit note too" Actions:
- Use: RefundByTransactionId endpoint
- Include: Document with DocTypeToCreate=2 (credit note)
- Process: Refund + credit note generated in single API call
- Verify: DealResponse=0 for success Result: Refund processed and hashbonit zikui (credit note) generated automatically.
Example 5: Accept Bit Payment
User says: "I want to let customers pay with Bit in addition to credit cards" Actions:
- Enable: Bit on your Cardcom terminal via dashboard
- Create: Low Profile session as usual
- Display: Show the
BitUrlfrom the response alongside the card form - Handle: Same webhook flow -- DealResponse=0 for success Result: Customers can choose between credit card and Bit payment.
Example 6: Custom Checkout with OpenFields
User says: "I want to design my own payment form but keep PCI compliance" Actions:
- Create: Low Profile session to get the OpenFields token
- Embed: Cardcom OpenFields JS and mount secure iframe fields in your form
- Style: Apply your own CSS to the form while card inputs remain Cardcom-hosted
- Submit: JS tokenizes and sends card data directly to Cardcom
- Retrieve: Get results via GetLpResult Result: Fully custom checkout design with SAQ-A PCI compliance.
Community Libraries
- @tsdiapi/cardcom (TypeScript/Node.js) -- API V11 client with payments, refunds, tokenization, transaction queries. Install:
npm install @tsdiapi/cardcom - yadahan/laravel-cardcom (PHP/Laravel) -- Full integration with charges, refunds, tokens, invoices, multi-terminal
- CardCom/OpenFields-FrontEnd-React (React) -- Official React OpenFields example. See:
https://github.com/CardCom/OpenFields-FrontEnd-React - CardCom/OpenFields-Backend-Node (Node.js) -- Official Node.js backend example
Bundled Resources
References
references/api-endpoints.md-- Complete Cardcom REST API V11 endpoint reference including Low Profile, Transactions, Documents, RecurringPayments, Financial, and CompanyOperations. Lists request/response fields for each endpoint. Consult when building API integrations or exploring available operations.references/api-responses.md-- Full listing of Cardcom response codes with meanings and recommended handling for transaction, token, and invoice operations. Consult when debugging failed API calls.references/document-types.md-- Israeli tax document type codes (1, 2, 3, 101, 400) with required fields, VAT handling, and usage guidelines per Israeli tax law. Consult when determining which document type to generate for a transaction.
Scripts
scripts/validate_cardcom_response.py-- Validates a Cardcom API response: checks response codes for transaction, token, and invoice operations, verifies required fields, and flags common integration issues. Run:python scripts/validate_cardcom_response.py --help
Gotchas
- Agents often send Cardcom API requests as
application/json, but the V11 API expects JSON with aContent-Type: application/jsonheader. Older Cardcom APIs used form-encoded data, so agents trained on older examples may use the wrong format. - The
TerminalNumbermust be sent as an integer, not a string. Agents commonly wrap it in quotes, causing error 5033. - Agents may hardcode VAT at 17%, but the current Israeli VAT rate is 18% (effective January 2025). Cardcom calculates VAT server-side, so the Document amounts should be net of VAT unless specified otherwise.
- Cardcom's test terminal (1000) does not support all features available in production. Agents may write integration tests that pass in sandbox but fail in production due to terminal-specific configurations.
Troubleshooting
Error: "5033 -- Terminal Number is Missing"
Cause: TerminalNumber not included or sent as wrong type Solution: Ensure TerminalNumber is sent as an integer (not string) in the JSON body. For testing, use 1000.
Error: "5034 -- Authentication failed"
Cause: Invalid ApiName or ApiPassword Solution: Verify credentials in your Cardcom dashboard. For testing, use terminal 1000 with the test API credentials. Credentials are separate from your login password.
Error: "Low Profile page loads but payment fails"
Cause: Often a WebHookUrl or redirect URL issue Solution: Ensure SuccessRedirectUrl, FailedRedirectUrl, and WebHookUrl are publicly accessible HTTPS URLs. Localhost URLs do not work -- use a tunnel (ngrok) for development.
Error: "Invoice created but not emailed"
Cause: SendByEmail not set or email address missing
Solution: Set SendByEmail: true and include a valid Email in the Document object. Check spam folders -- Cardcom sends from their domain.
Error: "Token charge succeeds but no invoice"
Cause: Document object missing from ChargeToken request Solution: Include the full Document object with DocTypeToCreate, Name, and Products in every token charge request. Document generation is opt-in per transaction, not automatic.
More from skills-il/tax-and-finance
israeli-e-invoice
Generate, validate, and manage Israeli e-invoices (hashbonit electronit) per Tax Authority (SHAAM) standards. Use when user asks to create Israeli invoices, request allocation numbers, validate invoice compliance, or asks about "hashbonit", "e-invoice", "SHAAM", "allocation number", or Israeli invoicing requirements. Supports tax invoice (300), tax invoice/receipt (305), credit invoice (310), receipt (320), and proforma (330) types. Do NOT use for general accounting, bookkeeping, or non-Israeli invoice formats.
15israeli-crypto-tax-reporter
Calculate cryptocurrency capital gains tax per Israeli Tax Authority (Reshut HaMisim) regulations and generate Form 1322/1325 reporting data and Form 1399י advance-payment data (within 30 days of disposal). Use when a user needs to compute crypto tax obligations using FIFO cost basis, classify DeFi income (staking, liquidity mining, airdrops) for Israeli tax purposes, prepare annual tax filing data, understand reporting thresholds and advance payment (mikdamot) requirements, or evaluate the 2025-2026 Voluntary Disclosure Procedure (open until 31 Aug 2026). Covers Section 88 of the Income Tax Ordinance, Circular 2018/05, the 25% capital gains rate for individuals, and the 5% surtax on capital income above NIS 721,560 (threshold frozen through 2027). Do NOT use for non-Israeli tax jurisdictions, general income tax calculations, or VAT (maam) on crypto business activities, which require separate professional consultation.
15green-invoice
Integrate Green Invoice (Morning) API for Israeli invoicing, receipts, client management, and payment processing. Use when user asks to create invoices via Green Invoice, generate hashbonit mas through Morning API, manage clients in Green Invoice, set up webhook automation for document creation, query documents or expenses, or mentions "Green Invoice", "Morning", "hashbonit yeruka", "greeninvoice API", Israeli cloud invoicing, or needs to create tax invoice-receipt (cheshbonit mas/kabala). Covers all 13 document types, 8 payment types, client CRUD, item catalog, and webhook integration. Do NOT use for SHAAM allocation numbers or Tax Authority e-invoice compliance (use israeli-e-invoice), Cardcom payment processing (use cardcom-payment-gateway), or Tranzila integration (use tranzila-payment-gateway).
14israeli-pension-advisor
Navigate the Israeli pension and savings system including pension funds (keren pensia), manager's insurance (bituach menahalim), training funds (keren hishtalmut), and retirement planning. Use when user asks about Israeli pension, \"pensia\", \"keren hishtalmut\", retirement savings, \"bituach menahalim\", pension contributions, or tax benefits from savings. Uninformed pension decisions cost hundreds of thousands of NIS over a lifetime. Covers mandatory pension, voluntary savings, and withdrawal rules. Do NOT provide specific investment recommendations or fund performance comparisons.
14israeli-annual-reports
Navigate and analyze Israeli corporate annual reports (dochot titkuftiim), financial filings, and regulatory disclosures. Use when user asks about Israeli annual reports, MAYA filings, IFRS financial statements, doch titkufti, dochot kaspiyim, or Companies Law reporting requirements. Covers TASE filing types, Israeli GAAP to IFRS transition, Hebrew financial terminology, and key financial statement analysis.
14israeli-budget-planner
Plan household and personal budgets with Israeli-specific costs, rates, and financial products. Use when user asks about budgeting in Israel, mortgage (mashkanta) calculations, arnona rates, cost of living, takciv, or monthly expense planning. Covers Bank of Israel prime rate, mashkanta tracks, arnona by city, Sal Briut costs, and Israeli household benchmarks.
2