Skip to content

What switching an add-on on would charge — without charging it

GET
/v1/billing/addon-quote
curl --request GET \
--url 'https://api.emite.cr/v1/billing/addon-quote?addon=example' \
--header 'Authorization: Bearer <token>'

Read-only: no Onvo call, nothing written. Enabling an add-on charges the saved card on the spot with no checkout in between, so this is the figure to show before the click: the whole days that remain to the plan's next monthly anniversary, the date they run to, and the full month every renewal charges after that. Pass chargeCentimos back as expectedChargeCentimos when enabling. It runs the same checks as the purchase, so it answers the same errors (NO_ACTIVE_SUBSCRIPTION, ADDON_ALREADY_INCLUDED, …) instead of quoting something that cannot be bought.

addon
required
string
Media typeapplication/json
object
addon
required

The add-on quoted, as named in ?addon=: whatsapp (the WhatsApp conversational agent) or audit (the audit-module add-on).

string
Allowed values: whatsapp audit
chargeCentimos
required

What the card is charged NOW, in céntimos, IVA included: the whole days that remain to the plan's next monthly anniversary, at the add-on's daily price. 0 when waived.

number
chargeNetCentimos
required

Base imponible of that charge, in céntimos. The IVA is the remainder.

number
days
required

Whole days that charge pays for.

number
periodDays
required

Days of the plan's current monthly window — the denominator of the proration, so days === periodDays is a full month at the full price.

number
paidThrough
required

ISO instant the days bought run out, which is when the add-on first renews. Days are bought whole, so it falls on the plan's anniversary or within the 24 hours after it.

string
renewalCentimos
required

What every renewal charges: one full month, in céntimos, IVA included.

number
renewalNetCentimos
required

Base imponible of a renewal, in céntimos.

number
waived
required

True when the days that remain cost less than the minimum charge: they are not charged, and the first thing collected is the full month at paidThrough.

boolean
Example
{
"addon": "whatsapp"
}