CustomCharge
¶
Source code in docs_src/capo_appmonetization/types/custom_charge.py
amount
instance-attribute
¶
amount: PriceAmount
The charge, as a decimal string in major currency units (for example, "12.50").
charge_id
instance-attribute
¶
charge_id: ChargeId
Caller-chosen stable id for THIS charge. It is the idempotency and replace key: re-submitting the same chargeId within its assigned period upserts the charge in place. A chargeId is bound to the first period it is accepted into; re-submitting it after that period rolls over is refused (ConflictException) rather than billing it again, so it must be unique per charge for this user across all periods — use a UUID or your own invoice-line id (the caller does not know the billing period, so it cannot be encoded in the id).
currency
instance-attribute
¶
currency: CurrencyCode
The ISO 4217 currency of the amount. Only USD is supported; a non-USD value is rejected.
description
instance-attribute
¶
description: CustomChargeDescription
Human-readable description, surfaced on the invoice line.
metric_id
instance-attribute
¶
metric_id: NotRequired[MetricId]
Optional metric this charge derives from. Omitted for a charge not tied to a metric (a flat or custom fee).
tax_code
instance-attribute
¶
tax_code: NotRequired[ProductTaxCode]
Optional product tax code; defaults to the service default when omitted.