Guides

How to Add E-Signatures to Your Databutton App

Alt text: "Dark background featuring two app icons with colorful arrows between them. Text reads 'E-Signatures to Your Databutton App,' suggesting app integration."

Databutton lets you build full-stack web apps by describing what you want to an AI agent. It generates Python backends (FastAPI) with either Streamlit or React frontends, and handles deployment with a single click. When your app needs to send contracts, collect signatures, or close deals with legally binding documents, Firma.dev plugs directly into Databutton's backend architecture.

How it works (the short version)

Databutton apps have a clean separation between frontend and backend. Your API key goes into Databutton's Secrets panel (never exposed to the browser), and you create a Python HTTP endpoint that calls the Firma.dev API. Your frontend, whether that's Streamlit or React, calls that endpoint when a user triggers a signing action. The signer recieves the document via email or directly in your app through an embedded iframe.

When the document is signed, Firma.dev sends a webhook to another Databutton endpoint that updates your app's state. You can also ask Databutton's AI chat to wire all of this up for you by describing the flow in plain English.

Under the hood

For developers who want to understand the architecture before jumping into the docs:

The integration has three parts. First, a FastAPI endpoint (/send-signing-request) that reads your Firma.dev API key from Databutton's secrets, calls the create-and-send endpoint with template and recipient details, and returns the signing request ID. The endpoint uses Pydantic models for input validation, so you get type checking out of the box.

Second, a webhook handler (/firma-webhook) that listens for events like signing_request.completed and updates your app's database or triggers the next step in your workflow using Databutton's built-in storage.

Third, an optional embedded signing component. Once you have the recipient's signing_request_user_id from the API response, you render Firma.dev's signing experience in an iframe. In Streamlit that's st.components.v1.iframe(); in React it's a standard iframe component. The signer completes the document without leaving your app.

You can also connect Firma.dev's Docs MCP server to your development tools, so Databutton's AI assistant can reference the full API documentation while generating integration code for you.

What you get

Once connected, your Databutton app can send documents for signature from any Firma.dev template, embed signing directly in your UI, track real-time status updates through webhooks, and trigger downstream workflows when documents are completed.

Every signature is legally binding under the ESIGN Act, UETA, and eIDAS (SES and AdES). All document data is stored in the EU on AWS infrastructure in Paris and Stockholm.

If you're building a multi-tenant product, Firma.dev's Customer Workspaces give each of your customers their own isolated signing environment with separate templates and usage tracking.

Pricing that makes sense for app builders

Databutton's credit-based pricing means you only pay for what you use. Firma.dev works the same way: €0.029 (roughly 3 cents USD) per envelope, with no monthly fees, no per-user charges, and no contracts. You ship the signing feature and only pay when envelopes actually get sent.

Most e-signature providers charge $25 to $50 per user per month before you send a single document. If you're building an app where signing is one feature among many, that pricing model doesn't make sense. With Firma.dev, you can launch with e-signatures on day one without a seperate SaaS subscription eating into your margins.

Get started

The full Databutton integration guide on docs.firma.dev walks through every step: storing your API key, creating the backend endpoint, connecting your frontend, and handling webhooks. If you've built a Databutton backend function before, you'll have signing requests running in under an hour.

Get started with Firma.dev for free, no credit card required.

  1. Heading

Background Image

Ready to add e-signatures to your application?

Get started for free. No credit card required. Pay only €0.029 per envelope when you're ready to go live.

Background Image

Ready to add e-signatures to your application?

Get started for free. No credit card required. Pay only €0.029 per envelope when you're ready to go live.

Background Image

Ready to add e-signatures to your application?

Get started for free. No credit card required. Pay only €0.029 per envelope when you're ready to go live.