Skip to main content
A tradeline represents an ongoing payment obligation (rent, child support, loan, etc.) being reported to credit bureaus. Each tradeline belongs to a consumer and tracks a specific payment type.

Creating a tradeline

curl -X POST https://vvdufluovypptsnkihyv.supabase.co/functions/v1/tradelines \
  -H "x-api-key: sk_test_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "consumer_id": "d1ba6184-b708-4e76-91fc-85dd6443c890",
    "payment_type": "child_support",
    "account_opened_date": "2025-01-01",
    "payment_amount": 150000,
    "metro2_account_type": "installment"
  }'

Required fields

FieldTypeDescription
consumer_iduuidThe consumer this tradeline belongs to
payment_typeenumSee payment_type enum
account_opened_datestringYYYY-MM-DD — when the obligation began
payment_amountintegerMonthly expected payment in cents

Optional fields

FieldTypeDefaultDescription
payment_type_labelstringnullHuman-readable label
external_account_idstringnullYour internal account/case ID
payment_frequencyenummonthlySee payment_frequency enum
credit_limitintegernullIn cents (for revolving accounts)
highest_balanceintegernullIn cents
original_loan_amountintegernullIn cents (for installment accounts)
ecoa_codeenumindividualSee ecoa_code enum
metro2_account_typeenumrevolvingSee metro2_account_type enum
report_to_bureausstring[]All threeWhich bureaus to report to

Auto-computed fields

These fields are managed automatically and should not be set manually:
FieldDescription
account_statusDerived from the latest payment_status
current_balanceComputed from amount_due - amount_paid across periods
amount_past_dueSum of unpaid balances
payment_history24-char Metro 2 history string (newest first)
date_of_first_delinquencySet on first non-current payment
highest_balanceUpdated when balance exceeds previous high

Updating a tradeline

Only mutable fields can be updated via PATCH: Can change: payment_type_label, credit_limit, highest_balance, ecoa_code, report_to_bureaus, is_active, account_closed_date Cannot change: consumer_id, payment_type, account_opened_date

Closing a tradeline

DELETE /tradelines/:id closes the tradeline (it’s not a hard delete):
  • Sets account_status to "closed"
  • Sets is_active to false
  • Sets account_closed_date to today
The tradeline remains visible in list results and via GET, but will no longer accept new payments.
Closed tradelines cannot be re-opened. Create a new tradeline instead.

Authorization

The payment_type must be in the partner’s enabled_payment_types list (if configured). If not, you’ll get a 403 AUTHORIZATION_ERROR.