What switching an add-on on would charge — without charging it
const url = 'https://api.emite.cr/v1/billing/addon-quote?addon=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”object
The add-on quoted, as named in ?addon=: whatsapp (the WhatsApp conversational agent) or audit (the audit-module add-on).
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.
Base imponible of that charge, in céntimos. The IVA is the remainder.
Whole days that charge pays for.
Days of the plan's current monthly window — the denominator of the proration, so days === periodDays is a full month at the full price.
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.
What every renewal charges: one full month, in céntimos, IVA included.
Base imponible of a renewal, in céntimos.
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.
Example
{ "addon": "whatsapp"}