A charge closes the billing loop for a restaurant order (pedido). When a charge is created, the API looks up the referenced company, product, and pedido, snapshots the product data, records the payment method and paid status, and automatically derivesDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/MultiSas/llms.txt
Use this file to discover all available pages before exploring further.
price_charge from the product’s current price. Two endpoints are available: create a charge and list all charges for a company with pagination.
All charge endpoints require two authentication middlewares.
TokenAny
validates the bearer token and attaches the user to the request. TokenAuthorize('Admin', 'Super Admin')
restricts access to users whose role is either Admin or Super Admin.
Include the token in every request as token-access: Bearer $TOKEN.Create a Charge
POST /api/charge/:company_id/:product_id/:pedido_id
Creates a new charge record that links a company, a product, and an existing order. The price_charge is automatically set to the product’s price_product at the time of the request.
Path Parameters
The MongoDB ObjectId of the owning company.
The MongoDB ObjectId of the product being charged.
The MongoDB ObjectId of the order (pedido) this charge is associated with.
Body Parameters
Payment method for this charge. Must be one of:
"Efectivo", "Transferencia", "Tarjeta", or "".true if the charge has been paid, false if it is still pending.Response Fields
Human-readable result message.
true on success, false on failure.The newly created charge document.
Example
List Charges
GET /api/charge/:company_id
Returns a paginated list of all charges for the specified company, sorted by most recently created.
Path Parameters
The MongoDB ObjectId of the company whose charges to retrieve.
Response Fields
Human-readable result message.
true on success.Array of charge documents for the company.
Pagination metadata.