Kaydka aqoonta

Iibinta kaydinta Zinn® ee nidaamyadaada gaarka ah

Ku kaxeey cosbitaalka Zinn adiga oo isticmaalaya biilashaada, bogga WordPress ama qoraallada: hel furaha API, samee Wicitaankii ugu horreeyay, iyo lixda wicitaan ee isdhexgalka oo dhan laga sameeyay.

You resell our hosting. Your clients are yours: your prices, your invoices, your payment provider. This is how you drive our platform from whatever you already run — a billing panel, your own WordPress site, or a script.

What your clients actually see

Before the mechanics: your clients never have to see us. Three surfaces, and you choose which you use.

| Surface | Whose it is | |---|---| | The hosting panel, on your own hostname | Set a panel hostname under Reselling → Your brand and your clients sign in at panel.yourcompany.com with your logo and your colours. Same panel, your address. | | Your own website | The WordPress plugin puts domain search and a one-click sign-in link on your site, and takes the order through your own WooCommerce checkout. | | Your billing panel | WHMCS or HostBill stays the front door; the module provisions behind it and the client-area button signs them straight into their hosting. |

⛔ Whichever you pick, you are the merchant of record for your clients: your prices, your invoices, your VAT number, your payment provider. We bill you, once a month, at wholesale.

Once you have set a panel hostname, put it in the Panel address field of the WordPress plugin and in nothing else — the sign-in links this API mints follow it automatically.

The four ways in

There are four ways in, and they all do the same thing underneath:

| | For | |---|---| | The WHMCS module | A WHMCS shop | | The HostBill module | A HostBill shop | | The WordPress plugin | Selling from your own WordPress or WooCommerce site | | The API | Anything else — Blesta, an in-house system, a cron script |

1. Get an API key

In your dashboard, go to API keys and create one. Give it only what it needs:

| Permission | Why | |---|---| | org.read | Read your client accounts | | sites.create | Provision a site | | sites.view | Read a service | | sites.delete | Terminate | | reseller.view | List your services and read usage | | reseller.provision | Suspend, release, and sign a client in |

Do not give an integration reseller.manage. That permission edits your price list and your own payment-gateway credentials. reseller.provision exists precisely so a key you paste into a billing panel or a website does not need it.

The key is shown once. Store it where you store your other credentials — never in a file your web server serves.

2. Make your first call

curl https://api.zinndigital.com/v1/reseller/services \
  -H "Authorization: Bearer zdk_live_…"

That returns every service you have provisioned, one row per site, with the client it belongs to, its status, and what you charge for it. On a new account it is an empty list — which is the correct answer, not an error.

3. The whole integration, in six calls

WHEN                 CALL
an order is paid     POST   /v1/orgs                                   once per CUSTOMER
                     POST   /v1/sites                                  once per SERVICE
they have not paid   POST   /v1/reseller/services/{siteId}/suspend
they pay             POST   /v1/reseller/services/{siteId}/unsuspend
they cancel          DELETE /v1/sites/{siteId}
"log in to hosting"  POST   /v1/reseller/services/{siteId}/sso

Provisioning is two calls, and the keys matter:

# 1. the customer's account — keyed on YOUR customer id
curl -X POST https://api.zinndigital.com/v1/orgs \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: account-4211" \
  -d '{"type":"customer","name":"Acme Ltd"}'

# 2. their site — keyed on YOUR service id
curl -X POST https://api.zinndigital.com/v1/sites \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: service-9915" \
  -d '{"org_id":"<from step 1>","product_line":"mainstream","primary_domain":"acme.com"}'

Two rules that cost money when you get them wrong

  1. Key the account on your CUSTOMER and the site on your SERVICE. A customer's second order
  2. must land in the account they already have. Key both on the service and one customer ends up with three unrelated accounts and three separate panels.

  3. Send an Idempotency-Key on every POST, built from your own id for the thing. Every
  4. billing system retries — a gateway callback arrives twice, an admin re-runs a failed provision, a customer double-clicks. Without the key the second attempt creates a second site and you are billed for it.

Three answers you must not flatten into two

  • unsuspend can answer 409. That means our abuse team is holding the site, not you. Show
  • the message; do not retry it.

  • **Terminating schedules a deletion, it does not perform one.** The date comes back as
  • pending_deletion_at. Telling a customer their data is already gone when it is not is worse than telling them nothing.

  • disk_used_bytes can be null, and null is not zero. It means we could not measure, not
  • that nothing was used. Skip it — do not write 0 into your own records, or you will show a customer a green usage bar for a site you have no reading from.

4. Sign a client in

POST /v1/reseller/services/{siteId}/sso returns a single-use URL that drops your client straight into their own account, already signed in.

Mint it when they click, never when you render the page. The link is single-use and expires within minutes, so a link written into a page is burned on the first page view and left in every cache between you and the browser.

5. Install a module instead

  • WHMCS — copy the module to modules/servers/zinn/, add a server whose Password is your
  • API key, and set the product line on the product. Press Test Connection: it makes a real call and tells you what the platform said.

  • HostBill — copy to includes/modules/Hosting/zinn/ and connect it the same way.
  • WordPress — the Zinn® Reseller Toolkit: domain search, a sign-in link into your
  • clients' hosting, and WooCommerce provisioning when an order is paid. Open source at <https://github.com/Zinn-Digital/zinn-reseller-toolkit>, or download it from Plugins in your dashboard.

6. Go live

Check these before you take a real order:

  • The connection test passes on the module, or your first curl returns a list.
  • Your price list is set (Reselling → Your prices).
  • Your payment gateway is connected (Reselling → Payment gateways) — your clients pay you,
  • through your own account.

  • Your company details are in (Reselling → Your company) so your client invoices carry your
  • legal entity and VAT number, not ours.

  • You have placed one real order end to end and watched the site appear.

Where everything else is

The complete API reference — every endpoint, generated from our specification, with the permission each one needs — is at <https://zinndigital.com/developers/api>.

Weli waad daahday?

Taageero waxaa lagu daray qorshe kasta waxaana lagugu soo jawaabayaa luqadaada.

La xiriir taageerada Maqaallada oo dhan
Iibinta kaydinta Zinn® ee nidaamyadaada gaarka ah