---
title: "Add a payment to an invoice"
method: POST
path: "/invoices/{invoiceId}/Payment"
tags: ["Invoices"]
---

# Add a payment to an invoice

`POST /invoices/{invoiceId}/Payment`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/invoices/{invoiceId}/Payment`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/invoices/:invoiceId/Payment/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a payment record for the specified invoice in the *Approved* status.
            <br />Send this request [GET/odata/invoices](/swagger/ui/index?version=3#/Invoices/Invoices_GetInvoices) to get the invoice ID.
            <br />Learn [how subscribers can mark invoices as paid](https://servicechannel.atlassian.net/wiki/spaces/SCU/pages/621936646/Marking+Invoices+as+Paid) in ServiceChannel University.
            <br />**Example Request**
            
                POST /invoices/{invoiceId}/Payment
                {
                 "PaymentDate": "2021-06-10T07:40:47.881Z",
                 "PaymentNumber": "25469833",
                 "PaymentAmount": 850
                }

## Path parameters

- `invoiceId` integer, required

## Request body

- ServiceChannelServicesMessagingInvoicesInvoicePaymentRequest: Request object to add a payment to an invoice.
  - `PaymentDate` string, date-time: Date and time when the specified invoice is paid. Cannot be earlier than the invoice approval date.
  - `PaymentNumber` string: Order number of payment for the invoice.
  - `PaymentAmount` number, double: Amount you want to pay. Cannot exceed the invoice total amount. If it’s a credited invoice, a single payment is required with a minus before the payment amount.

## Response `204`

A payment record is added to the specified invoice.

## Other responses

- `400`: The request is not accepted due to bad syntax, missing parameters, insufficient data, etc. <br/> Error codes: 503 - Request is invalid 1178 - Invoice cannot be paid before invoice dates 1178 - Invoice has already paid 1178 - Only approved invoices may pay 1178 - Payment amount exceeds the actual amount 1178 - Payment amount should be more than zero 1178 - Pay not allowed for this subscriber
- `401`: The request is not authorized. <br/> Error codes: 504 - API call rejected by security permissions
- `403`: You are not authorized to request this resource, or the resource is unavailable for some reason. <br/> Error codes: 100 - User has no rights to perform this action

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
