Skip to main content
Credit payments allow customers with a configured credit limit to pay on credit. The system checks eligibility in real time and filters credit lines from the fiscal payment pipeline.

Prerequisites

  • Customer assigned to the order with creditLimit > 0 in Odoo
  • Order mode is not return (credit is unavailable for refunds)

Eligibility check

The credit button appears in the payment screen when:
  1. The order has a partnerId (customer assigned)
  2. The customer’s creditLimit is greater than zero
  3. The order mode is not return
When the user taps the credit button, the frontend calls the credit-check API to verify eligibility server-side before adding a credit payment line.

API endpoint

POST /pos-api/v1/customers/credit-check
Checks whether a customer is eligible for credit payment at the requested amount.

Request

Response

Payment flow

1

Select customer

Assign a customer with credit limit to the order via the customer select button.
2

Open payment screen

The credit button appears alongside standard payment methods if the customer is eligible.
3

Tap credit

Calls /pos-api/v1/customers/credit-check to verify eligibility. If approved, a payment line is added with isCredit: true.
4

Complete payment

Credit lines can cover part or all of the balance. Mix with cash/card as needed.
5

Order submission

Credit lines are filtered out from statement_ids before sending to Odoo. Only non-credit payment lines create journal entries.

Implementation details

PaymentLine.isCredit

The PaymentLine type in types.ts includes an isCredit?: boolean flag. During order submission, lines with isCredit: true are excluded:

Customer model

The Customer interface in domain/customers/models.ts includes creditLimit?: number, populated from the bootstrap partners array and customer API responses.

Source files