# Quickstart (/docs/quickstart)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 330 · updated: 2026-07-05 -->
Related: [Acme Payments](/docs/index.md), [Webhooks](/docs/webhooks.md)



This guide takes you from an empty project to a captured test charge.

## 1. Get your test key [#1-get-your-test-key]

Grab the secret test key from the Acme dashboard under **Developers → API
keys**. Test keys are free and never touch real money.

## 2. Install the SDK [#2-install-the-sdk]

```bash
bun add @acme/payments
```

## 3. Create a charge [#3-create-a-charge]

```ts title="charge.ts"
import { Acme } from "@acme/payments"

const acme = new Acme(process.env.ACME_SECRET_KEY)

const charge = await acme.charges.create(
    {
        amount: 1999, // cents
        currency: "usd",
        source: "tok_visa_test",
        description: "Order #1001",
    },
    { idempotencyKey: "order-1001" },
)

console.log(charge.id, charge.status) // ch_… "succeeded"
```

The same call over raw HTTP:

```bash
curl https://api.acme.dev/v1/charges \
  -H "Authorization: Bearer sk_test_51AcmeDemoKey" \
  -H "Idempotency-Key: order-1001" \
  -d amount=1999 -d currency=usd -d source=tok_visa_test
```

## 4. Confirm it worked [#4-confirm-it-worked]

Every charge appears in the dashboard within seconds. In test mode the
`tok_visa_test` token always succeeds; use `tok_visa_declined` to exercise
your failure paths.

Next: set up [webhooks](/docs/webhooks) so your backend hears about payment
events without polling.
