> ## Documentation Index
> Fetch the complete documentation index at: https://docs.senderz.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Payments and invoicing

> Stripe, Tranzila, iCount, Green Invoice and EZcount: what each one contributes today, how the connection works, and which parts you cannot reach from the app yet.

Senderz can connect to a payment gateway or an Israeli accounting provider for two different jobs. Read this section first, because the two are often confused and only one provider does both.

<CardGroup cols={2}>
  <Card title="Revenue and customers in" icon="arrow-right-to-bracket">
    Stripe, Tranzila and iCount send Senderz payment events. Those become order
    events on the contact and feed revenue attribution and lifetime value.
  </Card>

  <Card title="Tax invoices out" icon="file-invoice">
    iCount, Green Invoice and EZcount issue a VAT-compliant tax invoice and
    receipt for your own Senderz charges: subscription renewals and SMS pack
    purchases.
  </Card>
</CardGroup>

iCount is the only provider that does both. Stripe and Tranzila only send data in. Green Invoice and EZcount only issue invoices out.

## Availability today

<Warning>
  **There is no tile for any of these on the Integrations page, so there is
  nothing to click to connect them.** The Integrations page has a **Payment**
  category filter, but it is empty. Opening a payment provider's detail page
  directly returns "not found".

  Everything behind the screen is built and running: the connect endpoints are
  live, webhook signatures are verified, payment events feed the order pipeline,
  the Stripe customer import works, and the nightly sync includes Stripe. What
  is missing is the button.

  **Settings → Invoicing** is the exception. That screen is live and you can
  choose your invoicing provider there today. It will show iCount, Green
  Invoice and EZcount as **Not connected** until one is connected, and its
  "Connect on Integrations" link currently leads to a page with no tile.

  Contact support if you need one of these wired up for your workspace.
</Warning>

Because of this, treat the rest of this page as a description of behaviour rather than a click-by-click guide. The credentials listed are the ones each provider needs, and they are what support will ask you for.

## Stripe

Stripe is the most complete of the five. It brings customers and payments.

### What it contributes

* **Customer import.** Stripe customers become Senderz contacts, with email, phone, name and country.
* **Nightly refresh.** Stripe is one of five sources included in the automatic customer sync, which runs once a day at 04:00. The other four are Shopify, WooCommerce, Konimbo and Magento.
* **Payment events.** New customers and successful payments arrive in near real time.

### Credential

<ParamField path="Stripe API key" type="string" required>
  A restricted key with **Customers: read** and **Webhook Endpoints: write**.
  Keys beginning `rk_live_`, `rk_test_`, `sk_live_` or `sk_test_` are accepted.
  Live and test mode both work.
</ParamField>

<Note>
  Both permissions matter. Customers read is what the import uses. Webhook
  Endpoints write is what lets Senderz create the webhook for you. Without the
  second one the connection is refused with a message saying Stripe accepted the
  key but rejected the webhook request, and no Stripe events would ever arrive.
</Note>

### What happens on connect

<Steps>
  <Step title="The key is verified">
    Senderz reads your Stripe account with the key before storing anything. A
    rejected key fails immediately with the reason Stripe gave.
  </Step>

  <Step title="A webhook endpoint is created in your Stripe account">
    Senderz registers the endpoint itself, subscribed to customer created,
    checkout session completed, payment intent succeeded and charge refunded,
    and stores the signing secret Stripe returns. It is described as "Senderz
    event ingest" in your Stripe dashboard.
  </Step>

  <Step title="A customer import starts">
    The import begins right away and appears in your import and export log
    alongside CSV and store imports.
  </Step>
</Steps>

Reconnecting deletes the endpoint Senderz created previously before creating the new one, so you do not accumulate duplicates.

### Consent from Stripe

Stripe has no marketing consent field, so Senderz reads two customer metadata keys.

| Metadata key on the Stripe customer | Effect                                                   |
| ----------------------------------- | -------------------------------------------------------- |
| `email_marketing`                   | Subscribes the contact to email when the value is truthy |
| `sms_marketing`                     | Subscribes the contact to SMS when the value is truthy   |

