Guides and Examples
...
Invoices
Process Payment
6 min
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 ) 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 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 ) —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 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 ) 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 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 ) 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 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 ), which marks the invoice as "write off" and prevents further collections 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" ] }'