Admin Sales: Transactions
Record a payment (create transaction)
Records a manual payment against an invoice — the admin Sales → Transactions "Record Payment" action. Inserts a paid order_transactions row; when the cumulative payments reach the invoice grand total it marks the invoice paid and advances the order to completed (if a shipment exists) or processing. Returns the created transaction. Requires sales.transactions.view permission. Errors: 422 (missing/non-numeric fields), 400 (unknown invoice, invoice already paid, amount ≤ 0, or amount would exceed the invoice grand total).
post/transactions
Request
- Base URLhttp://localhost:8000/api/admin
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"invoiceId": 12,
"paymentMethod": "cashondelivery",
"amount": 99.99
}Response
The created transaction.
Changes
No recorded changes to this operation across all 8 revisions of this API.