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

Parameters: match_transaction
NameTypeDescription
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
curl -X POST https://cotlet.dev/api/v1/pennylane/invoices/1/transactions/1/match \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("pennylane", "match_transaction", {"invoice_id":1,"transaction_id":1})
Node.js
const result = await cotlet.call('pennylane', 'match_transaction', {"invoice_id":1,"transaction_id":1});
CLI
cotlet call pennylane match_transaction --data '{"invoice_id":1,"transaction_id":1}'

Example response

JSON

{
  "invoice_id": 118277,
  "transaction_id": 5529874,
  "matched": true,
  "remaining_amount_with_tax": "0.00"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.