Payment API Overview

Collect insurance premiums via payment links, direct debits, and embedded bank linking

💳 Payment API Overview

The Audit1 Payment API lets you collect insurance premiums from insured employers through multiple payment channels — all from a single set of API credentials.

📘

Who is this for?

Partners, carriers, and platforms (like billing systems) that want to programmatically collect premiums, down payments, and installments on behalf of their insureds.


Payment Methods

MethodHow It WorksBest For
Payment LinksGenerate a secure checkout URL. Send to the insured via email.Down payments, late payments, one-time charges
SubscriptionsAuto-charge on a recurring schedule.Monthly installments
Direct DebitsPull funds directly from a linked bank account.PayGo collections, recurring premiums
Bank LinkingEmbed bank account verification in your UI.Connecting insured bank accounts securely

How It Works

1. Authenticate with your API key
2. Create a payment (link, subscription, or direct debit)
3. Insured pays (clicks link, or bank debited automatically)
4. Receive webhook notification when payment completes
5. View commissions earned

Flow

Your Platform
     │
     ▼
 Audit1 Payment API  ←  Your API Key (scoped to your carriers/employers)
     │
     ├── Payment Links   →  Hosted checkout page
     ├── Subscriptions   →  Recurring billing
     ├── Direct Debits   →  Automated bank transfers
     └── Bank Linking    →  Secure account verification

Base URL

https://payments.audit1.com/api/v1

Both sandbox and production use the same URL. Your API key prefix determines the environment.


Authentication

Same authentication as the Developer API — send your Client ID and Client Secret as headers with every request.

X-Client-ID: audit1_test_cli_a1b2c3d4...
X-Client-Secret: audit1_test_sec_f6e5d4c3...
Content-Type: application/json

Your API key must have payment scope (scope: "payments" or scope: "all"). Keys with only payroll scope are rejected.

See Authentication for full details on key management, environments, and HMAC signing.


Tenant Scoping

Your API key is scoped to specific carriers and employers. You can only create payments and view records for entities within your scope.

  • Requests for carriers/employers outside your scope return 403 Forbidden
  • Empty scope = access to all (typically for platform-level integrations)

Response Format

All responses use a consistent envelope:

{
  "ok": true,
  "data": { ... },
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 123,
    "total_pages": 3
  }
}

Errors:

{
  "ok": false,
  "error": "Bad Request",
  "message": "Required fields: employer_id, carrier_id, policy_id"
}

Rate Limiting

Default
Limit100 requests/minute per API key
HeadersX-RateLimit-Limit, X-RateLimit-Remaining, Retry-After
Exceeded429 Too Many Requests with Retry-After seconds

Custom rate limits can be configured per partner.


Quick Example: Create a Down Payment Link

curl -X POST https://payments.audit1.com/api/v1/payment-links \
  -H "X-Client-ID: audit1_test_cli_your_id_here" \
  -H "X-Client-Secret: audit1_test_sec_your_secret_here" \
  -H "Content-Type: application/json" \
  -d '{
    "employer_id": "681xyz789abc123456789012",
    "carrier_id": "680abc456def789012345678",
    "policy_id": "682def789ghi012345678901",
    "amount_cents": 150000,
    "payment_type": "down_payment",
    "customer": {
      "name": "ACME Corp",
      "email": "[email protected]"
    }
  }'

Response (201 Created)

{
  "ok": true,
  "data": {
    "id": "683abc123def456789012345",
    "url": "https://pay.audit1.com/c/cs_a1b2c3...",
    "amount_cents": 150000,
    "status": "active",
    "expires_at": "2026-04-21T00:00:00.000Z"
  }
}

Send the url to your insured. When they pay, you receive a payment.completed webhook.


Next Steps

GuideWhat you'll learn
💳Payment Links & SubscriptionsCreate, list, cancel, and refund payments
🏦Direct DebitsInitiate automated bank debits and batch collections
🔗Bank Accounts & LinkingLink bank accounts and manage debit credentials
🔔Payment WebhooksReceive real-time payment event notifications