Customer Refund

NetSuite exposes the customer refund record to REST web services. A customer refund transaction records the return of funds to a customer who paid for goods or services using cash, a check, or a payment card. The refund is generally made in cash or by check.

For more information about customer refunds, see Customer Refunds.

The REST API Browser includes information about the field names and field types of the customer refund record. It also includes information about the HTTP methods, request parameters, and operations available to this record. For details, see the REST API Browser’s customerRefund reference page.

For information about using the REST API Browser, see The REST API Browser.

Record ID

The record ID for the customer refund REST record is customerRefund.

Subrecords and Sublists

The customer refund record has the following sublists and subrecord:

  • The apply sublist of the CustomerRefundApplyLine subrecord.

  • The deposit sublist of the CustomerRefundDepositLine subrecord.

  • The TransactionAccountingBookDetail subrecord.

Prerequisite

Before you work with customer refunds, enable the A/R feature.

Limitations

Certain elements on the customer refund record are not accessible through REST web services: the deposit sublist in the GET request is empty. The deposit sublist is hidden in edit mode in UI, and the applied deposit is represented by Deposit Application in apply sublist. This is how sublists are displayed in GET response in REST.

Certain elements on the customer refund record have a different level of functionality than the rest of the record:

  • The deposit sublist is always empty in response for GET request and cannot be updated.

  • Lines on the deposit sublist are not identified by sublist line number, but by the doc field as the key. See the Creating a Customer Refund code sample.

  • Lines on the apply sublist are not identified by the line number, but by the doc field as the key with the line as a secondary key. The line represents the transaction line ID, not the line number on the sublist. See the Creating a Customer Refund code sample.

Code Samples

The code samples in this section show common use cases for customer refunds.

Creating a Customer Refund

              POST https://123456.suitetalk.api.netsuite.com/services/rest/record/v1/customerrefund
{ "customer": {"id": "6"}, "deposit": { "items": [ { "doc": {"id": "60"}, "apply": true, "amount": 25.00 } ] }, "apply": { "items": [ { "doc": {"id": "59"}, "line": 1, "apply": true, "amount": 4.20 }, { "doc": {"id": "56"}, "line": 1, "apply": true, "amount": 5.00 } ] }
} 

            

Updating a Customer Refund

              PATCH https://123456.suitetalk.api.netsuite.com/services/rest/record/v1/customerrefund/{id}
{ "memo": "Updated refund"
} 

            

Related Topics

REST Web Services Supported Records
SuiteTalk REST Web Services Overview and Setup
Working with Records
NetSuite Record Structure
The REST API Browser

General Notices