Payments
Update Item Quantity
Updates the quantity of an item for a customer. Can increase or decrease quantities, with optional expiration and negative balance control.
post/payments/items/{customer_type}/{customer_id}/{item_id}/update-quantity
Path parameters
customer_type'user' | 'team' | 'custom' required
The type of customer
Example:user
The type of customer
customer_idstring required
The ID of the customer
Example:user_1234567890abcdef
The ID of the customer
item_idstring required
The ID of the item to update
Example:credits
The ID of the item to update
Query parameters
allow_negative'true' | 'false' required
Whether to allow the quantity to go negative
Example:false
Whether to allow the quantity to go negative
Request body
Example request
{
"delta": 100,
"expires_at": "2024-12-31T23:59:59Z",
"description": "Monthly subscription renewal"
}Response
Successful response
object required