What it does

The Stripe integration turns payments received through Stripe into invoices automatically: it issues the invoice, fiscalizes it and sends it to the customer. It works for one-time payments through a web checkout and for recurring payments through Stripe subscription invoicing, on any website that charges through Stripe. When you refund a customer in Stripe, Kigo.Cloud automatically issues a reversal or a credit note of the original invoice.

Stripe reports every payment and change to Kigo.Cloud through a webhook. The integration is under Options > Integrations > Stripe Integration, with the tabs Stripe WebHook Integration, Stripe Invoicing Integration and Received calls. The screen is opened by the account administrator.

Stripe WebHook Integration

This tab shows the address (Endpoint URL) Stripe sends events to. The webhook is created in Stripe:

  1. Log in to the Stripe Dashboard at dashboard.stripe.com.
  2. Open Developers > Webhooks and click Add destination.
  3. In the Select events step choose the events:
    • invoice.payment_succeeded: a Stripe invoice was paid
    • invoice.created: an invoice was created in Stripe
    • invoice.sent: an invoice was sent to the customer
    • payment_intent.succeeded: a payment without a Stripe invoice was confirmed
    • charge.refunded, refund.created and refund.updated: a refund to the customer (section Refunds)
  4. In the Choose destination type step choose Webhook endpoint.
  5. In the Configure your destination step paste the address from the Stripe WebHook Integration tab (button Copy) into Endpoint URL.
  6. Click Create destination.

What Kigo.Cloud does with an event:

  • A paid Stripe invoice and a confirmed payment without a Stripe invoice become a fiscalized invoice with the payment method card.
  • A Stripe invoice that is not paid yet (invoice.created, invoice.sent) becomes a quote.
  • If the customer e-mail is known, the invoice is sent to the customer by e-mail.
  • A customer or item that does not exist yet is created automatically from the Stripe data.
  • Only payments in euro are processed.
  • A repeated event of the same payment does not issue a second invoice.

Supported external systems

Besides direct Stripe charges, payments that arrive through Stripe from these platforms are recognized and fiscalized automatically:

  • Thinkific: online course platform
  • Wix: websites and web shops
  • Bokun: tour and activity bookings
  • Other platforms: any payment that carries the usual metadata with the Stripe transaction (e-mail, order number, items)

Besides Stripe, Kigo.Cloud connects directly to WooCommerce and Shopify web shops and offers API Integration for your own systems.

Stripe Invoicing Integration

This tab is available with the Standard plan or higher. Stripe webhook messages often lack what an invoice needs: customer name, e-mail, product name or items. With the Secret Key entered, Kigo.Cloud fetches this data from Stripe using the customer or invoice ID in the message. The same key is needed for automatic refunds.

The Instructions tab explains how to get the key:

  1. In the Stripe Dashboard open Developers > API keys.
  2. Click Create secret key and enter a name (e.g. Kigo.Cloud). Stripe may ask you to verify the account.
  3. Copy the Secret key shown. Stripe does not show it again after you close it.

On the Settings tab enter the Key name and the key in New Secret Key and click Save. Kigo.Cloud checks the connection to Stripe right away: a valid key shows "Access credentials successfully saved and valid.", an invalid one shows "Error:" with the reason. The saved key is shown masked in Secret Key, and above the fields you see whether Stripe Invoicing Integration is active.

Important: the Secret Key gives access to your Stripe account. Do not share it or send it by e-mail.

Refunds

When you refund a customer in Stripe, Kigo.Cloud issues the document for that refund: a reversal of the original invoice for a full refund, or a credit note for a partial refund. The money is returned in Stripe; Kigo.Cloud does not start the refund.

To switch it on, add the events charge.refunded, refund.created and refund.updated to the existing webhook in Stripe (the address stays the same) and enter the Secret Key on the Stripe Invoicing Integration tab. Kigo.Cloud uses it to check the refund in Stripe before issuing a document. The key must be from the same mode (test or live) as the event.

Only successful refunds in euro are processed. A pending or failed refund does not create a document.

Full refund. When the full amount of the charge is refunded, the original invoice is reversed, as with the Void button on the invoice. If credit notes for partial refunds were issued before, a credit note is issued only for what has not been refunded yet.

Partial refund. Kigo.Cloud must know which items the customer returns. The amount alone does not say that, so Kigo.Cloud never guesses items or VAT. The integration of your website sets the metadata kigo_refund_items on the Stripe Refund:

[{"id_item":123,"quantity":"1"}]
  • id_item is the item ID in the application, the one on the original invoice.
  • quantity is the returned quantity, with a dot for decimals.
  • The returned items at the prices of the original invoice must add up to the refund amount.

Prices, discounts and VAT are taken from the original invoice, not from today's price list. The credit note is issued on the same business premises and payment device as the original invoice and carries the original invoice number in its note. It also works for an invoice from the previous year. The same item cannot be refunded twice or in a larger quantity than was sold.

Refund waiting for review.

When a refund cannot become a document, the invoice stays unchanged and the call is listed on the Received calls tab under Failed, with a message starting with "Za obradu:" (for review). Administrators get a notification in the bell. The most common reasons:

  • a partial refund without kigo_refund_items or with an amount that does not match the items,
  • no Secret Key entered,
  • no original invoice found for that Stripe charge,
  • the original invoice was already reversed manually,
  • a larger quantity is refunded than was sold.

Remove the cause (for example complete the refund data in Stripe or enter the key) and resend the event from Stripe. Stripe also resends a failed event by itself for some time. A repeated event for a refund already processed does not issue a new document. If you do not want an automatic document for a refund, issue the reversal or credit note manually on the original invoice.

Received calls

The Received calls tab lists the calls Stripe sent: time, event, the Kigo.Cloud response and a link to the issued document. Failed are calls answered with an error (no document was made), Successful are processed calls. A click on a row opens the call with all details. Calls are kept for 90 days. When a call fails, administrators get a notification in the bell.

FAQ

  • Can I use only the webhook without a Secret Key? Yes. Invoices are issued without the key, but the data may be incomplete (for example the customer name may be missing), and refunds do not become documents automatically.
  • When should I choose payment_intent.succeeded? For payments without a Stripe invoice (for example checkout). The event is supported; if you also use Stripe Invoicing, contact support for advice on combining the events.
  • What if the integration does not work? Check the address in Stripe, the webhook deliveries in the Stripe Dashboard, the Received calls tab and whether the payment is in euro. When the licence expires, Stripe calls are refused 7 days after expiry. If that does not help, contact support.