---
title: "Add a payment record to an invoice by a tracking number"
method: POST
path: "/invoices/Workorders/{trackingNumber}/Payment"
tags: ["Invoices"]
---

# Add a payment record to an invoice by a tracking number

`POST /invoices/Workorders/{trackingNumber}/Payment`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/invoices/Workorders/{trackingNumber}/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/Workorders/:trackingNumber/Payment/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a payment record for the invoice in the *Approved* status by specifying the tracking number of the work order the invoice was created for.
            <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.

## Path parameters

- `trackingNumber` 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`

The payment record is added to a particular invoice created for the specified work order.

## 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 2602 - Invalid WO Tracking Number
- `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)
