NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Credit Card Refund → Insert or update record

AI-generated

Summary

Update or create a credit card refund record by ID in NetSuite via the SuiteTalk REST API.

Inputs

  • Debug Mode — Include full request and response details in the result.
  • Id (required) — External identifier of the credit card refund record to update.
  • Additional Fields — Set properties of the refund such as account, amount, currency, transaction date, line item details, etc. Each field follows the NetSuite schema for credit card refunds and can include nested collections (accountingBookDetail, expense, item, etc.).
  • Custom Fields — Add or update any custom fields defined for the record. Specify field name, type, and value.
  • Prefer — Set to "respond-async" to execute asynchronously; otherwise the request is synchronous.
  • X-NetSuite-Idempotency-Key — Unique key ensures only one execution of an asynchronous request.
  • X-NetSuite-PropertyNameValidation — Controls error level for missing or unsupported property names.
  • X-NetSuite-PropertyValueValidation — Controls error level for invalid property values.
  • replace — Comma‑separated list of sublist names to replace entirely in the update.
  • replaceSelectedFields — When true, all fields that should be deleted must be included in the replace query parameter.

Output shape

A JSON object representing the created or updated Credit Card Refund record, optionally wrapped with request/response metadata when Debug Mode is enabled.

If Prefer=respond-async, the API returns a 202 status with an operation URI; the response body contains the operation ID and status. Errors are returned as standard NetSuite REST error objects.

Examples

Example 1: Update refund amount and date

Set Id to "123456", set Additional Fields → Amount to 100.00, TranDate to "2024-08-01", and choose Prefer none.

Example 2: Create refund with line items

Set Id to "ref-001", enable Additional Fields → UserTotal to 250, add Expense items with account and amount, set Currency to USD.

Example 3: Add custom field to refund

Set Id to "ref-002", in Custom Fields add a string field "Reason" with value "Fraud".

Discussion