Skip to main content

Overview

The Credits & Payments module handles credit evaluations and payment tracking. It includes OCR-powered document processing, credit reference verification, and multi-status payment workflows.

Credit Applications

Submit and review customer credit requests

OCR Processing

Automatic data extraction from payment receipts

Payment Tracking

Monitor payment status from receipt to reconciliation

Bank References

Verify commercial and bank references

Credit Applications

Submitting an Application

Customers or sales staff can submit credit applications:
1

Access Credit Form

Navigate to Credits section and click “New Application”.
2

Enter Company Information

  • Customer name and ID (if existing customer)
  • Business name and legal representative
  • NIT (tax ID) and DPI (national ID)
  • Fiscal and business addresses
  • Office phone
3

Add Patent Numbers

  • Commerce patent number
  • Society patent number (if applicable)
4

Payment Manager Details

  • Contact name
  • Phone number for payment coordination
5

Upload Documents

  • Financial statement (required)
  • Bank statements (required)
  • Utility bills for address verification (required)
Supported formats: PDF, JPG, PNG. Maximum 10MB per file.
6

Add References

  • Commercial references: Other suppliers or vendors
  • Bank references: Banking relationships
7

Submit for Review

Application is sent to credit committee.

Credit Evaluation

The credit team reviews applications through multiple stages:
  1. Verify all required documents are uploaded
  2. Check NIT and DPI validity
  3. Confirm addresses match utility bills
  1. Contact commercial references
  2. Verify bank account status
  3. Check investigation bureau reports (if applicable)
  4. Document findings in notes fields:
    • commercialReferencesNote
    • investigationBureauNote
For large credit amounts, conduct an on-site visit and document in visitNote.
  • Approve: Set authorized amount and term days
  • Reject: Document rejection reason
Customer is notified via email of the decision.

Approving Credit

Once the evaluation is complete:
1

Open Application

View the credit application details.
2

Click 'Approve'

Opens approval form.
3

Set Credit Terms

{
  "authorizedAmount": 50000,
  "authorizedTermDays": 30
}
4

Confirm

Application status changes to “approved” and credit limit is active.

Rejecting Credit

If the application cannot be approved:
1

Click 'Reject'

In the application detail view.
2

Enter Reason

{
  "rejectionReason": "Insufficient commercial references"
}
3

Submit

Customer receives notification with the reason (if appropriate).

Payment Processing

Payment Lifecycle

Initial state when payment is recorded. Awaiting validation.
Payment verified against bank records. Ready for reconciliation.
Payment could not be validated. Requires customer follow-up.
Matched to specific invoices. Ready to apply.
Payment applied to customer account. Process complete.
ACH transfer in progress. Waiting for bank confirmation.

Recording a Payment

With Document (OCR)

1

Click 'New Payment'

In the Payments section.
2

Upload Receipt

Drop or select a payment receipt image or PDF.
3

OCR Preview

System extracts:
  • Amount
  • Currency
  • Bank code
  • Transaction date
  • Reference number
4

Review and Correct

Verify OCR results and make corrections if needed.
5

Select Customer

Choose the customer making the payment.
6

Add Notes (Optional)

Document any special conditions or partial payments.
7

Save

Payment is created with status “pendiente”.

Manual Entry

If no document is available:
Required fields
{
  "customerId": 123,
  "amount": 1500.00,
  "currency": "GTQ",
  "paymentMethod": "bank_transfer",
  "bankCode": "BAM",
  "reference": "TXN-2024-12345",
  "transactionDate": "2024-11-20",
  "notes": "Monthly service payment"
}

OCR Processing

The OCR preview endpoint allows testing document extraction:
POST /api/payments/ocr-preview
Content-Type: multipart/form-data

FormData:
  document: [File]

Response:
{
  "success": true,
  "extractedData": {
    "amount": 1500,
    "currency": "GTQ",
    "bankCode": "BAM",
    "reference": "TXN-2024-12345",
    "transactionDate": "2024-11-20",
    "confidence": {
      "amount": 0.95,
      "date": 0.88
    }
  }
}

Payment Status Updates

Update payment status as it moves through the workflow:
1

Open Payment

View payment details.
2

Change Status

Select new status from dropdown.
3

Add Reason (if applicable)

For rejections or holds, document the reason.
4

Save

Status change is logged with timestamp and user.
API call
PATCH /api/payments/:id/status
{
  "status": "validado",
  "reason": "Verified with bank statement"
}

Payment Statistics

View payment metrics for reporting:
  • Total payments by status
  • Amount processed by time period
  • Average processing time
  • Pending receipts (>24 hours)
  • Rejection rate
Get statistics
GET /api/payments/statistics?dateFrom=2024-11-01&dateTo=2024-11-30

Pending Receipts Alert

Identify payments awaiting receipts:
Shows payments that:
  • Were created >24 hours ago
  • Have status “pendiente”
  • Don’t have associated receipt documents
GET /api/payments/pending-receipts
This helps ensure all payments are properly documented.

Credit Statistics

Monitor credit portfolio health:
GET /api/credits/statistics
{
  "success": true,
  "statistics": {
    "totalApplications": 150,
    "pending": 12,
    "approved": 98,
    "rejected": 40,
    "totalAuthorizedCredit": 5000000,
    "averageTermDays": 30,
    "approvalRate": 0.71
  }
}

Best Practices

Always require all three document types (financial statement, bank statement, utility bills) before evaluation.
Contact at least 2 commercial references and confirm bank account is active.
OCR is powerful but not perfect. Always review extracted amounts and dates.
Update payment status within 24 hours to maintain accurate cash flow visibility.
Clearly document why credit applications or payments are rejected for future reference.

Customer Management

Manage customer credit limits and payment terms

Dashboard

Monitor payment and credit metrics

Build docs developers (and LLMs) love