1. Home
  2. /
  3. Admin Guide
  4. /
  5. Plugins
  6. /
  7. Stripe Invoice — Administ...

Stripe Invoice — Administrator guide

Before configuring Stripe, the Cirrus Shield organisation must contain the objects, fields, plugin and Connected App described here, with exactly these API names. The screenshots show the French Cirrus Shield interface; French labels are given in quotes.

Overview

Stripe Invoice reads the data below by its API name and writes only two invoice fields: Payment_Status and Payment_Date. A different API name (for example Facture or Statut_de_paiement) prevents the app from finding the data.

Object (API name)Fields used (API names)Create it?Read / written
InvoiceInvoice_Number, Contact, Amount, VAT, Payment_Status, Payment_Date, Due_Date, Pay_URLYes (custom object)Read; Payment_Status and Payment_Date written after payment
Invoice_Line_ItemInvoice, Product, Quantity, Discount, Price, Total_PriceYes (custom object)Read
ContactEmail, Work_Phone, Street, City, Country, ZIPNo (standard)Read
ProductName, Product_Code, Default_Unit_PriceNo (standard)Read
OrganisationBase currency, logoNo (organisation settings)Read

The label is free, the API name is not. Create each object and field with the exact API name from the table. Once created, you can change its label (for example “Invoice”, “Payment status”): the app only reads the API name.

Picklist values: Payment_Status must have the values Unpaid and Paid exactly. The payment button only appears when the status is Unpaid, and the app writes Paid after payment.

Step 1 — Check the Invoice object and its fields (create them if missing)

In Setup → Objects (“Objets”), check that an object with the API name Invoice exists and has the fields below with these API names and types. Create the object or any missing field (label of your choice). To create the Amount field, the Invoice_Line_Item object (Step 2) must already exist: it is a roll-up of its lines.

Cirrus Shield Setup menu (French interface): Objets, Onglets, Applications, Intégration, Gestion des utilisateurs, Organisation, Modèle de page, Modèles, Historique des connexions, Extensions, Importation de données, Applications connectées
The Setup menu: Objects (“Objets”) for Steps 1 to 3, Extensions and Connected Apps (“Applications connectées”) for Steps 7 and 8.
Details of the custom object Facture: label Facture, name Invoice
Object details: the label is “Facture”, the Name (“Nom”, the API name) is Invoice. The name is what counts.
Suggested labelAPI name (required)TypeSettings
Invoice numberInvoice_NumberAuto number or TextFor example prefix Inv-, format 00000, start 1
ContactContactLookup relationshipRelated to Contact
AmountAmountRoll-up (“Cumulatif”)Summarized object Invoice_Line_Item, roll-up type Sum, field to aggregate Total_Price
VAT (%)VATNumberLength 3, 2 decimals; it is a rate (20 = 20%)
Payment statusPayment_StatusPicklistValues whose Name is Unpaid and Paid (see below)
Payment datePayment_DateDate/Time—
Due dateDue_DateDate—
Payment linkPay_URLFormula (Text)See Step 3

To add a field: the object’s Custom fields tab (“Champs personnalisés”), the + button, choose the type, then enter the Label (“Étiquette”) and the Name (“Nom”).

Step 1 of 2 of field creation: list of data types (Case à cocher, Cumulatif, Date, Devise, Formule, Nombre, Liste de sélection, ...)
Choosing the data type (step 1 of 2 of the wizard).
Roll-up field: label Montant, name Amount, summarized object Ligne de Facture, roll-up type Somme, field to aggregate Prix total
The Amount field: roll-up (“Cumulatif”) on Ligne de Facture (Invoice_Line_Item), Sum (“Somme”) of Prix total (Total_Price).
Number field: label TVA (%), name VAT, length 3, decimals 2
The VAT field: Number, length 3, 2 decimals.
  • Standard Cirrus Shield organisation: the Invoice object often already exists with the API name Invoice and the fields Invoice_Number, Contact, Payment_Status, Payment_Date, Due_Date and Pay_URL. Usually you only need to add Amount, VAT and the Unpaid / Paid values.
  • Payment_Status values: in the field’s details, Picklist values → +, enter Unpaid then Paid (one value per line) and save. Cirrus Shield gives each value the same Name (Unpaid, Paid). Keep these names. New invoices to be paid must have the status Unpaid (tick it as Default value if all your invoices go through Stripe).
  • Amount charged to the customer: Stripe Invoice charges the Total = Amount + Amount × VAT / 100. The VAT amount and the total are calculated by the app.
  • Status and date: after payment, the app writes Payment_Status = Paid and Payment_Date (UTC time). Don’t make them required.
  • Saving the roll-up: saving the Amount field can take about a minute while Cirrus Shield calculates the amount of every invoice. Wait without reloading the page.
  • Renaming later: you can change the label of the object and of each field. The API name must not change.
