Skip to main content

Customer Deposit API

Record customer prepayments and deposits before invoicing using the NetSuite REST API.


Endpoints

MethodEndpointDescription
GET/record/v1/customerDepositList all customer deposits
GET/record/v1/customerDeposit/{id}Get specific deposit
POST/record/v1/customerDepositCreate new deposit
PATCH/record/v1/customerDeposit/{id}Update deposit
DELETE/record/v1/customerDeposit/{id}Delete deposit

Key Fields

Header Fields

FieldTypeDescriptionRequired
idstringInternal ID (read-only)-
tranIdstringDeposit numberAuto-generated
customerobjectCustomer referenceYes
tranDatestringDeposit date (ISO 8601)Yes
statusobjectDeposit statusRead-only
subsidiaryobjectSubsidiaryYes (OneWorld)

Payment Fields

FieldTypeDescriptionRequired
paymentnumberDeposit amountYes
currencyobjectTransaction currencyYes
exchangeRatenumberExchange rateAuto-calculated
paymentMethodobjectPayment methodNo
creditCardobjectCredit card referenceConditional
checkNumstringCheck numberNo
accountobjectDeposit to accountYes
undepFundsbooleanUndeposited fundsNo

Application Fields

FieldTypeDescriptionRequired
amountRemainingnumberUnapplied amount (read-only)-
amountPaidnumberApplied amount (read-only)-
salesOrderobjectRelated sales orderNo

Other Fields

FieldTypeDescriptionRequired
memostringInternal memoNo
classobjectDepartment/classNo
locationobjectLocationNo
departmentobjectDepartmentNo

Example: Create Customer Deposit

POST /record/v1/customerDeposit
Content-Type: application/json
{
"customer": {
"id": "456"
},
"tranDate": "2025-12-25",
"payment": 5000.00,
"subsidiary": {
"id": "1"
},
"currency": {
"id": "1"
},
"paymentMethod": {
"id": "3"
},
"account": {
"id": "10"
},
"salesOrder": {
"id": "1001"
},
"memo": "50% deposit on SO-1001 - Enterprise order"
}

Response:

{
"id": "8001",
"tranId": "CUSTDEP-8001",
"customer": {
"id": "456",
"refName": "Acme Corporation"
},
"tranDate": "2025-12-25",
"payment": 5000.00,
"amountRemaining": 5000.00,
"amountPaid": 0.00,
"status": {
"id": "DEPOSITED",
"refName": "Deposited"
},
"links": [
{
"rel": "self",
"href": "https://{account}.suitetalk.api.netsuite.com/services/rest/record/v1/customerDeposit/8001"
}
]
}

Example: Create Deposit with Undeposited Funds

POST /record/v1/customerDeposit
Content-Type: application/json
{
"customer": {
"id": "456"
},
"tranDate": "2025-12-25",
"payment": 2500.00,
"subsidiary": {
"id": "1"
},
"currency": {
"id": "1"
},
"paymentMethod": {
"id": "2"
},
"undepFunds": true,
"checkNum": "CHK-5678",
"memo": "Deposit pending bank clearance"
}
Undeposited Funds

Set undepFunds: true to hold the deposit in the Undeposited Funds account until you make a bank deposit.


Example: Update Customer Deposit

PATCH /record/v1/customerDeposit/8001
Content-Type: application/json
{
"memo": "Deposit cleared - ready to apply to invoice",
"salesOrder": {
"id": "1001"
}
}

Apply Deposit to Invoice

Use a Deposit Application transaction to apply the deposit when invoicing:

POST /record/v1/depositApplication
Content-Type: application/json
{
"customer": {
"id": "456"
},
"tranDate": "2025-12-26",
"subsidiary": {
"id": "1"
},
"currency": {
"id": "1"
},
"deposit": {
"id": "8001"
},
"apply": {
"items": [
{
"doc": {
"id": "5001"
},
"apply": true,
"amount": 5000.00
}
]
}
}

Workflow Example

Standard Prepayment Workflow

  1. Customer places order

    POST /record/v1/salesOrder
  2. Customer pays deposit (50%)

    POST /record/v1/customerDeposit
  3. Ship order and create invoice

    POST /record/v1/invoice
  4. Apply deposit to invoice

    POST /record/v1/depositApplication
  5. Collect remaining balance

    POST /record/v1/customerPayment

Query Filters

Find Unapplied Deposits

GET /record/v1/customerDeposit?q=amountRemaining > 0

Find by Customer

GET /record/v1/customerDeposit?q=customer='456'

Find by Sales Order

GET /record/v1/customerDeposit?q=salesOrder='1001'

Find by Date Range

GET /record/v1/customerDeposit?q=tranDate BETWEEN '2025-12-01' AND '2025-12-31'

Find High-Value Deposits

GET /record/v1/customerDeposit?q=payment > 10000

Find Undeposited Funds

GET /record/v1/customerDeposit?q=undepFunds=true

Important Notes

Accounting Impact

Creating a customer deposit:

  • Debit: Cash/Bank Account (or Undeposited Funds)
  • Credit: Customer Deposits liability account

When applied to invoice:

  • Debit: Customer Deposits
  • Credit: Accounts Receivable

When to Use Customer Deposits

  • Large custom orders requiring prepayment
  • Project work requiring upfront payment
  • Subscription renewals
  • Event registrations
  • Retainer agreements
  • High-value transactions

Customer Deposit vs Customer Payment

Customer DepositCustomer Payment
Prepayment before invoicingPayment after invoicing
Liability accountA/R reduction
Applied via Deposit ApplicationApplied directly to invoices
For future orders/invoicesFor existing invoices

Deposit Application Process

Deposits must be explicitly applied to invoices:

  • Create Deposit Application transaction
  • Link to the deposit
  • Link to the invoice(s)
  • Reduces both deposit balance and invoice balance

Partial Deposits

  • Deposit can be applied to multiple invoices
  • Single invoice can have multiple deposits applied
  • Track remaining balance via amountRemaining

Undeposited Funds

When undepFunds is true:

  • Payment held in Undeposited Funds account
  • Include in bank Deposit transaction later
  • Common for batch deposits
  • Matches bank deposit slip

Payment Methods

Deposits commonly received via:

  • Wire transfer
  • ACH/EFT
  • Check
  • Credit card
  • Cash (less common for large deposits)

Sales Order Linking

  • Link deposit to sales order via salesOrder field
  • Helps track prepayments by order
  • Not required but recommended
  • Useful for reporting

Refunding Deposits

To refund an unapplied deposit:

POST /record/v1/customerRefund

Apply against the deposit transaction

Multi-Currency

  • Deposit currency must match customer currency
  • Exchange rate locked at deposit date
  • Important for international customers
  • May affect deposit application

Financial Reporting

  • Deposits are liabilities, not revenue
  • Revenue recognized when invoice created
  • Track deposits in Customer Deposits account
  • Important for balance sheet accuracy

See Also