> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Collect payment

> How invoice payments are matched, and how to record, remove or void them.

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/slash-9da6c7e7/qM8oQYdlXzblh7FI/images/charts/invoice-collection-flow.light.svg?fit=max&auto=format&n=qM8oQYdlXzblh7FI&q=85&s=5ee8f1e0530f61edef7e6956522aa39d" alt="How to invoice a customer and collect payment" width="1320" height="1416" data-path="images/charts/invoice-collection-flow.light.svg" />

  <img className="hidden dark:block" src="https://mintcdn.com/slash-9da6c7e7/qM8oQYdlXzblh7FI/images/charts/invoice-collection-flow.dark.svg?fit=max&auto=format&n=qM8oQYdlXzblh7FI&q=85&s=b362b642ef98f5ba0ec33001a431beef" alt="How to invoice a customer and collect payment" width="1320" height="1416" data-path="images/charts/invoice-collection-flow.dark.svg" />
</Frame>

Payments made on the invoice's payment page are recorded on it
automatically. So are bank transfers into the invoice's account that Slash can
match to it, by the invoice number or reference in the payment details, or by
amount. Each payment shows up in the invoice's `payments`, and its `status`
and `amounts` follow.

## Payment instructions

To deliver an invoice yourself, or to show the customer where to send money,
[get its payment instructions](/api-reference/invoices/payment-instructions):
the bank details, and any crypto addresses, printed on its PDF and payment
page.

## Record a payment

When a deposit wasn't matched, or the customer paid outside Slash,
[record the payment](/api-reference/invoices/payments/add) on the sent
invoice:

* `transactionId` links a deposit, found with
  [List transactions](/api-reference/transactions/list). The payment is the
  deposit's amount, so a smaller deposit leaves the invoice `partially_paid`.
* `external` records money received elsewhere, such as a check, for the
  invoice's total.

```bash theme={null}
curl https://api.slash.com/v2/invoices/inv_2rj4l7hmrrrcv/payments \
  -X POST \
  -H "X-API-Key: $SLASH_API_KEY" \
  -H "x-legal-entity: $SLASH_LEGAL_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{ "transactionId": "agg_tx_2rj4l7hmrrrcv" }'
```

A recorded payment replaces any payments the invoice already has.

## Remove a payment

[Remove a payment](/api-reference/invoices/payments/remove) that landed on the
wrong invoice. The money isn't touched, and the invoice goes back to whatever
its remaining payments cover. Slash won't match that deposit to the invoice
again on its own.

## Void an invoice

[Void an invoice](/api-reference/invoices/void) that should no longer be paid.
Voiding a `paid` invoice also removes its payments; the money doesn't move. A
series' scheduled invoice can't
be voided on its own:
[skip it or cancel the series](/docs/v2/invoices/recurring-invoices#skip-or-cancel).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.