Values counted as truthy are `1`, `true`, `yes`, `y`, `subscribed`, `opt_in`, `opt-in` and `optin`. Anything else, and a missing key, means no consent.

<Info>
  The import only ever adds consent. It never unsubscribes anyone, and a
  customer with no consent metadata is stored as a contact who receives no
  marketing. Payment webhooks carry no consent signal at all: a person who
  appears through a payment alone is never marketed to until they opt in. See
  [Consent](/en/audience/consent).
</Info>

### Event mapping

| Stripe event                 | Becomes           |
| ---------------------------- | ----------------- |
| `customer.created`           | A new contact     |
| `checkout.session.completed` | A completed order |
| `payment_intent.succeeded`   | A completed order |
| `charge.refunded`            | A refunded order  |

Amounts are converted from Stripe's minor units, so 4990 is recorded as 49.90.

## Tranzila

Tranzila is an Israeli credit card gateway. It sends payment notifications only. There is no customer import.

### Credentials

<ParamField path="Terminal id (supplier)" type="string" required>
  The public terminal name from Tranzila, visible in your Tranzila admin URL.
</ParamField>

<ParamField path="Webhook signing secret" type="string" required>
  A secret of your choosing, at least 8 characters. Set the identical value in
  Tranzila.
</ParamField>

### Setup

Tranzila cannot be provisioned for you, so this one is manual on both sides. Senderz gives you a webhook address to paste into **Tranzila → Web Hooks** as a notification destination for successful sales and refunds, and you set the same signing secret there.

Senderz verifies each delivery against an `x-tranzila-signature` header computed from the body, and also accepts `tranzila-signature` or `x-tranzila-hmac-sha256`, in hex or base64, with or without a `sha256=` prefix. If Tranzila is configured to send a plain token instead, an `x-webhook-token` header matching your secret is accepted.

### Event mapping

A transaction is treated as successful when the response code is `000` or `0`. A transaction mode of `R` or `V` is a refund, and everything else that succeeded is a completed order. Failed transactions are ignored.

## iCount

iCount is an Israeli accounting platform. It is the only provider here that both sends data in and issues invoices out.

### Credentials

<ParamField path="Company ID" type="string" required>
  Your iCount company id.
</ParamField>

<ParamField path="Username" type="string" required>
  Your iCount API user.
</ParamField>

<ParamField path="API token" type="string" required>
  Generate this in **iCount → Settings → API**.
</ParamField>

<ParamField path="Webhook signing secret" type="string">
  Optional but recommended. Set the same value in **iCount → Settings →
  Webhooks** so every inbound delivery can be verified.
</ParamField>

### Setup

Like Tranzila, iCount webhooks are not provisioned for you. Senderz gives you a webhook address to add in **iCount → Settings → Webhooks** for the invoice, receipt and credit note events you care about.

Deliveries are verified against an `x-icount-signature` header, or an `x-webhook-token` header matching the secret you set.

### Event mapping

| iCount document or event                       | Becomes           |
| ---------------------------------------------- | ----------------- |
| Invoice, tax invoice, receipt, invoice-receipt | A completed order |
| Credit note or refund                          | A refunded order  |
| Client created                                 | A new contact     |

<Warning>
  **Disconnecting iCount does not remove the webhook on their side.** Senderz
  stops accepting the deliveries, but iCount keeps sending them. Delete the
  webhook in your iCount admin yourself.
</Warning>

## Green Invoice

Green Invoice issues invoices only. It sends nothing to Senderz and does not create contacts or orders.

<ParamField path="API key ID" type="string" required>
  Create an API key under **Settings → Account → API** in Green Invoice.
</ParamField>

<ParamField path="API key secret" type="string" required>
  The secret half of that API key.
</ParamField>

## EZcount

EZcount issues invoices only. Like Green Invoice, it sends nothing to Senderz.

<ParamField path="API key" type="string" required>
  Find this in **EZcount → Settings → API**.
</ParamField>

<ParamField path="Company / business ID" type="string">
  Optional.
</ParamField>

## Choosing who issues your invoices

