---
title: Process Payment
slug: process-payment
docTags: 
createdAt: 2026-02-13T04:24:47.814Z
---

# Process Payment

## Overview

This section explains how to record or collect payments for invoices using the Nue API. The payment and collection process in Nue includes collecting payments (full or partial) against invoices, applying or unapplying credit memos to adjust balances, issuing full or partial refunds for paid invoices, and writing off invoices deemed uncollectible, with each action updating the invoice’s payment status and ensuring accurate financial tracking.

## Pay Invoices

In Nue, you can perform payments on invoices through the Nue API ( [Pay Invoices](https://api-docs.nue.io/pay-invoices) ). Payments can be applied in full or partially, and each payment updates the invoice’s payment status (e.g., to "Paid" or "Partially Paid") and creates a payment application record for tracking and reconciliation.

```curl
curl -X POST "https://api.nue.io/billing/invoices:pay" \
  -H "nue-api-key: {yourApiKey}" \
  -H "content-type: application/json" \
  -H "accept: application/json" \
  -d '{
    "payInvoices": [
      {
        "invoiceId": "c52f7158-b164-44fa-93c5-e4b16420c371",
        "customerId": "001KS00000DVz1aYAD",
        "transactionAmount": 226.33,
        "paymentSource": "Nue",
        "paymentMethod": "CreditCard"
      }
    ]
  }'
```

## Apply Credit Memos

To reduce the outstanding balance of an invoice, apply a credit memo ( [Apply Credit Memos](https://api-docs.nue.io/apply-credit-memos) ) —either fully or partially—which adjusts the invoice’s amount due and updates its payment status (e.g., to "Applied" or "Partially Applied"). If necessary, you can also unapply a credit memo from an invoice, restore the invoice balance, and make it payable again.

```curl
curl -X POST "https://api.nue.io/billing/credit-memos:apply" \
  -H "nue-api-key: {yourApiKey}" \
  -H "content-type: application/json" \
  -H "accept: application/json" \
  -d '{
    "appliedInvoices": [
      {
        "invoiceId": "de42a9fb-f952-40ca-be20-f28b412623e3",
        "creditMemoId": "50103ccc-3baf-4f9a-a7f4-ebfbbc76f614",
        "transactionAmount": 300
      }
    ]
  }'
```

The Unapply Credit Memo API ( [Unapply Credit Memos](https://api-docs.nue.io/unapply-credit-memos) ) lets you reverse a previously applied credit memo from an invoice. This action restores the invoice’s outstanding balance by removing all or part of a credit previously used to reduce the amount due.

```curl
curl -X POST "https://api.nue.io/billing/credit-memos:unapply" \
  -H "nue-api-key: {yourApiKey}" \
  -H "content-type: application/json" \
  -H "accept: application/json" \
  -d '{
    "unappliedInvoices": [
      {
        "invoiceId": "de42a9fb-f952-40ca-be20-f28b412623e3",
        "creditMemoId": "50103ccc-3baf-4f9a-a7f4-ebfbbc76f614",
        "transactionAmount": 300
      }
    ]
  }'
```

## Refund Payment

The Refund API ( [Refund Invoices](https://api-docs.nue.io/refund-invoices) ) allows you to return all or part of the paid amount on an invoice. When a refund is performed, the system processes the transaction and updates the invoice’s payment status to "Refunded" or "Partially Refunded," ensuring all events are processed in the downstream systems.

```curl
curl -X POST "https://api.nue.io/billing/invoices:refund" \
  -H "nue-api-key: {yourApiKey}" \
  -H "content-type: application/json" \
  -H "accept: application/json" \
  -d '{
    "refundInvoices": [
      {
        "invoiceId": "c52f7158-b164-44fa-93c5-e4b16420c371",
        "customerId": "001KS00000DVz1aYAD",
        "transactionAmount": 100.00
      }
    ]
  }'
```

## Write Off Uncollectible Invoices

If an invoice is determined to be uncollectible, you can perform a write-off action ( [Write Off Invoices ](https://api-docs.nue.io/write-off-invoices)), which marks the invoice as "Write Off" and prevents further collections.

```curl
curl -X POST "https://api.nue.io/billing/invoices:write-off" \
  -H "nue-api-key: {yourApiKey}" \
  -H "content-type: application/json" \
  -H "accept: application/json" \
  -d '{
    "writeOffInvoiceIds": [
      "6876b010-f3fa-4559-8b84-c926443a4d00",
      "4f163819-178d-470c-a246-d6768476a6ec"
    ]
  }'
```
