---
title: "Record an external payment for an invoice"
method: POST
path: "/billing/invoices/{invoiceId}/recordpayment"
---

# Record an external payment for an invoice

`POST /billing/invoices/{invoiceId}/recordpayment`

## Request

- Base URL: `https://api-sandbox.ezypay.com/v2`
- URL: `https://api-sandbox.ezypay.com/v2/billing/invoices/{invoiceId}/recordpayment`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://identity-sandbox.ezypay.com/token`

Record a payment from a customer that occurred outside the Ezypay billing system (for example an over-the-counter cash transaction) and mark the invoice as paid. Only applicable for invoices with status `past_due`.

## Path parameters

- `invoiceId` string, required

## Headers

- `merchant` string, required

## Request body

- object
  - `paymentMethodType` string: The external payment method used by the customer to pay for the invoice. Supported values are `cash`, `cheque`, `card`, `others` and `bank_transfer`.

## Response `200`

200

- object
  - `id` string
  - `documentNumber` string
  - `date` string
  - `dueDate` string
  - `scheduledPaymentDate` unknown
  - `status` string
  - `memo` unknown
  - `items` object[]
    - `description` string
    - `amount` object
      - `currency` string
      - `value` integer
      - `type` unknown
    - `tax` object
      - `rate` integer
    - `id` string
    - `type` string
    - `discounted` object
      - `currency` string
      - `value` integer
      - `type` unknown
    - `accountingCode` unknown
  - `amount` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `amountWithoutDiscount` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `totalDiscounted` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `totalRefunded` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `totalTax` object
    - `currency` string
    - `value` integer
    - `type` unknown
  - `customerId` string
  - `subscriptionId` unknown
  - `subscriptionName` unknown
  - `paymentMethodToken` string
  - `autoPayment` boolean
  - `createdOn` string

## Other responses

- `400`: 400

## Changes

- **2026-11-03** `924be4030f56`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ezypay/apis/vault/changes/billing/invoices/:invoiceId/recordpayment/post.md)

---

[API](https://skmtc.dev/ezypay/apis/vault.md) - [All operations](https://skmtc.dev/ezypay/apis/vault/llms.txt) - [OpenAPI document](https://skmtc.dev/ezypay/apis/vault/revisions/924be4030f56?raw)
