Collection Cases#

A Collection Case represents a debt recovery action submitted to a collection partner. Cases track the full lifecycle from submission through resolution.

The Collection Case object#

AttributeTypeDescription
idstringUUID identifier with dc_ prefix
objectstringAlways "collection_case"
referencestringHuman-readable reference (e.g., Q8OAXF3W)
statusenumpending_verification, needs_details, active, paused, closed
close_codestringResolution reason (when closed)
amount_to_recoverintegerOriginal debt amount in smallest currency unit
remainderintegerOutstanding balance
currencystringISO 4217 currency code
debtorobjectDebtor information
debtor.typeenumcompany or private
debtor.namestringDebtor's name
debtor.contact_personstringContact person (for companies)
debtor.emailstringDebtor's email
debtor.phonestringDebtor's phone
debtor.addressobjectDebtor's address
debtor.countrystringISO 3166-1 alpha-2 country code
collection_partnerobjectAssigned collection partner
collection_partner.namestringPartner name
collection_partner.emailstringPartner email
collection_partner.phonestringPartner phone
collection_partner.sitestringPartner website
creditor_referencestringYour internal reference
due_datetimestampOriginal payment due date
is_testbooleanTest mode flag
metadatahashKey-value pairs
createdtimestampTime at which the object was created
{
  "id": "dc_a1b2c3d4",
  "object": "collection_case",
  "reference": "Q8OAXF3W",
  "status": "active",
  "close_code": null,
  "amount_to_recover": 360000,
  "remainder": 360000,
  "currency": "eur",
  "debtor": {
    "type": "private",
    "name": "John Smith",
    "email": "john.smith@example.com",
    "phone": "+49 170 1234567",
    "address": {
      "line1": "Friedrichstraße 123",
      "city": "Berlin",
      "postal_code": "10117",
      "country": "DE"
    },
    "country": "DE"
  },
  "collection_partner": {
    "name": "CollectMax GmbH",
    "email": "cases@collectmax.de",
    "phone": "+49 30 1234567",
    "site": "https://collectmax.de"
  },
  "creditor_reference": "INV-2024-0892",
  "due_date": 1730419200,
  "is_test": false,
  "metadata": {
    "property_id": "prop_456",
    "tenant_id": "ten_789"
  },
  "created": 1706140800
}

Create a Collection Case#

POST /v1/collection_cases

ParameterTypeRequiredDescription
amount_to_recoverintegerYesDebt amount in smallest currency unit
currencystringYesISO 4217 currency code
debtorobjectYesDebtor information
debtor.typestringYescompany or private
debtor.namestringYesDebtor's full name
debtor.emailstringNoDebtor's email
debtor.phonestringNoDebtor's phone number
debtor.addressobjectYesDebtor's address
debtor.countrystringYesCountry code
creditor_referencestringNoYour internal reference
due_datestringYesOriginal due date (YYYY-MM-DD)
metadatahashNoKey-value pairs
curl https://api.casapay.com/v1/collection_cases \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Content-Type: application/json" \
  -d '{
    "amount_to_recover": 360000,
    "currency": "eur",
    "debtor": {
      "type": "private",
      "name": "John Smith",
      "email": "john.smith@example.com",
      "phone": "+49 170 1234567",
      "address": {
        "line1": "Friedrichstraße 123",
        "city": "Berlin",
        "postal_code": "10117",
        "country": "DE"
      }
    },
    "creditor_reference": "INV-2024-0892",
    "due_date": "2024-11-01"
  }'
{
  "id": "dc_a1b2c3d4",
  "object": "collection_case",
  "reference": "Q8OAXF3W",
  "status": "active",
  "amount_to_recover": 360000,
  "remainder": 360000,
  "currency": "eur",
  "created": 1706140800
}

Retrieve a Collection Case#

Retrieve by ID or by human-readable reference.

GET /v1/collection_cases/:id

GET /v1/collection_cases/ref/:reference

curl https://api.casapay.com/v1/collection_cases/dc_a1b2c3d4 \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"

# Or by reference
curl https://api.casapay.com/v1/collection_cases/ref/Q8OAXF3W \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"

List Collection Cases#

GET /v1/collection_cases

ParameterTypeDescription
statusstringFilter by status
debtor_countrystringFilter by debtor country
debtor_typestringFilter by company or private
created[gte]timestampCreated on or after
created[lte]timestampCreated on or before
limitintegerNumber of objects (1–100)
starting_afterstringCursor for pagination
curl "https://api.casapay.com/v1/collection_cases?status=active&limit=10" \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"

Upload a File to a Case#

POST /v1/collection_cases/:id/files

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefileYesFile to upload
document_typestringYesoriginal_invoice, debtor_documents, creditor_documents, demand_letter, miscellaneous
descriptionstringNoFile description
curl https://api.casapay.com/v1/collection_cases/dc_a1b2c3d4/files \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc" \
  -F "file=@invoice.pdf" \
  -F "document_type=original_invoice" \
  -F "description=Original unpaid invoice"