TypeScript
import { PriceOS } from "priceos"; import type { MyFeatures } from "./priceos.types"; const priceos = new PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!); const bonus = await priceos.bonuses.update({ bonusId: "bonus_123", amount: 150, reason: "manual_adjustment", });
{ "bonus": { "bonusId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "featureKey": "<string>", "amount": 123, "remainingAmount": 123, "createdAt": 123, "updatedAt": 123, "expiresAt": 123, "reason": "<string>", "metadata": {} }, "counterRemaining": 123 }
Update an existing bonus.
API key from your PriceOS dashboard.
Bonus ID.
Optional updated bonus amount.
Optional Unix timestamp (ms) when the bonus expires. Use null to clear.
Optional reason for the bonus. Use null to clear.
Optional metadata for the bonus (string key/value pairs). Use null to clear.
Show child attributes
Bonus updated
Bonus update result.
Updated bonus.
Total remaining bonus amount for this customer + feature.