Picklist values of the Statut (Payment_Status) field: Unpaid, Non Envoyée (default), Paid, Envoyée au Client, Payée Partiellement, Payée en Totalité, Annulée/ Supprimée
Payment_Status after the change: the values Unpaid and Paid (same value and name) sit next to the organisation’s existing values; here the default stayed “Non Envoyée”.

Step 2 — Check the Invoice_Line_Item object and its fields (create them if missing)

Check that an object with the API name Invoice_Line_Item exists with the fields below; otherwise create it or add the missing fields (label of your choice). Each line appears on the payment page with its product, quantity, price, discount and total.

Suggested labelAPI name (required)TypeSettings
InvoiceInvoiceLookup relationshipRelated to Invoice
ProductProductLookup relationshipRelated to Product
QuantityQuantityNumber—
Discount (%)DiscountNumber or Percent10 = 10%
PricePriceFormula, return type Currency, 2 decimalsProduct__ro.Product__ro.Default_Unit_Price * Quantity
Total priceTotal_PriceFormula, return type Currency, 2 decimalsPrice - Price * Discount / 100

The syntax Product__ro.Product__ro.<field> (lookup field, then object) is the one the formula editor accepts; the old form Product__ro.Default_Unit_Price is rejected (“Erreur dans la syntaxe”). Click the check icon to the right of the formula: Cirrus Shield must show “La syntaxe de la formule est correcte !”.

Price formula field: return type Devise, 2 decimals, formula Product__ro.Product__ro.Default_Unit_Price * Quantity, message La syntaxe de la formule est correcte
The Price field: return type Currency (“Devise”), 2 decimals, and the formula accepted by the check.

Empty discount: on Price and Total_Price, tick Empty fields are treated as zeros (“Les champs vides vont être considérés comme des zéros”). Otherwise a line without a discount has an empty Total price and the invoice an amount of 0.

Ticked option: Les champs vides vont être considérés comme des zéros
The option to tick in the formula field’s form.

Existing invoices: the Amount roll-up is only recalculated when a line is saved. After creating or changing these fields, open and save again the lines of the invoices to be paid.

  • Creation order: create Invoice and Product before the formulas, because Price reads the unit price of the linked product (Product__ro.Product__ro.Default_Unit_Price).
  • Link with the amount: the invoice’s Amount field (Step 1) adds up Total_Price of all its lines. Create it after this object.
  • Labels: as for the invoice, rename the labels freely afterwards, but keep the API names.

Step 3 — Check the Pay_URL payment link (create it if missing)

On the Invoice object, check that a Formula field with the API name Pay_URL and return type Text exists and contains the formula below; otherwise create it or fix its formula. It shows on each invoice the link to send to the customer (for example by email).

HyperLink("https://stripe.cirrus-shield.net/Payment.php?i=" + Id + "&o=" + $Organization.Id, "Pay")
Details of the Lien de paiement field: name Pay_URL, return type Texte, HyperLink formula to stripe.cirrus-shield.net/Payment.php
The Pay_URL field (label “Lien de paiement”) with the formula, here with the link text "Pay".
  • Don’t change the address: https://stripe.cirrus-shield.net/Payment.php?i=…&o=… is the address the app expects. Old formulas using payment.php (lower case) also work.
  • Link text: "Pay" can be anything (for example "Payer").
  • What the customer sees: the invoice (header, contact, lines, VAT, total), then the payment button that opens the Stripe payment page. An invoice already paid shows without a button.

