Build on CoreInto
A JSON API with scoped keys, events you can listen to, and plain PHP classes for gateways, servers, registrars and add-on modules.
$ curl -s https://billing.example.com/api \ -H "Authorization: Bearer $CI_KEY" \ -d action=clients.list -d status=active -d limit=2 { "result": "success", "clients": [ { "id": 1284, "company": "Example Hosting" } ] }
/api
Hooks and eventsRun your code when an invoice is created, a client changes or the automation ticks./hooks
Add-on modulesBuild a module: manifest, pages, menus, settings, events and WHOIS./addon-modules
Payment gateway modulesThe Gateway class: fields, start, callbacks, refunds and saved cards./payment-gateways
Server (provisioning) modulesThe ServerModule class: create, suspend, terminate, packages and single sign-on./provisioning-modules
Registrar modulesThe Registrar class: check, register, transfer, renew, nameservers and sync./registrar-modules
Command linecli.php commands for automation, imports and licences, and tools/release.php./command-line
Licensing Manager APIThe check address, binding, signed answers, tokens and public endpoints./licensing-api
Mobile app connectionHow the branded app signs in, reads data and receives push notices./mobile-api
Client area templatesCopy a template, change its pages and keep it through updates./themes
Automation and cronWhat runs when, and how to run your own work on the automation tick./webhooks-and-cron
Example modules in the box
Each is a folder under modules/ you can read and copy.
modules/gatewayfeeGoogle AnalyticsAdds full Google Analytics tracking to the client area, the order pages and the website, and reports each completed ord…modules/googleanalyticsMailchimpKeeps a Mailchimp audience in step with your clients for newsletters and email marketing automation: clients who agree…modules/mailchimpPKNIC (.pk domains)Registers and manages .pk domains through your PKNIC SRS member account, and answers WHOIS lookups for .pk and its seco…modules/pknicRenewal PricingChange the renewal price of products, services and domain extensions in one place; unpaid renewal invoices are updated…modules/renewalprices Four ways to extend CoreInto#
The JSON API is for systems outside CoreInto: your own control panel, a reseller's tool, an accounting system, a script that runs at night. Each credential has scopes and an expiry date, and every call is logged.
Add-on modules live inside CoreInto. A module is a folder under modules/ with a manifest and a class; it can add pages and menu items to the admin area, keep its own settings and tables, listen to events such as a new invoice or a changed client, add HTML to the page head, bring registrar modules and answer WHOIS lookups. Switching it off keeps its data.
Gateway, server and registrar modules are PHP classes with a small, documented set of methods. CoreInto calls them at the right moment in the life of a payment, a hosting account or a domain, and logs every request and answer with secrets hidden.
Client area templates are folders of plain PHP pages and assets. Copy one, change it, and it appears in the settings as your own.
Ground rules#
- Never change CoreInto's own files. Updates replace them; your modules and templates are left alone.
- Use the events and hooks rather than reading CoreInto's tables directly where you can; tables may change between versions, events and the API do not change without notice in the release notes.
- Keep secrets in module settings fields of the "secret" kind: CoreInto encrypts them with AES-256-GCM.
- The page security policy forbids inline scripts and styles. Put scripts and styles in your module's or template's assets.
Where the reference comes from#
The API reference, the command line, the add-on module guide, the Licensing Manager's check address and the mobile app connection are published straight from the CoreInto manual and update by themselves with each release.
Frequently asked questions
Is there a CoreInto API?
Yes, a JSON API with scoped credentials covering clients, products, orders, services, domains, invoices, tickets and more. See the API reference.
How do I run my own code when something happens in CoreInto?
Write an add-on module and list the events it listens to, such as invoice.created or client.updated. See hooks and events.
Can I sell a module I wrote?
Yes. Apply as a technology partner and we can list it in the CoreInto marketplace.