These are explicit permissions: you must select them one by one in External integrations; existing integrations do not receive them automatically.
Pending documents
Includes processed invoices of type CCF, FC and FEX with an outstanding balance, from the business’s environment, excluding those invalidated by a related document.
Sorted from the oldest document to the most recent. Errors:
404 Branch not found; 422 validation.
Document currency. The amounts in the list (
total_amount, amount_paid, pending_amount, total_pending) and payments always remain in the base currency. The fields currency_code, base_currency_code, exchange_rate, foreign_total and foreign_balance are a reference added per row: for a document issued in a foreign currency (for example GTQ with rate 0.128) they show what the document amounted to and how much remains in its currency. For documents in the base currency, exchange_rate, foreign_total and foreign_balance come as null. Foreign-currency documents are issued with the API v2; this route remains on v1.0.128, total 1,130.00 GTQ = 144.64 USD, no partial payments):
Current / overdue summary
current adds up documents with days_overdue = 0; overdue adds up the overdue ones. branch_id is required: without it (or with one from another business) it responds 404 Branch not found.
Payment history
petty_cash_id indicates the petty cash that received the payment (if applicable) and cost_center_id the payment’s cost center.
Includes all of the document’s payments in date order, also reversed ones (status other than applied). Errors: 404 Invoice not found (nonexistent or belonging to another business).
Register payment
- By document (allocations)
- Automatic by customer
You specify each invoice and the amount to apply to it.
Rules
- All or nothing: payments are applied in a single transaction. If one document fails, none is applied.
- Each document’s amount cannot exceed its outstanding balance; when it is fully covered it becomes
payed, otherwisepartial. - If you send
bank_id, the bank must belong to the business; the deposit is recorded. - If you send
petty_cash_id, the payment enters that petty cash: an income is recorded that increases its balance and, when posted, the journal entry debits the petty cash’s ledger account. Bank and petty cash are mutually exclusive. cost_center_idis stored on each payment for reports; when posted, it only carries over to income statement account lines (bank, cash and receivables lines have no center).- We recommend sending
Idempotency-Keyso the payment is not duplicated if you retry. - Registered payments are ready to be posted in Process documents (type Customer payments).
201 response
Reverse payment
receivables.payments permission. The payment_id is the one returned when the payment was registered or the history’s id.
200 response
- The payment is left with
status: "reversed"and no longer counts toward the balance; the invoice’spayment_statusis recalculated (pending,partialorpayed). - The bank deposit that the payment generated is offset or, if it entered a petty cash, an adjustment is recorded that deducts that amount from its balance.
accountingindicates what happened to the payment’s journal entry (see Payment reversal and its journal entry):none(not yet posted;journal_entry_id,entry_codeandstatusarenull),deleted(the entry was in Draft and was markedELIMINADA) orreversed(a mirror entry was created with referencepayment_received_reversal, dated today;statusaccording to the corresponding Status when processing setting).- Without
reason,reversal_reasonisPayment reversed. - We recommend sending
Idempotency-Key.