Record invoice payment
Apply a payment to an open invoice, optionally sending the customer a receipt.
POST https://cotlet.dev/api/v1/housecall-pro/invoices/{invoice_id}/payment
Applies a payment to one invoice, the same as Pay in the invoice preview: amount, payment method and an optional receipt email. A partial payment is allowed unless Progress Invoicing is on, and then the full amount is required. A card on file is used automatically and always notifies the customer. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_id string required | string | Invoice ID from list_invoices or get_job. |
| amount number required | number | Amount paid. |
| method string required | string | Payment method as listed in the Pay window, for example check or cash. |
| notify_customer boolean | boolean | Email a receipt. Default: false. A card on file always sends one. |
| receipt_email string | string | Address for the receipt. |
Request
curl -X POST https://cotlet.dev/api/v1/housecall-pro/invoices/invoice_8c41d2/payment \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"amount":1,"method":"method"}' result = client.call("housecall-pro", "record_invoice_payment", {"invoice_id":"invoice_8c41d2","amount":1,"method":"method"}) const result = await cotlet.call('housecall-pro', 'record_invoice_payment', {"invoice_id":"invoice_8c41d2","amount":1,"method":"method"}); cotlet call housecall-pro record_invoice_payment --data '{"invoice_id":"invoice_8c41d2","amount":1,"method":"method"}' Example response
{
"invoice_id": "inv_7c20be",
"payment_id": "pay_2c91",
"amount": 780,
"method": "check",
"status": "paid",
"receipt_sent": false
}