GET
/mailbox-billing

JavaScript SDK: swarmhit.mailboxBilling.get()

Bought mailboxes and domains are billed apart from the plan, each purchase on its own date and monthly from then on. This returns the monthly total and next charge date, the card charged, each purchase (mailboxes, price, status, a payUrl when a payment failed, the last receipt) and each domain's renewal (date, price or an estimate, status, payUrl when declined). Same data as the Mailboxes & domains tab of Settings → Billing in Swarmhit. 403 with code: not-allowed unless the key's creator may manage billing. Not gated on the managed mailboxes feature.

Authorization

bearerAuth
AuthorizationBearer <token>

An API key created on the Access tokens page.

In: header

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/mailbox-billing"
{  "data": {    "currency": "string",    "monthlyCents": 0,    "nextChargeAt": "2019-08-24T14:15:22Z",    "includedMailboxes": 0,    "card": {      "brand": "string",      "last4": "string",      "expMonth": 0,      "expYear": 0    },    "orders": [      {        "id": "string",        "domains": [          "string"        ],        "mailboxes": 0,        "unitCents": 0,        "monthlyCents": 0,        "status": "active",        "nextChargeAt": "2019-08-24T14:15:22Z",        "unpaidSince": "2019-08-24T14:15:22Z",        "payUrl": "string",        "receiptUrl": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "renewals": [      {        "domain": "string",        "expiresAt": "2019-08-24T14:15:22Z",        "priceCents": 0,        "priceEstimated": true,        "status": "scheduled",        "payUrl": "string"      }    ],    "prices": {      "mailboxMonthlyCents": 0,      "domainMarkupCents": 0,      "domainFirstYearMaxCents": 0    }  }}