# Send an invoice

`POST https://morzepay.com/v1/invoices/{invoice_id}/send`

POST`/v1/invoices/{invoice_id}/send`

Emails the invoice as a PDF with a pay button, texts the payment link, or both. Drafts are finalized first. Send it again to remind your customer: they get the same link.

Permission`invoices:write`

### Headers

`Idempotency-Key`stringheader

8–80 letters, digits, `-` or `_`. Lets you retry safely: the same key and body return the first answer and never move money twice. See [Idempotency](https://morzepay.com/docs/api#idempotency).

### Path parameters

`invoice_id`stringrequired

The invoice, such as `inv_UfwyBh1W4Jfa6iG2u2AVT3`.

### Body

JSON, with `Content-Type: application/json`.

`via`arraydefault: ["email"]

`["email"]`, `["sms"]` or both.

### Returns

The invoice, with `delivery`: `true` for each way it was sent.

### Errors

| Status | Code | When |
| 409 | INVOICE_NOT_OPEN | It’s already paid or void. Paid invoices have a receipt instead. |
| 422 | NO_CUSTOMER_EMAIL | No email address to send it to. |
| 422 | NO_CUSTOMER_PHONE | No phone number to text it to. |

The common codes, such as `UNAUTHENTICATED` and `RATE_LIMITED`, can come from any endpoint. See [Errors](https://morzepay.com/docs/api#errors).



## Example request

```bash
curl -X POST "https://morzepay.com/v1/invoices/inv_UfwyBh1W4Jfa6iG2u2AVT3/send" \
  -H "Authorization: Bearer $MORZEPAY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "via": [
    "email",
    "sms"
  ]
}'
```

## Example response (200)

```json
{
  "success": true,
  "data": {
    "id": "inv_UfwyBh1W4Jfa6iG2u2AVT3",
    "object": "invoice",
    "livemode": true,
    "number": "NILE-0001",
    "status": "open",
    "past_due": false,
    "wallet_id": "wal_8fK2mQx7RtP4nVb9LcHs2w",
    "currency": "UGX",
    "customer": {
      "name": "Sarah Namuli",
      "email": "sarah@example.com",
      "phone": "+256772418905",
      "address": null
    },
    "lines": [
      {
        "description": "Website design (5 pages)",
        "quantity": 1,
        "unit_amount": "450000.00",
        "amount": "450000.00"
      },
      {
        "description": "Hosting, 12 months",
        "quantity": 2,
        "unit_amount": "75000.00",
        "amount": "150000.00"
      }
    ],
    "subtotal": "600000.00",
    "tax_percent": 18,
    "tax": "108000.00",
    "total": "708000.00",
    "amount_paid": "0.00",
    "amount_due": "708000.00",
    "fee_bearer": "wallet",
    "due_date": "2026-10-18",
    "memo": null,
    "footer": null,
    "reference": "order-1001",
    "metadata": null,
    "hosted_invoice_url": "https://morzepay.com/i/3f31d270b9829c826d28f0a4e68d7715",
    "invoice_pdf": "https://morzepay.com/i/3f31d270b9829c826d28f0a4e68d7715/pdf",
    "receipt_id": null,
    "receipt_url": null,
    "transaction_id": null,
    "paid_out_of_band": false,
    "created_at": "2026-10-04T10:00:12+03:00",
    "finalized_at": "2026-10-04T10:00:12+03:00",
    "sent_at": "2026-10-04T10:00:13+03:00",
    "paid_at": null,
    "voided_at": null,
    "delivery": {
      "email": true,
      "sms": true
    }
  }
}
```
