Docs

Comprehensive guides and references for FiraForm.

Browse docs

Integrations & Payments API

Manage webhook, Sendy, and Turnstile integrations, per-form payment add-ons, and team payment credentials.

Authenticated endpoints for form integrations, per-form payment add-ons, and team payment credentials.

All endpoints use https://a.firaform.com/api and a Sanctum bearer token. See the API Reference for authentication, roles, and error shapes.

Form integrations

The live model is Integration. Supported types: webhook, sendy, turnstile.

GET /api/forms/{form_id}/integrations

Owner or admin. Paginated. Config is redacted:

{
  "data": [
    {
      "id": 6,
      "type": "sendy",
      "name": "Newsletter",
      "is_enabled": true,
      "last_triggered_at": null,
      "error_count": 0,
      "config": {
        "installation_url": "https://sendy.example.com",
        "list_id": "abc123",
        "email_field": "email",
        "name_field": "name",
        "custom_fields": null,
        "gdpr": false,
        "silent": false,
        "has_api_key": true
      }
    }
  ],
  "meta": { "current_page": 1, "last_page": 1, "per_page": 15, "total": 1 }
}

Secrets are never returned. Webhook config returns has_headers and header_names, not header values.

POST /api/forms/{form_id}/integrations

Owner or admin.

Webhook:

{
  "type": "webhook",
  "name": "Order webhook",
  "url": "https://example.com/webhooks/orders",
  "headers": [{ "key": "Authorization", "value": "Bearer secret" }],
  "retries": 3,
  "timeout": 10,
  "is_enabled": true
}

Webhook URLs to localhost or private IPs are rejected.

Sendy:

{
  "type": "sendy",
  "name": "Newsletter",
  "installation_url": "https://sendy.example.com",
  "api_key": "sendy-secret",
  "list_id": "abc123",
  "email_field": "email",
  "name_field": "name",
  "gdpr": false,
  "silent": false
}

Turnstile:

{
  "type": "turnstile",
  "name": "Turnstile",
  "site_key": "site-key",
  "secret_key": "turnstile-secret",
  "theme": "light"
}

Returns 201 with the redacted resource.

PUT /api/forms/{form_id}/integrations/{integration}

Updates the integration. Omit a secret to keep the stored one.

DELETE /api/forms/{form_id}/integrations/{integration}

{ "message": "Integration deleted successfully." }

Integrations from another form return 404.

Payment integrations (per form)

GET /api/forms/{form_id}/payment-integrations

Owner or admin. Returns paginated provider settings. No credentials are returned.

{
  "data": [
    {
      "provider": "paypal",
      "environment": "sandbox",
      "is_enabled": true,
      "amount_source": null,
      "fixed_amount": null,
      "amount_field": null,
      "currency": null,
      "payer_email_field": null,
      "payer_name_field": null,
      "success_redirect_url": null,
      "cancel_redirect_url": null,
      "metadata_mappings": null,
      "last_triggered_at": null
    }
  ],
  "meta": { "current_page": 1, "last_page": 1, "per_page": 15, "total": 1 }
}

PUT /api/forms/{form_id}/payment-integrations/{provider}

provider: paypal, securepay, bayarcash, chip, billplz, or stripe.

{
  "environment": "sandbox",
  "is_enabled": true,
  "amount_source": "field",
  "amount_field": "_ff_amount",
  "currency": "USD"
}
  • Requires the owner’s payments feature (403 otherwise).
  • Requires an enabled team-level provider setting for that environment (422 otherwise).

Team payment settings

GET /api/teams/{team}/payment-settings

Owner or admin. Paginated. Returns provider, environment, is_enabled, is_configured, default_currency, and webhook_url where the dashboard shows one. Credentials are never returned.

{
  "data": [
    {
      "provider": "paypal",
      "environment": "sandbox",
      "is_enabled": true,
      "is_configured": true,
      "default_currency": "USD",
      "webhook_url": "https://a.firaform.com/payments/paypal/webhook/TOKEN"
    }
  ],
  "meta": { "current_page": 1, "last_page": 1, "per_page": 15, "total": 1 }
}

PUT /api/teams/{team}/payment-settings/{provider}

Owner or admin. Credentials are write-only. Omitted or empty credential values keep the stored value.

PayPal:

{
  "environment": "sandbox",
  "is_enabled": true,
  "credentials": {
    "client_id": "client-id",
    "client_secret": "client-secret",
    "webhook_id": "webhook-id",
    "default_currency": "USD"
  }
}

Other providers use their dashboard credential fields:

  • securepay: api_uid, auth_token, checksum_token, default_currency
  • bayarcash: portal_key, api_secret_key, personal_access_token, default_currency, payment_channel
  • chip: api_key, brand_id, default_currency (the API verifies the key and stores the public key)
  • billplz: api_key, collection_id, x_signature_key
  • stripe: publishable_key, secret_key, webhook_secret, default_currency