# Quickstart: take your first payment

> Go from a new business account to your first paid payment link with the Anytime Capital Payments API: create a key, create a link, verify a webhook.

Source: https://anytime-capital.com/docs/quickstart · Markdown: https://anytime-capital.com/docs/quickstart.md · All docs: https://anytime-capital.com/docs/llms-full.txt

This guide takes you from a new account to a paid payment link and a verified webhook in about fifteen minutes. You need a terminal and, for the webhook, a server reachable over `https://`.

## 1. Open a business account and get verified

[Create your business account](https://anytime-capital.com/business/get-started) and finish verification in **Settings → Verification**. The API answers `403 NOT_ENROLLED` until your business is verified and set up for card payments.

## 2. Create a secret key

In **Settings → Developers**, choose **Create key** and copy it: it's shown once. Keep it in an environment variable on your server, never in front-end code. Check it works:

```bash
export ANYTIME_API_KEY="ak_live_…"

curl "https://anytime-capital.com/api/v1/payments?limit=1" \
  -H "Authorization: Bearer $ANYTIME_API_KEY"
```

A `200` with `{"object": "list", …}` means you're connected. A `401` means the key is wrong; see [Authentication](https://anytime-capital.com/docs/authentication.md).

## 3. Create a payment link

**curl**

```bash
curl -X POST https://anytime-capital.com/api/v1/payment-links \
  -H "Authorization: Bearer $ANYTIME_API_KEY" \
  -H "Idempotency-Key: order-1042" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Consulting — October",
    "amountCents": 12500,
    "singleUse": true,
    "metadata": { "orderId": "1042" }
  }'
```

**Node.js 18+**

```javascript
import { randomUUID } from "node:crypto";

// Server-side only: the key never reaches the browser.
const res = await fetch("https://anytime-capital.com/api/v1/payment-links", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.ANYTIME_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": randomUUID(), // store it with the order and reuse it on retries
  },
  body: JSON.stringify({
    title: "Consulting — October",
    amountCents: 12500,
    singleUse: true,
    metadata: { orderId: "1042" },
  }),
});
const link = await res.json();
if (!res.ok) throw new Error(`${link.error.code}: ${link.error.message}`);
console.log(link.url); // send the customer here
```

**Python**

```python
import os, uuid, requests

res = requests.post(
    "https://anytime-capital.com/api/v1/payment-links",
    headers={
        "Authorization": f"Bearer {os.environ['ANYTIME_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),  # store it with the order and reuse it on retries
    },
    json={"title": "Consulting — October", "amountCents": 12500, "singleUse": True, "metadata": {"orderId": "1042"}},
    timeout=30,
)
link = res.json()
if not res.ok:
    raise RuntimeError(f"{link['error']['code']}: {link['error']['message']}")
print(link["url"])  # send the customer here
```

**Response (201)**

```json
{
  "object": "payment_link",
  "id": "pl_4kTz8QwN2xYb6RcD1mPa",
  "url": "https://anytime-capital.com/pay/business/pl_4kTz8QwN2xYb6RcD1mPa",
  "title": "Consulting — October",
  "description": null,
  "amountCents": 12500,
  "currency": "usd",
  "active": true,
  "singleUse": true,
  "shippingCents": 0,
  "collectShipping": false,
  "allowDiscountCodes": false,
  "successUrl": null,
  "confirmationMessage": null,
  "requireTermsConsent": false,
  "metadata": {
    "orderId": "1042"
  },
  "items": [],
  "createdAt": "2026-10-01T09:30:00.000Z",
  "deactivatedAt": null,
  "allowQuantity": false,
  "maxQuantity": null,
  "customFields": [],
  "tipsEnabled": false,
  "payWhatYouWant": false,
  "minAmountCents": null
}
```

## 4. Send the customer to the link

Redirect the customer to `url`, email or text it, or show it as a QR code. To keep customers on your site, open the same link as a Pay button or an inline checkout: see [Checkout](https://anytime-capital.com/docs/checkout.md). Add `successUrl` when you create the link to bring them back to your site afterwards.

## 5. Confirm payment with a webhook

In **Settings → Developers**, choose **Add endpoint**, enter your `https://` URL and pick `payment.succeeded`. Store the signing secret as `ANYTIME_WEBHOOK_SECRET`, verify the `Anytime-Signature` header on every request, and mark order `data.metadata.orderId` paid. The full verification code for Node.js, Next.js and Python is on [Webhooks](https://anytime-capital.com/docs/webhooks.md).

## 6. Check your payments

```bash
curl "https://anytime-capital.com/api/v1/payments?status=paid&limit=10" \
  -H "Authorization: Bearer $ANYTIME_API_KEY"
```

> **There is no separate test mode:** API keys are live keys. To try the whole flow, create a $1.00 link, pay it with your own card, and refund it from **Orders** in the dashboard. Use **Send test event** in Settings → Developers to test your webhook endpoint without a payment.

## Next steps

- [Invoices](https://anytime-capital.com/docs/invoices.md): Bill a customer by email with line items, tax and deposits.
- [Errors](https://anytime-capital.com/docs/errors.md): Every error code and how to retry safely.
- [Idempotency](https://anytime-capital.com/docs/idempotency.md): Retry any POST without doing it twice.
- [Build with AI](https://anytime-capital.com/docs/build-with-ai.md): Let Claude or your editor's assistant write the integration.

---

Anytime Capital is a fintech company, not a bank. Payment processing, banking and payout services are provided by Anytime Capital's licensed partners. Rates shown are for US card payments; international cards, currency conversion and disputes may carry additional fees shown in your dashboard before you accept a payment.
