Databases / Pricing
Database pricing
A database costs what a VM in a VPC on the same plan costs, plus any storage beyond the plan's disk, paid for up front like a machine. No management fee.
What a database costs
A database is priced exactly as a virtual machine of the same plan with no public address, which is what a VM in a VPC on that plan costs:
- the plan's vCPUs and memory, by the hour,
- one disk, the database's data disk, at the plan's size,
- any storage you add beyond the plan's size, per GB at the block storage rate.
Prices exclude VAT, which is added to your end-of-period invoice.
There is no management fee and no separate price list. A database never has a public address, so it never pays for one, in either zone.
To price one before you create it, estimate a machine of the same plan with placement vpc, and add the gigabytes beyond the plan's disk as extra_storage_gb (leave it out at the plan's own size). For 100 GB on a plan with a 25 GB disk:
$ curl https://api.pantechdynamics.com/public/v1/pricing/estimate \ -H "Authorization: Bearer $PANTECH_API_KEY" \ -H "Content-Type: application/json" \ -d '{"currency": "NGN", "machines": [{"plan_slug": "starter", "quantity": 1, "running_hours": 730, "placement": "vpc"}], "extra_storage_gb": 75}'Paid for first
Creating a database places an order, and works like creating a machine:
- The order takes the upfront payment (
amount_minorin the create response), from your credit if there is enough, otherwise from your default card. - Only then is the database built.
- If the payment fails, the order ends
payment_failedand nothing is built. An order left unpaid for one hour expires the same way (failure_codepayment_expired). - If the database cannot be built after it was paid for, the order ends
failedand the payment goes back to your credit.
The upfront payment carries no VAT. It covers the data disk at the size you chose with storage_gb. After that, usage is metered by the hour and invoiced with everything else. Database orders has the details.
While stopped, and after deletion
- Stopped: like a stopped machine, a stopped database stops paying for vCPUs and memory, and still pays for its disk.
- Deleted: billing stops for the database; the hours it ran up to the delete are still billed. As with deleting a machine, the part of its upfront payment not yet deducted from a bill goes back to your credit balance, never to your card, and shows in Transactions as Upfront payment returned after database deleted. Its snapshots are kept, and billed, until you delete them.
Growing storage
Growing the data disk takes no upfront payment, the same as resizing a machine. The bigger disk is billed by the hour, on its new size, from the moment the resize completes. Until then, and if it fails, you pay for the size you had.
Snapshots
A database snapshot is billed like any snapshot: per GB of the space it uses, for every hour it exists, until you delete it, even after the database is gone.
Choosing a size
The plan, and so the vCPUs and memory, is fixed when you create a database: moving to a bigger plan is not available yet, so choose one with room to grow. Storage is different: start at what you need now and grow it as you go, because it can never shrink.