Flutter integration

Atom issues Ed25519 certificates compatible with flutter_licensing. The application embeds only the public key; the private signing key stays encrypted in Atom’s D1 database and is decrypted only while issuing.

1. Create a signing key

Creating a project generates the key pair automatically. For a self-managed issuer:

openssl genpkey -algorithm ED25519 -out license-private.pem
openssl pkey -in license-private.pem -pubout -out license-public.pem

Never bundle or log the private key. After rotation, ship the new public key in the app before issuing certificates with it.

2. Add the public key

flutter:
  assets:
    - assets/license_keys/key-2026-08-30.pub
final keys = LicenseKeyRegistry();
await keys.addAsset('key-2026-08-30');

3. Configure plans

Every tier has two independent identifiers: an unrestricted display name for customers, such as Môj superplán, and a stable program-facing ID, such as moj-superplan. Program-facing IDs are unique within the project.

4. Create an order

POST /api/v1/my-project/orders
{"planId":"moj-superplan","customerId":"customer-core-id","customerEmail":"a@b.com"}

Redirect the customer to the returned paymentUrl. CorePort posts its detached signed webhook to Atom. Check fulfillment with GET /api/v1/my-project/orders/<order-id>.

5. Import the certificate

GET /api/v1/my-project/licenses/customer-core-id

Pass the returned certificate to flutter_licensing. The client checks product, key ID, time bounds, and signature locally.

Public endpoints

  • POST /api/v1/<project>/orders
  • GET /api/v1/<project>/orders/<order-id>
  • POST /wh/<project>
  • GET /api/v1/<project>/licenses/<customer>
  • GET /api/v1/<project>/keys