Step 4 — Check the standard fields used

These fields already exist in Cirrus Shield: nothing to create, but they must be filled in for the invoice to display fully.

ObjectFields (API names)Used for
ContactEmail, Work_Phone, Street, City, Country, ZIP“Customer” block of the payment page
ProductName, Product_Code, Default_Unit_PriceName and code of each line; unit price read by the Price formula
OrganisationBase currency, logoPayment currency; logo at the top of the page (Cirrus Shield logo if missing)
  • Currency: payment is made in the organisation’s base currency (Setup → Organisation). Check it before the first payment.
  • Logo: add the organisation’s logo in Setup → Organisation so it appears on the payment page.

Step 5 — Show invoices to users

These settings change nothing for the app: they let users create invoices and see the payment link.

  1. Tab: Setup → Tabs → New, type Object, custom object Invoice (label of your choice).
  2. Profiles: in the tab’s details, Profiles → Edit profiles, add the profiles that must see invoices.
  3. Application: Setup → Applications, open the application concerned (for example CRM), Tabs → Edit, add Invoice, save. The tab appears in the left menu.
  4. Page layout: create a page layout (page designer) for Invoice_Line_Item, then one for Invoice. In the invoice layout, add a section with the Invoice_Line_Item related list and the Pay_URL field. Tick Tabs to show the section as a tab.

The old web page “InvoiceUsers_Management.php” is no longer used: don’t create a web tab to that address.

Step 6 — Check the objects and fields

Before installing the plugin, check the API names in Setup → Objects: it is the most common reason an invoice does not display.

  • ☐ The Invoice object exists and its API name is Invoice.
  • ☐ Its fields have the API names Invoice_Number, Contact, Amount, VAT, Payment_Status, Payment_Date, Due_Date, Pay_URL.
  • ☐ Payment_Status has the values Unpaid and Paid; Unpaid is the default value.
  • ☐ The Invoice_Line_Item object exists with Invoice, Product, Quantity, Discount, Price, Total_Price.
  • ☐ A test invoice with at least one line shows a non-zero Amount and a Pay link.
  • ☐ The invoice’s contact has an email address; the organisation has its base currency (and its logo).

An organisation set up with the old French help may have the names Facture, Ligne_de_facture, Statut_de_paiement, Date_de_paiement, Payer_URL or the values Payé / Non payé. These names are not recognised: create the objects and fields with the API names above.

Step 7 — Check the extension and the Connected App

Stripe Invoice connects to Cirrus Shield through a confidential Connected App (OAuth 2.0) linked to the Stripe Invoice extension: no Cirrus Shield username or password is entered in the app. Cirrus Shield Support installs both; you only check that they are present and active.

  • ☐ Setup → Extensions (“Extensions”): the Stripe Invoice row exists and Installed (“Installé”) is ticked.
  • ☐ Setup → Connected Apps (“Applications connectées”): the Stripe Invoice Confidentiel row exists, type Confidential, scopes api:read,api:write, Status ticked.

If either is missing or inactive, contact Cirrus Shield Support.

Extensions list: Stripe Invoice, Installé ticked
Setup → Extensions after installation: Stripe Invoice has Installed (“Installé”) ticked (list reduced to this row).
Connected Apps list: Stripe Invoice Confidentiel, type Confidentiel, scopes api:read,api:write, status active
Setup → Connected Apps: Stripe Invoice Confidentiel, type Confidential, scopes api:read,api:write, status active (client id hidden).
  • Associated user: open the Details of Stripe Invoice Confidentiel and check that an associated user is set. That user must be able to read Invoice, Invoice_Line_Item, Contact, Product and the organisation, and update Invoice.

Step 8 — Open the plugin configuration