Go to **Settings → Invoicing**. Pick one of **Off**, **iCount**, **Green Invoice** or **EZcount**. The choice saves immediately.

| Choice        | What Senderz does                                                                             |
| ------------- | --------------------------------------------------------------------------------------------- |
| Off           | Issues nothing. Use this if you reconcile VAT in another system.                              |
| iCount        | Posts a tax invoice and receipt to iCount and emails it to the customer.                      |
| Green Invoice | Issues a tax invoice and receipt through the Green Invoice API and emails it to the customer. |
| EZcount       | Creates a tax invoice and receipt in EZcount and sends it to the customer automatically.      |

### When an invoice is issued

An invoice is created for each successful payment you make to Senderz:

* A subscription renewal
* An SMS credit pack purchase

Each payment produces exactly one invoice. A repeat of the same payment notification is ignored, so a retry from the payment provider cannot double-invoice you.

### VAT

Invoices use the standard Israeli VAT rate of 18%. The amount collected is treated as VAT-inclusive, so Senderz splits it into net and VAT rather than adding VAT on top.

### Reading the status

The Invoicing screen shows a banner with the outcome of the last attempt.

<AccordionGroup>
  <Accordion title="Last invoice issued at …" icon="circle-check">
    The most recent invoice was created successfully. Nothing to do.
  </Accordion>

  <Accordion title="Last invoice failed" icon="triangle-exclamation">
    The banner shows the reason returned by the provider. The most common cause
    is choosing a provider that is not connected, in which case the message says
    so directly. Fix the credentials, and the next payment issues normally.
    Senderz does not retry the failed one automatically.
  </Accordion>

  <Accordion title="Not connected" icon="circle-info">
    Shown beside a provider you have selected but have not connected. Nothing is
    issued while this is the state.
  </Accordion>
</AccordionGroup>

## How payment events feed the rest of Senderz

Once payment events are arriving, they behave like any other order event, whether they came from a payment gateway or a store connector.

* **Contacts.** A payment resolves to an existing contact by email or phone, or creates one with no marketing consent.
* **Timeline.** The order appears on the contact.
* **Automations.** Order triggers fire, so a post-purchase automation works the same whether the order came from Shopify or Stripe.
* **Revenue attribution.** Completed orders count toward the revenue credited to campaigns and automations.
* **Lifetime value and segments.** Order counts and totals feed the commerce fields on the contact.

<Note>
  **Payment events carry no line items.** A gateway tells Senderz an amount was
  paid, not which products were bought. So a payment provider produces order
  value but no per-product activity, and product-based segments and product
  merge tags stay empty unless a store connector is also supplying them. If you
  run a real storefront, connect the store as well. See
  [Shopify](/en/integrations/shopify) and
  [WooCommerce](/en/integrations/woocommerce).
</Note>

Running a payment provider alongside a store connector is safe. Each event is deduplicated, so an order that both systems report is only counted once.

## Not available yet

* **No tiles on the Integrations page** for any of the five, and no reachable detail page.
* **No customer import except Stripe.** Tranzila, iCount, Green Invoice and EZcount do not sync customers.
* **No line items** from any payment webhook.
* **No consent from payment webhooks.** Only the Stripe customer import reads consent, and only from metadata.
* **No automatic retry** of a failed invoice. The next payment issues normally.
* **No webhook cleanup on disconnect** for iCount or Tranzila. Remove those webhooks yourself.

## Related

<CardGroup cols={2}>
  <Card title="Inbound webhooks" icon="arrow-right-to-bracket" href="/en/integrations/webhooks-inbound">
    Every inbound address, who provisions it, and how deliveries are verified.
  </Card>

  <Card title="Integrations overview" icon="plug" href="/en/integrations/overview">
    Everything Senderz connects to, and what state each one is in.
  </Card>

  <Card title="Consent" icon="shield-halved" href="/en/audience/consent">
    Why a paying customer is not automatically a marketing contact.
  </Card>

  <Card title="Contacts" icon="users" href="/en/audience/contacts">
    Where imported customers and their commerce fields land.
  </Card>
</CardGroup>
