> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# Post payment to past due invoice

POST https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/billing_payments
Content-Type: application/json

Posts a payment to a past due invoice.

This method can only be used if the `paymentAllowed` value for a past due invoice is true. This can be determined calling [Billing::listInvoicesPastDue](/docs/esign-rest-api/reference/billing/invoices/listpastdue/).

The response returns information for a single payment
if a payment ID was used in the endpoint, or a list of payments.
If the from date or to date queries or payment ID are not used,
the response returns payment information for the last 365 days.

If the request was for a single payment ID, the `nextUri` and `previousUri` properties are not returned.

Privileges required: account administrator

Reference: https://developers.docusign.com/docs/esign-rest-api/reference/billing/payments/create

## Authentication

- `Authorization` header (required) (prefixed with ` Bearer  `) — OAuth 2.0 access token (JWT or auth-code grant). Sent as `Authorization: Bearer <token>` on every request except `GET /v2.1` and `GET /service_information`, which are public discovery endpoints.

## Servers

- `https://demo.docusign.net/restapi` (Demo, default)
- `https://www.docusign.net/restapi` (Production)

## Request

### Path parameters

- `accountId` (string, required) — The external account number (int) or account ID Guid.

### Body (application/json)

This endpoint expects a billingPaymentRequest.

- `paymentAmount` (string, optional) — The payment amount for the past due invoices. This value must match the pastDueBalance value retrieved using Get Past Due Invoices.

## Response

### 201

Successful response.

- `billingPayments` (list of billingPayment, optional) — Reserved for Docusign.

## Errors

### 400 Bad Request Error

Error encountered.

- `errorCode` (string, optional) — The code associated with the error condition.
- `message` (string, optional) — A brief message describing the error condition.

## Types

### billingPayment

Contains information on a billing plan.

- `amount` (string, optional) — Reserved for Docusign.
- `invoiceId` (string, optional) — Reserved for Docusign.
- `paymentId` (string, optional) — The ID of the payment.

## Examples

**Request**

```json
{
  "paymentAmount": "sample string 1"
}
```

**Response**

```json
{
  "billingPayments": [
    {
      "amount": "sample string 1",
      "invoiceId": "sample string 2",
      "paymentId": "sample string 3"
    }
  ]
}
```