In Setup → Extensions → Stripe Invoice, open the plugin’s Details. Cirrus Shield shows the Stripe Invoice configuration page and passes it the Connected App’s credentials.

  • Expected: “The Cirrus Shield connection is configured.”, with the server (Production or Beta) and the organisation id. The same page is then used to enter the Stripe keys and the alert email (see Stripe configuration).
  • Always from the plugin: open this page from Cirrus Shield, never from a saved link. Cirrus Shield sends a new secret each time the page is displayed, and the app saves it each time.
Message shownCauseWhat to do
Open this page from the Stripe Invoice plugin in Cirrus Shield Setup.Page opened outside the plugin, or no active Connected App linkedCheck Step 7 (extension installed, Connected App active; otherwise contact Support), then reopen from the plugin
The Connected App needs an Associated User.The Connected App has no associated userSet the associated user in Connected Apps
Cirrus Shield did not accept these credentials.Secret rejected (regenerated, or app inactive)Reopen the page from the plugin; check that the plugin is installed
Cirrus Shield could not be reached.Cirrus Shield server unreachableTry again later

Stripe configuration

Once the prerequisites are in place, the administrator links the organisation to its own Stripe account: payments go straight to that account.

Step 9 — Stripe account and API keys

  1. Create an account on stripe.com if the organisation doesn’t have one: the money from paid invoices is paid into this account.
  2. In the Stripe dashboard, open Developers → API keys. Two keys are needed: the publishable key (pk_…) and the secret key (sk_…, or a restricted key rk_…).
  3. Test or live: to try it out, use the test mode keys (pk_test_…, sk_test_…): no real payment is taken. To take real payments, use the live keys (pk_live_…, sk_live_…).

Never send the secret key by email or in a ticket: enter it only on the configuration page (Step 10).

Step 10 — Enter the Stripe keys and the alert email

Open the Stripe Invoice extension’s details (Step 8). Under “The Cirrus Shield connection is configured.”, the page shows:

  • Stripe keys: the state of each key (set / not set) and, with test keys, the TEST MODE banner (no real payment).
  • Publishable key / Secret key: paste the two keys from Step 9. Leave a field empty to keep the key already saved. Keys are never shown again.
  • Alert email: the administrator’s address. An email is sent from noreply@cirrus-shield.com if Cirrus Shield stops accepting the extension’s credentials; customers then see a “payment temporarily unavailable” page.
Stripe Invoice configuration page: The Cirrus Shield connection is configured, Beta server, keys not set, webhook address, fields Publishable key, Secret key, Webhook signing secret, Alert email, Save button
The configuration page opened from the extension, before the keys are entered (“not set”); the webhook address ends with the organisation id.

Click Save: the page shows “Settings saved.”. To change keys later (for example from test to live), open the extension’s details again and repeat.

Step 11 — Create the Stripe webhook

The webhook records the payment in Cirrus Shield even if the customer closes their page before the end.

  1. On the configuration page, in Stripe webhook, copy the address shown: https://stripe.cirrus-shield.net/stripe/webhook/<organisation id>.
  2. In the Stripe dashboard, open Developers → Webhooks → Add endpoint, paste the address and select the event checkout.session.completed.
  3. Copy the endpoint’s signing secret (whsec_…), paste it into the Webhook signing secret field of the configuration page, then Save. The state changes to “Webhook signing secret: set”.

Create the webhook in the same mode as the keys: test mode with test keys, live mode with live keys.

Step 12 — Make a test payment

With test keys (TEST MODE banner), check the whole flow before switching to live keys:

  1. Create an Unpaid invoice with a contact, at least one line (a product with a default unit price) and a VAT rate.
  2. Open its payment link: the invoice shows the Total = Amount + VAT and the Pay with Card button.
  3. Pay with the Stripe test card 4242 4242 4242 4242, any future expiry date and any code.
  4. Check: “Payment received — thank you” page, invoice switched to Paid with its payment date, payment visible in the Stripe dashboard (test mode), and in Webhooks a successful delivery of checkout.session.completed.

What users and their customers then see is described in the Stripe Invoice user guide.

Was this article helpful to you? No Yes

How can we help?