Payment Claims

Customers' "I've paid by UPI" claims from payment links, to check against the bank and confirm or reject. A salesperson-scoped member sees and acts on their own customers' claims only.

GET/api/v1/payment-claims

List payment claims

Scope: collections.read

Newest first, up to 200 claims matching the status filter (the filter is applied before the cap, so ?status=PENDING returns every pending claim up to 200). reference is the UTR the customer entered. Timestamps are ISO strings; resolvedAt is null while PENDING. An organization whose plan has no Collections gets a 400 with the plan message (checked before the status filter).

Parameters

NameInTypeRequiredDescription
statusquerystringOptionalPENDING, CONFIRMED or REJECTED.

Example request

curl "https://invoice.avscorp.in/api/v1/payment-claims" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

JSON
{
  "id": "clx2clm001000000000000001",
  "customerId": "clx2cus001000000000000001",
  "customerName": "Acme Retailers",
  "invoiceId": "clx2inv001000000000000001",
  "invoiceNumber": "INV-2026-0102",
  "balanceDue": 11800,
  "reference": "412345678901",
  "amount": 11800,
  "status": "PENDING",
  "createdAt": "2026-10-03T10:00:00.000Z",
  "resolvedAt": null
}

Possible errors: unauthorized, insufficient_scope, forbidden, invalid_request, validation_error

POST/api/v1/payment-claims/{id}/confirm

Confirm a payment claim

Scope: collections.approve

Records one UPI payment received against the invoice (reference = UTR), capped at what's still due. A claim already handled, or one whose invoice has nothing left to pay, is a 400 with the reason. An organization whose plan has no Collections gets a 400 with the plan message.

Parameters

NameInTypeRequiredDescription
idpathstringRequiredPayment claim ID.

Example request

curl -X POST "https://invoice.avscorp.in/api/v1/payment-claims/clx2clm001000000000000001/confirm" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

JSON
{
  "message": "Payment of ₹11,800 recorded against INV-2026-0102.",
  "paymentId": "clx2pmt001000000000000001"
}

Possible errors: unauthorized, insufficient_scope, forbidden, not_found, invalid_request

POST/api/v1/payment-claims/{id}/reject

Reject a payment claim

Scope: collections.approve

Marks the claim rejected; nothing is recorded as paid. A claim already handled is a 400, as is an organization whose plan has no Collections (the plan message).

Parameters

NameInTypeRequiredDescription
idpathstringRequiredPayment claim ID.

Example request

curl -X POST "https://invoice.avscorp.in/api/v1/payment-claims/clx2clm001000000000000001/reject" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

JSON
{
  "rejected": true
}

Possible errors: unauthorized, insufficient_scope, forbidden, not_found, invalid_request