Skip to main content

Step 1: Create Test Customer

customer_data = {
    "external_id": "test-customer-1",
    "name": "Test Customer Ltd",
    "email": "[email protected]"
}

response = requests.post(
    f"https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/customers/",
    headers={"Authorization": f"Bearer {business_token}"},
    json=customer_data
)

customer_id = response.json()["id"]

Step 2: Create Test Invoice

invoice_data = {
    "external_id": "test-invoice-1",
    "customer_id": customer_id,
    "invoice_number": "INV-001",
    "sent_at": "2025-01-15",
    "due_at": "2025-02-15",
    "currency": "GBP",
    "line_items": [
        {
            "description": "Test Service",
            "quantity": 1,
            "unit_price_cents": 100000,  # £1,000
            "account_code": "4000"  # Revenue account
        }
    ]
}

response = requests.post(
    f"https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/invoices/",
    headers={"Authorization": f"Bearer {business_token}"},
    json=invoice_data
)

invoice = response.json()

Step 3: Check Accounting UI

Open the embedded Thred UI in your platform: What to verify:
  • Invoice appears in AR tab
  • Amount shows as £1,000
  • Status is “sent”
  • Customer name is correct

Integration Complete

If the invoice appears in the AR tab, your integration works.

Next Steps

Now you’re ready to:
  • Import real business activity
  • Connect bank accounts
  • Configure menu visibility
  • Go live with production credentials
Continue reading to learn about importing business activity.