Theme
Payment
A payment records money received from a customer. Applied to an invoice, it lowers that invoice's balance. Payment is a transaction entity. The collection creates, reads, queries, voids and deletes one.
Business rules
- Create needs
TotalAmtandCustomerRef.Lineis optional: without lines, the payment is unapplied and "recorded as a credit". - To apply a payment to an invoice, add a line whose
LinkedTxnpoints at the invoice (TxnTypeInvoice). - Lines are updated all or nothing: "If any element in any line needs to be updated, all the Line elements of the Payment object have to be provided... Lines can be updated only ALL or NONE."
DepositToAccountRefmust be an Other Current Asset or Bank account. The default is Undeposited Funds.- Void is a sparse update sent with
?operation=update&include=void, not?operation=void. "If funds for the payment have been deposited, you must delete the associated deposit object before voiding the payment object." Otherwise the call fails with 6540 "Deposited Transaction cannot be changed". - Send exists only in the
sendToform ("The email address should be explicitly mentioned in the POST request"). The collection does not send payments.
Folder 8 is self-contained. It creates its own invoice, pays it in full, voids and deletes the payment, then deletes the invoice. That leaves the test customer without an open balance, so 12. Cleanup can deactivate it.
Postman folder: 8. Customer payments (Payment). Intuit reference: Payment.
The Payment object
Fields the collection uses. The full attribute list is in Intuit's reference.
| Attribute | Requirement | Type | Description |
|---|---|---|---|
Id | * Required for update | String, filterable | Unique id. |
SyncToken | * Required for update | String | Version number for optimistic locking. |
CustomerRef | * Required | ReferenceType, filterable | {"value": "<Customer.Id>"}. |
TotalAmt | * Required | Decimal | Amount received. |
Line | Optional | Array | Where the money goes. Without lines, the payment is unapplied. |
Line[]. | * Required (per line) | Decimal | Amount applied to the linked transaction. |
Line[]. | * Required (per line) | Array | [{"TxnId": "<id>", "TxnType": "Invoice"}]. Other valid types: CreditMemo, Expense, Check, CreditCardCredit, JournalEntry. |
DepositToAccountRef | Optional | ReferenceType | Other Current Asset or Bank account. Default: Undeposited Funds. |
TxnDate | Optional | Date, filterable | Transaction date. |
Create an invoice to pay
Same as Create an invoice, with one line of 1 × the service item at 100. The test stores Invoice.Id in pay_invoice_id and Invoice.TotalAmt in pay_invoice_total.
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice?requestid={{request_id}} |
| Intuit operation | POST/v3/company/<realmID>/invoice |
| Content type | application/json |
| Postman | 8. Customer payments › Create invoice to pay |
| Stores | pay_invoice_id, pay_invoice_total |
Create a payment
Pays the invoice above in full. TotalAmt and the line Amount are the invoice total, which can include tax, so the collection uses the stored pay_invoice_total instead of 100.
Request body
| Attribute | Requirement | Type | Description |
|---|---|---|---|
CustomerRef | * Required | ReferenceType | {"value": "{{customer_id}}"}. |
TotalAmt | * Required | Decimal | {{pay_invoice_total}}, a number (no quotes). |
Line | Optional | Array | One line: Amount = {{pay_invoice_total}}, LinkedTxn = the invoice. |
Returns
The new Payment object. The test stores Payment.Id in payment_id and Payment.SyncToken in payment_sync_token.
In the collection, TotalAmt and Amount are written as {{pay_invoice_total}} without quotes, so the body is valid JSON only after Postman replaces the variable.
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/payment?requestid={{request_id}} |
| Intuit operation | POST/v3/company/<realmID>/payment |
| Content type | application/json |
| Postman | 8. Customer payments › Create payment |
| Stores | payment_id, payment_sync_token |
Request body (as sent, after Postman replaces the variables)
json
{
"CustomerRef": {
"value": "64"
},
"TotalAmt": 113,
"Line": [
{
"Amount": 113,
"LinkedTxn": [
{
"TxnId": "149",
"TxnType": "Invoice"
}
]
}
]
}Returns (abridged)
json
{
"Payment": {
"Id": "150",
"SyncToken": "0",
"CustomerRef": {
"value": "64"
},
"TotalAmt": 113,
"Line": [
{
"Amount": 113,
"LinkedTxn": [
{ "TxnId": "149", "TxnType": "Invoice" }
]
}
]
},
"time": "2026-12-01T02:22:00.000-08:00"
}Read a payment
Retrieves one Payment object. The test refreshes payment_sync_token.
| Request | |
|---|---|
| Request URL | GET{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/payment/{{payment_id}} |
| Intuit operation | GET/v3/company/<realmID>/payment/<paymentId> |
| Accept | application/json |
| Postman | 8. Customer payments › Read payment |
| Stores | payment_sync_token |
Query a payment
Finds the test customer's payments. Payment is filterable by CustomerRef, Id, PaymentRefNum, ProjectRef and TxnDate. The test needs at least one row.
Returns: QueryResponse.Payment[].
| Request | |
|---|---|
| Request URL | GET{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/query?query=select * from Payment where CustomerRef = '{{customer_id}}' |
| Intuit operation | GET/v3/company/<realmID>/query?query=<selectStatement> |
| Accept | application/json |
| Postman | 8. Customer payments › Query payments by customer |
Void a payment
Voids the payment. The body is a sparse update with only Id and SyncToken; the include=void query parameter, sent with operation=update, does the voiding. A payment whose funds were deposited cannot be voided until the deposit is deleted (see the business rules).
Request body
| Attribute | Requirement | Type | Description |
|---|---|---|---|
Id | * Required | String | {{payment_id}}. |
SyncToken | * Required | String | {{payment_sync_token}}. |
sparse | * Required | Boolean | true. |
Returns
The voided Payment object. The test stores the new SyncToken.
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/payment?operation=update&include=void&requestid={{request_id}} |
| Intuit operation | POST/v3/company/<realmID>/payment?operation=update&include=void |
| Content type | application/json |
| Postman | 8. Customer payments › Void payment |
| Stores | payment_sync_token |
Request body
json
{
"Id": "{{payment_id}}",
"SyncToken": "{{payment_sync_token}}",
"sparse": true
}Delete a payment
Deletes the payment permanently.
Request body
| Attribute | Requirement | Type | Description |
|---|---|---|---|
Id | * Required | String | {{payment_id}}. |
SyncToken | * Required | String | {{payment_sync_token}}, the latest version (after the void). |
Returns
A short status object. The test checks that Payment.status is Deleted.
| Request | |
|---|---|
| Request URL | POST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/payment?operation=delete&requestid={{request_id}} |
| Intuit operation | POST/v3/company/<realmID>/payment?operation=delete |
| Content type | application/json |
| Postman | 8. Customer payments › Delete payment |
Request body
json
{
"Id": "{{payment_id}}",
"SyncToken": "{{payment_sync_token}}"
}Returns
json
{
"Payment": {
"status": "Deleted",
"domain": "QBO",
"Id": "150"
},
"time": "2026-12-01T02:23:00.000-08:00"
}Delete the invoice to pay
The invoice can have a newer SyncToken after the payment was applied and removed, so Read invoice to pay (refresh SyncToken) stores the current one in pay_invoice_sync_token first. Then Delete invoice to pay deletes the invoice, as in Delete an invoice. The test checks that Invoice.status is Deleted.
| Request | |
|---|---|
| Request URL | GET{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice/{{pay_invoice_id}}, then POST{{base_url}}/api/v1/qbo/v3/company/{{realm_id}}/invoice?operation=delete&requestid={{request_id}} |
| Postman | 8. Customer payments › Read invoice to pay (refresh SyncToken), Delete invoice to pay |
| Stores | pay_invoice_sync_token |
Request body (delete)
json
{
"Id": "{{pay_invoice_id}}",
"SyncToken": "{{pay_invoice_sync_token}}"
}