NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Credit Card Charge → Insert record

AI-generated

Summary

Create a new credit card charge record in NetSuite.

Inputs

  • isDebugMode — Include full request and response information in the output when true.
  • account — Account for the transaction (internal or external identifier).
  • accountingBookDetail — Detail of accounting books, including items like accounting book, exchange rate, reference name, and subsidiary.
  • userTotal — Dollar amount of the transaction (positive for credit).
  • total — Total amount for the transaction.
  • balance — NetSuite displayed balance after this transaction.
  • class — Class associated with the transaction.
  • cleared — Whether the transaction is cleared.
  • currency — Currency used for the transaction.
  • customForm — Reference to a custom form (internal or external identifier and reference name).
  • tranDate — Posting date of the transaction.
  • clearedDate — Date when the transaction was cleared.
  • createdDate — Original creation date of the record.
  • lastModifiedDate — Last modification date of the record.
  • department — Department related to the transaction.
  • entity — Entity (customer, vendor, etc.) on the transaction.
  • expense — Expense details with line items including account, amount, category, class, department, etc.
  • externalId — Custom external ID for the record.
  • id — NetSuite internal ID of the record.
  • location — Location associated with the transaction.
  • memo — Memo or description for the transaction.
  • postingPeriod — Posting period for the transaction.
  • Prefer — Server preference, e.g., 'respond-async' for asynchronous execution.
  • prevDate — Previous effective date for the transaction.
  • refName — Reference name for the transaction.
  • tranId — Transaction number identifier.
  • replace — Comma‑separated sublist names to replace lines with.
  • subsidiary — Subsidiary related to the transaction.
  • X-NetSuite-Idempotency-Key — Idempotency key for asynchronous requests to avoid duplicates.
  • X-NetSuite-PropertyNameValidation — Strictness of property name validation ('Error', 'Warning', 'Ignore').
  • X-NetSuite-PropertyValueValidation — Strictness of property value validation ('Error', 'Warning', 'Ignore').
  • customFields — Collection of custom fields; each item specifies fieldName, fieldType, and value of matching type.

Output shape

a list of items; each item contains the created credit card charge record data. If debug mode is enabled, each item also includes the raw request and response objects.

The response may include pagination details if inherently returned, but for an insert operation the payload consists of the newly created record information. Missing fields are omitted.

Examples

Example 1: Insert a basic credit card charge for a vendor purchase

account: internalId 123; entity: internalId 456; userTotal: 1000; memo: "Office supplies"; externalId: "CC-001"

Example 2: Insert a credit card charge with multiple expense lines

account: internalId 123; entity: internalId 456; expense.items: [{account: internalId 123, amount: 200}, {account: internalId 124, amount: 300}]; userTotal: 500

Example 3: Insert a credit card charge including custom fields

customFields: [{fieldName: "custom_status", fieldType: "string", value: "ticketed"}]

Discussion