Author: @skills-il
Orchestrate Israeli payment gateways (Cardcom, Tranzila, PayMe, Meshulam, iCredit, Pelecard) with unified routing, fallback, and installments (tashlumim). Use when user asks about multi-gateway payment integration, "slikat kartisim", "tashlumim", payment routing, Shva network, BOI Directive 357, gateway comparison, or building a payment abstraction layer for Israeli merchants. Provides unified API patterns, installment handling, Shva clearing rules, and regulatory compliance. Do NOT use for single gateway setup (use cardcom-payment-gateway or tranzila-payment-gateway instead).
npx skills-il add skills-il/tax-and-finance --skill israeli-payment-orchestratorAsk the user about their payment needs:
| Requirement | Hebrew | Description | Impact on Gateway Choice |
|---|---|---|---|
| Installments (tashlumim) | תשלומים | Split payment into monthly installments | Not all gateways support all installment types |
| Recurring billing | חיוב חוזר | Subscription / standing order | Requires token storage and Shva approval |
| Multi-currency | רב-מטבעי | Accept NIS + foreign currencies | Limited gateway support for dual currency |
| Iframe / redirect | דף סליקה | Hosted payment page vs embedded | Affects PCI scope |
| Bit / Apple Pay | ביט / אפל פיי | Alternative payment methods | Gateway-specific integrations |
| High volume | נפח גבוה | Over 1,000 transactions/day | Need SLA guarantees and fallback |
Use scripts/compare_gateways.py to generate a comparison matrix, or reference the table below:
| Gateway | API Style | Installments | Recurring | Hosted Page | Bit Support | Typical Fee |
|---|---|---|---|---|---|---|
| Cardcom | REST JSON | Full (regular, credit, club) | Yes | Yes (iframe) | No | 0.6-0.8% |
| Tranzila | REST/Form POST | Regular, credit | Yes | Yes (redirect) | No | 0.5-0.7% |
| PayMe | REST JSON | Regular, credit | Yes | Yes (iframe) | Yes | 0.7-1.0% |
| Meshulam | REST JSON | Regular | Yes | Yes (iframe + redirect) | Yes | 0.6-0.9% |
| iCredit | REST JSON | Regular, credit | Yes | Yes (redirect) | No | 0.5-0.8% |
| Pelecard | REST JSON | Regular, credit, club | Yes | Yes (iframe) | No | 0.5-0.7% |
Fee notes: Rates are indicative. Actual rates depend on business volume, industry, and negotiation.
Build a unified payment abstraction:
# Unified payment interface pattern
class PaymentRequest:
amount: float # סכום - in agorot (NIS cents)
currency: str # מטבע - "ILS" default
installments: int # תשלומים - 1 = regular, 2-36 = installments
installment_type: str # סוג תשלומים - "regular", "credit", "club"
card_token: str # טוקן כרטיס - for recurring
description: str # תיאור עסקה
customer_id: str # מזהה לקוח
idempotency_key: str # מפתח אידמפוטנטי - prevent duplicates
class PaymentResult:
success: bool
gateway_used: str # שער תשלום שנבחר
transaction_id: str # מזהה עסקה
approval_number: str # מספר אישור
shva_reference: str # מספר שב"א
installment_details: dictDefine routing rules for selecting the optimal gateway:
| Rule | Priority | Logic | Example |
|---|---|---|---|
| Cost optimization | Medium | Route to cheapest gateway for transaction type | Small payments to lowest-fee gateway |
| Feature match | High | Route based on required features | Club installments only to Cardcom/Pelecard |
| Availability | Critical | Route away from failed/degraded gateways | If Tranzila is down, failover to Cardcom |
| Volume balancing | Low | Distribute load across gateways | 60/40 split between primary and secondary |
| Card type | High | Some gateways handle specific cards better | Diners Club routing |
Routing logic:
def select_gateway(request: PaymentRequest, gateways: list) -> str:
# 1. Filter by feature support (tashlumim type, Bit, etc.)
eligible = [g for g in gateways if g.supports(request)]
# 2. Remove unhealthy gateways
healthy = [g for g in eligible if g.is_healthy()]
# 3. Sort by cost for this transaction type
ranked = sorted(healthy, key=lambda g: g.fee_for(request))
# 4. Return best match (or raise if none available)
return ranked[0] if ranked else raise NoGatewayAvailable()Israeli installment types have specific Shva network rules:
| Type | Hebrew | Shva Code | How It Works | Who Pays Interest |
|---|---|---|---|---|
| Regular installments | תשלומים רגילים | 8 | Merchant gets full amount upfront, bank collects from customer monthly | Customer (no interest by default) |
| Credit installments | קרדיט | 2 | Customer pays bank in installments with interest, merchant gets full amount | Customer pays interest to bank |
| Club installments | מועדון | 3 | Issuer-specific program (Isracard, CAL, Max) | Varies by program |
| "Payments without interest" | תשלומים ללא ריבית | 8 | Merchant subsidizes interest cost | Merchant absorbs cost |
Implementation notes:
Design resilient payment processing:
# Fallback strategy
GATEWAY_PRIORITY = ["cardcom", "tranzila", "payme"]
async def process_with_fallback(request: PaymentRequest) -> PaymentResult:
last_error = None
for gateway_name in GATEWAY_PRIORITY:
gateway = get_gateway(gateway_name)
if not gateway.is_healthy():
continue # דלג על שער לא זמין
try:
result = await gateway.charge(request)
if result.success:
return result
# Declined by bank -- do NOT retry with another gateway
if result.is_bank_decline():
return result
except GatewayTimeoutError:
last_error = f"{gateway_name} timeout"
continue # נסה שער הבא
except GatewayError as e:
last_error = str(e)
continue
raise AllGatewaysFailedError(last_error)Important: Never retry a bank decline (customer insufficient funds, stolen card, etc.) with a different gateway. Only retry on gateway technical errors.
Comply with Bank of Israel and Shva regulations:
| Regulation | Hebrew | Requirement | Impact |
|---|---|---|---|
| BOI Directive 357 | הוראה 357 | Transaction data retention, reporting | Store all transaction details 7 years |
| PCI DSS | תקן PCI | Card data security | Use tokenization, never store full card numbers |
| Shva regulations | תקנות שב"א | Clearing and settlement rules | Adhere to clearing windows and dispute timelines |
| Consumer Protection | הגנת הצרכן | Refund rights, clear pricing | Display installment terms clearly |
| Anti-fraud | מניעת הונאה | 3D Secure, velocity checks | Implement 3DS2 for CNP transactions |
User says: "I need to accept payments with installments, with fallback if one gateway goes down" Actions:
python scripts/compare_gateways.py --features installments,recurring
Result: Orchestration layer with primary/fallback routing and installment handlingUser says: "We use Tranzila but want to add PayMe for Bit payments" Actions:
User says: "Which gateway is cheapest for our 500 daily transactions averaging 200 NIS?" Actions:
python scripts/compare_gateways.py --volume 500 --avg-amount 200User says: "Customer wants to pay 5,000 NIS in 10 interest-free installments" Actions:
scripts/compare_gateways.py -- Generates comparison matrix of Israeli payment gateways based on features, fees, and volume. Run: python scripts/compare_gateways.py --helpreferences/gateway-matrix.md -- Detailed feature comparison of Israeli payment gateways: API formats, installment support, recurring billing, hosted pages, settlement timelines, and fee structures. Consult when evaluating or switching gateways.Cause: Requested installment type (credit/club) not available on selected gateway Solution: Check gateway capabilities in Step 2 table. Club installments only available on Cardcom and Pelecard. Route to appropriate gateway.
Cause: Transaction violates Shva network rules (invalid installment count, amount below minimum) Solution: Verify installment count is within allowed range. Check minimum per-installment amount. Ensure transaction currency is ILS for domestic cards.
Cause: All configured gateways are experiencing issues Solution: Implement circuit breaker pattern with health checks. Consider adding a third gateway. Monitor gateway status endpoints and alert on degradation.
Cause: Retry logic sent same payment to multiple gateways Solution: Always use idempotency keys. Check transaction status before retrying. Never retry bank declines -- only retry gateway technical errors.
Supported Agents
Trust Score
Navigate and analyze Israeli corporate annual reports, financial filings, and regulatory disclosures
Analyze Tel Aviv Stock Exchange securities, indices, and corporate disclosures
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. Covers mandatory pension, voluntary savings, and withdrawal rules. Do NOT provide specific investment recommendations or fund performance comparisons.
Want to build your own skill? Try the Skill Creator · Submit a Skill