Customer Deposit API
Record customer prepayments and deposits before invoicing using the NetSuite REST API.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /record/v1/customerDeposit | List all customer deposits |
GET | /record/v1/customerDeposit/{id} | Get specific deposit |
POST | /record/v1/customerDeposit | Create new deposit |
PATCH | /record/v1/customerDeposit/{id} | Update deposit |
DELETE | /record/v1/customerDeposit/{id} | Delete deposit |
Key Fields
Header Fields
| Field | Type | Description | Required |
|---|---|---|---|
id | string | Internal ID (read-only) | - |
tranId | string | Deposit number | Auto-generated |
customer | object | Customer reference | Yes |
tranDate | string | Deposit date (ISO 8601) | Yes |
status | object | Deposit status | Read-only |
subsidiary | object | Subsidiary | Yes (OneWorld) |
Payment Fields
| Field | Type | Description | Required |
|---|---|---|---|
payment | number | Deposit amount | Yes |
currency | object | Transaction currency | Yes |
exchangeRate | number | Exchange rate | Auto-calculated |
paymentMethod | object | Payment method | No |
creditCard | object | Credit card reference | Conditional |
checkNum | string | Check number | No |
account | object | Deposit to account | Yes |
undepFunds | boolean | Undeposited funds | No |
Application Fields
| Field | Type | Description | Required |
|---|---|---|---|
amountRemaining | number | Unapplied amount (read-only) | - |
amountPaid | number | Applied amount (read-only) | - |
salesOrder | object | Related sales order | No |
Other Fields
| Field | Type | Description | Required |
|---|---|---|---|
memo | string | Internal memo | No |
class | object | Department/class | No |
location | object | Location | No |
department | object | Department | No |
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
-
Customer places order
POST /record/v1/salesOrder -
Customer pays deposit (50%)
POST /record/v1/customerDeposit -
Ship order and create invoice
POST /record/v1/invoice -
Apply deposit to invoice
POST /record/v1/depositApplication -
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 Deposit | Customer Payment |
|---|---|
| Prepayment before invoicing | Payment after invoicing |
| Liability account | A/R reduction |
| Applied via Deposit Application | Applied directly to invoices |
| For future orders/invoices | For 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
salesOrderfield - 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
- Sales Order - Link deposits to orders
- Deposit Application - Apply to invoices
- Customer Payment - Regular payments
- Invoice - Create invoices to apply deposits
- Deposit - Bank deposits