Match a transaction to an invoice
Link a bank transaction to a customer invoice as its payment.
POST https://cotlet.dev/api/v1/pennylane/invoices/{invoice_id}/transactions/{transaction_id}/match
write Confirm
Matches a bank transaction to a customer invoice, which Pennylane uses for payments made outside it, such as a bank transfer. The invoice's remaining amount and status change after the match. Check the amount first: this records a payment against the invoice, so it asks for your OK. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_id integer required | integer | Invoice ID from list_customer_invoices or create_customer_invoice. |
| transaction_id integer required | integer | Transaction ID from list_transactions. |
Request
curl -X POST https://cotlet.dev/api/v1/pennylane/invoices/1/transactions/1/match \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("pennylane", "match_transaction", {"invoice_id":1,"transaction_id":1}) const result = await cotlet.call('pennylane', 'match_transaction', {"invoice_id":1,"transaction_id":1}); cotlet call pennylane match_transaction --data '{"invoice_id":1,"transaction_id":1}' Example response
{
"invoice_id": 118277,
"transaction_id": 5529874,
"matched": true,
"remaining_amount_with_tax": "0.00"
}