Invoices

Record an outside payment

POST/v1/invoices/{invoice_id}/pay

Records a payment you received outside Morzepay, such as cash or a bank transfer. The invoice becomes paid and a receipt is issued. Your wallet balance doesn’t change.

Customers pay open invoices themselves on hosted_invoice_url; you don’t call this for those.

Permissioninvoices:write

Headers#

Idempotency-Keystringheader

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.

Path parameters#

invoice_idstringrequired

The invoice, such as inv_UfwyBh1W4Jfa6iG2u2AVT3.

Body#

JSON, with Content-Type: application/json.

paid_out_of_bandbooleanrequired

Must be true.

notestring

How it was paid, up to 255 characters, such as Cash at the shop.

email_receiptboolean

true emails the receipt to the customer.

Returns#

The paid invoice, with receipt_id, receipt_url and payments.

Errors#

StatusCodeWhen
409INVALID_INVOICE_STATUSIt isn’t open or uncollectible.

The common codes, such as UNAUTHENTICATED and RATE_LIMITED, can come from any endpoint. See Errors.