# Overview

One API for subscriptions, usage, invoices and payments. Start with the quickstart, or go straight to the API reference.

```ts title="first call"
import { Mint } from '@globaly-inc/mint-sdk'

const mint = new Mint({
  secretKey: process.env.MINT_SECRET_KEY!, // gpy_test_…
})

await mint.customers.upsert({
  externalId: 'ws_123',
  email: 'owner@acme.dev',
})

const session = await mint.checkout.create({
  customerExternalId: 'ws_123',
  planCode: 'pro_monthly',
  successUrl: 'https://app.acme.dev/billing?ok=1',
  cancelUrl: 'https://app.acme.dev/billing',
})
// session.url is the hosted checkout page
```

- [Quickstart](https://staging.globalymint.com/docs/quickstart.md): A customer, a checkout and a verified webhook, in test mode.
- [API keys](https://staging.globalymint.com/docs/api-keys.md): Key types, scopes, expiry and how to keep keys safe.
- [Webhooks](https://staging.globalymint.com/docs/webhooks.md): Receive events, verify signatures, and every event we send.
- [API reference](https://staging.globalymint.com/docs/api.md): Every endpoint, from the OpenAPI document.
- [Hosted checkout](https://staging.globalymint.com/docs/checkout.md): Send a customer to a payment page we run.
- [Customer portal](https://staging.globalymint.com/docs/portal.md): Plans, seats, cards and invoices, self-serve.
- [Import subscribers](https://staging.globalymint.com/docs/import.md): Move existing subscribers without asking for cards again.
- [For coding agents](https://staging.globalymint.com/docs/agents.md): llms.txt and a Markdown version of every page.

API version 2026-07-01. SDK 0.3.0.
