Zum Inhalt springen

Frankreich Schnellstart

Dieser Schnellstart führt Sie durch die Erstellung Ihres ersten signierten Fiscalbelegs mit fiskaly SIGN FR und erfüllt die drei wichtigsten französischen Fiscalpflichten: Signierung, Journalisierung und Archivierung.

  • Ein fiskaly-Konto (Registrierung unter hub.fiskaly.com)
  • Ein API-Schlüssel und -Secret für eine GROUP-Organisation in der TEST-Umgebung
  • Informationen zum Steuerpflichtigen: Firmenname, SIREN-Nummer, Adresse
  1. Authentifizieren

    curl -X POST https://test.api.fiskaly.com/tokens \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-02-03" \
      -H "X-Idempotency-Key: $(uuidgen)" \\
      -d '{
        "content": {
          "type": "API_KEY",
          "key": "YOUR_API_KEY",
          "secret": "YOUR_API_SECRET"
        }
      }'
  2. Organisation, Steuerpflichtigen, Standort und System erstellen

    Das Setup folgt demselben Muster wie SIGN IT — erstellen Sie eine UNIT-Organisation, dann einen Steuerpflichtigen, Standort und System und nehmen Sie jede Ressource in Betrieb:

    # UNIT-Organisation erstellen
    curl -X POST https://test.api.fiskaly.com/organizations \
      -H "Authorization: Bearer ${ACCESS_TOKEN}" \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-02-03" \
      -H "X-Idempotency-Key: $(uuidgen)" \
      -d '{"content": {"type": "UNIT", "name": "My French Company"}}'
    
    # Subject-API-Schlüssel für die UNIT erstellen, erneut authentifizieren, dann:
    
    # Steuerpflichtigen erstellen
    curl -X POST https://test.api.fiskaly.com/taxpayers \
      -H "Authorization: Bearer ${UNIT_TOKEN}" \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-02-03" \
      -H "X-Idempotency-Key: $(uuidgen)" \
      -d '{
        "content": {
          "type": "COMPANY",
          "name": {"legal": "Ma Societe SARL", "trade": "Ma Societe"},
          "address": {
            "line": {"type": "STREET_NUMBER", "street": "Rue de Rivoli", "number": "1"},
            "code": "75001", "city": "Paris", "country": "FR"
          },
          "fiscalization": {
            "type": "FR",
            "tax_id_number": "123456789",
            "credentials": {
              "type": "LNE",
              "properties": {"legal_form": "SARL", "naf_ape_code": "1071C", "social_capital": "50000"}
            }
          }
        }
      }'
    
    # Steuerpflichtigen in Betrieb nehmen, Standort erstellen + in Betrieb nehmen und System
    # (gleiches Muster wie SIGN IT — siehe vollständiges Integrationshandbuch)
  3. Ersten Datensatz erstellen

    # Teil A: Absicht
    curl -X POST https://test.api.fiskaly.com/records \
      -H "Authorization: Bearer ${UNIT_TOKEN}" \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-02-03" \
      -H "X-Idempotency-Key: $(uuidgen)" \
      -d '{
        "content": {
          "type": "INTENTION",
          "system": {"id": "YOUR_SYSTEM_ID"},
          "operation": {"type": "TRANSACTION"}
        }
      }'
    
    # Teil B: Transaktion
    curl -X POST https://test.api.fiskaly.com/records \
      -H "Authorization: Bearer ${UNIT_TOKEN}" \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-02-03" \
      -H "X-Idempotency-Key: $(uuidgen)" \
      -d '{
        "content": {
          "type": "TRANSACTION",
          "record": {"id": "INTENTION_ID"},
          "operation": {
            "type": "RECEIPT",
            "document": {
              "number": "0001",
              "total_vat": {
                "amount": "2.00",
                "exclusive": "10.00",
                "inclusive": "12.00"
              }
            },
            "entries": [{
              "type": "SALE",
              "details": {"concept": "GOOD"},
              "data": {
                "type": "ITEM",
                "text": "Product A",
                "unit": {
                  "quantity": "1.00",
                  "price": {"inclusive": "12.00", "exclusive": "10.00"}
                },
                "value": {"base": "10.00", "discount": "0.00"},
                "vat": {
                  "type": "VAT_RATE",
                  "code": "STANDARD",
                  "percentage": "20.00",
                  "exclusive": "10.00",
                  "inclusive": "12.00",
                  "amount": "2.00"
                }
              }
            }],
            "payments": [{"type": "CASH", "details": {"amount": "12.00"}}]
          }
        }
      }'

    Nach der Erstellung werden die Daten automatisch signiert, journalisiert und archiviert — erfüllt damit die drei wesentlichen NF525-Fiscalpflichten.