# Getting started

Payfet lets you take payments from your customers on your own website. Your
server creates a checkout, your customer pays by bank transfer, and we tell you
when the money lands.

## The shape of an integration

1. Your server asks Payfet for a checkout, passing the amount and your own order
   reference.
2. Payfet returns a `checkout_url`. You send your customer there, or open it in
   a modal on your page.
3. The page shows a bank account and an exact amount. Your customer transfers
   from their banking app.
4. Payfet confirms the transfer, credits your Payfet wallet, and calls your
   webhook.

> **Payment is by bank transfer, not card.**
> There is no card form. Your customer is shown an account number and an exact
> amount, and pays from their own bank. The account is single-use, tied to that
> exact amount, and expires after about 15 minutes. Confirmation is not instant
> the way a card authorisation is — treat the webhook as the moment you have
> been paid.

## Get your API credentials

From **Payfet for Business → Settings → Token**. Every server-side request sends
all three:

```http
X-Tenant-Token:  your access token
X-Tenant-Secret: your secret key
X-Tenant-BID:    your business id
```

These belong on your server only. Anyone holding them can create checkouts in
your name, so never ship them to a browser or commit them to a repository.

## Your first checkout

```bash
curl -X POST https://api.payfet.org/v1/checkout/sessions/ \
  -H "Content-Type: application/json" \
  -H "X-Tenant-Token: $PAYFET_TOKEN" \
  -H "X-Tenant-Secret: $PAYFET_SECRET" \
  -H "X-Tenant-BID: $PAYFET_BID" \
  -d '{
    "reference": "order_12345",
    "amount": "2500.00",
    "currency": "NGN",
    "customer_email": "customer@example.com"
  }'
```

```json
{
  "reference": "order_12345",
  "slug": "order-12345",
  "checkout_url": "https://checkout.payfet.org/order-12345",
  "amount": "2500.00",
  "currency": "NGN",
  "status": "pending"
}
```

Open that `checkout_url` and you have a working payment page.

## Two things that cost people money

**Amounts are in major units.** `"2500.00"` means ₦2,500, not ₦25. Send the
amount the way you would write it on a receipt.

**Set the amount on your server.** If the price comes from a form field, a query
string, or JavaScript, your customer can change it before it reaches you. Read
it from your own database when you create the checkout.

## Where to go next

- [Accept payments on your site](/docs/inline) — the full integration, including
  the inline modal
- [Node.js SDK](/docs/node)
- [Python SDK](/docs/python)

## No code at all?

Create a **payment link** in Payfet for Business under **Payments → Links**. You
get a shareable `checkout.payfet.org` URL for WhatsApp, email or a bio — the
same checkout page, no server required.
