# Invoice payments on Terminal

> How to accept invoice-style payments on a Paystack Terminal.

## Create or identify the customer

1. Create a customer record before creating the invoice.
2. Reuse an existing customer if one already exists.
3. Store the returned `customer_code` and `id` after customer creation.

## Create the invoice

1. Create the invoice with the Payment Request API.
2. Choose a **simple invoice** when you only need to collect a total amount.
3. Choose a **professional invoice** when you want the invoice to include line items, quantities, and unit prices.
4. Save the returned `offline_reference` because it identifies the invoice when the customer pays later.

## Share the payment identifier

1. Send the customer the `offline_reference` by the channel that fits your flow.
2. Present it either as plain text or as a QR code.
3. If you used a valid customer email, Paystack also emails the invoice automatically.

## Accept payment on the terminal

1. Open the invoice payment flow on the terminal.
2. Enter the `offline_reference` manually or scan the QR code that represents it.
3. Let the customer review the invoice details shown on the terminal.
4. Complete payment on the terminal once the customer confirms the invoice.

## Listen for payment updates

1. Configure your webhook URL before going live.
2. Listen for:

  - `paymentrequest.pending`
  - `paymentrequest.success`
  - `charge.success`
  - `invoice.payment_failed`
3. Reconcile the invoice in your system when the successful webhook arrives.

Use invoice payments when payment happens after order placement or fulfillment — pay-on-delivery, collect-on-delivery, vending, logistics, and other deferred-payment use cases. This approach keeps reconciliation tied to the original payment request instead of requiring manual matching when the customer pays later.
