> For the complete documentation index, see [llms.txt](https://slippay.gitbook.io/slippay-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://slippay.gitbook.io/slippay-docs/quickstart.md).

# Quickstart

Get from "no account" to "paid order" in five minutes.

## 1. Sign up

Open [api.slippay.cc/signup](https://api.slippay.cc/signup), create a merchant account, drop a Stellar receive address, and copy the API key shown on the Settings tab. The key is shown once; rotate from the dashboard if you lose it.

API keys look like:

```
sk_live_<64 hex characters>
```

## 2. Create your first order

```sh
curl -X POST https://api.slippay.cc/api/v1/orders \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "brl_amount": "99.90",
    "external_ref": "test_order_001"
  }'
```

Response (`201 Created`):

```json
{
  "order": {
    "id": "ord_3f1a8c4d-...",
    "memo": "ce230c1913a3668164c8544ac49fd244fba452b19ddee02425386945a5e85cd2",
    "brl_amount": "99.90",
    "usdc_amount": "18.16",
    "rate_brl_usdc": "5.50",
    "expires_at": "2026-05-10T14:30:00Z",
    "status": "pending"
  },
  "checkout_url": "https://api.slippay.cc/checkout/ord_3f1a8c4d-..."
}
```

Three fields you'll use downstream:

* `order.id` — pass this to the SDK or store it on your side.
* `order.memo` — 32-byte hash that Stellar uses to route the payment to this order.
* `checkout_url` — open in a buyer browser to complete payment.

## 3. Have the buyer pay

Open `checkout_url` in a browser. The hosted page handles wallet selection (Freighter, Lobstr, xBull, Albedo, Hana), shows the BRL/USDC amount, and asks for one signature.

For embedded checkout in your own site, see the [drop-in SDK guide](/slippay-docs/guides/drop-in-sdk.md).

## 4. Receive the webhook

Set a webhook URL in your merchant Settings. SlipPay posts to it when the on-chain payment confirms (\~6 seconds after buyer signs):

```http
POST https://your-store.com/webhooks/slippay
Content-Type: application/json
X-Slippay-Signature: <hex hmac sha256>

{
  "type": "order.paid",
  "data": {
    "id": "ord_3f1a8c4d-...",
    "external_ref": "test_order_001",
    "brl_amount": "99.90",
    "usdc_amount": "18.16",
    "tx_hash": "20655a78f270de139fed0cbc70b37e663253ca2723f957edc27966b56c21ba5c",
    "memo": "ce230c1913a3668164c8544ac49fd244fba452b19ddee02425386945a5e85cd2",
    "paid_at": "2026-05-10T14:00:06Z"
  }
}
```

Verify HMAC, mark the order paid in your system, return `2xx`. Detailed guide: [handle webhooks](/slippay-docs/guides/webhooks-handler.md).

## 5. (Optional) Set up recurring billing

```sh
curl -X POST https://api.slippay.cc/api/v1/subscriptions \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "brl_amount": "29.90",
    "period_seconds": 2592000,
    "asset_code": "USDC",
    "max_periods": 12,
    "external_ref": "customer_42_pro_plan"
  }'
```

Then trigger each cycle from your billing scheduler:

```sh
curl -X POST https://api.slippay.cc/api/v1/subscriptions/<sub_id>/charge \
  -H "Authorization: Bearer sk_live_your_key"
```

Idempotent on time: calling charge twice within the same period returns the same pending order, never double-bills. Full guide: [recurring billing](/slippay-docs/guides/recurring-billing.md).

## What just happened

The order you created went through this pipeline:

```
your POST -> SlipPay api -> postgres (orders row, status=pending)
                                |
                          merchant opens checkout_url
                                |
                          buyer signs Stellar tx with order.memo
                                |
                          Horizon broadcasts payment
                                |
                          SlipPay listener (Horizon SSE) sees it
                                |
                          matcher validates: asset, issuer, dest, memo, amount
                                |
                          reconciler updates orders.status=paid
                                |
                          webhook delivery -> your endpoint (HMAC signed)
```

Three runtime processes, all live at the same domain. Architecture deep dive: [concepts/architecture](/slippay-docs/concepts/architecture.md).

## Going to mainnet

Testnet uses fake USDC issued by Circle's test issuer. To accept real USDC:

1. Set `network: "mainnet"` on your merchant via dashboard or `PATCH /v1/merchants/me`.
2. Verify your `stellar_address` has a USDC trustline on Stellar mainnet (issuer `GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN`).
3. See [docs/mainnet-readiness.md](/slippay-docs/operations/mainnet-readiness.md) for the full checklist.

> **Note**: mainnet launch is gated on a BR anchor partnership for the Pix-in leg. Without it, buyers must already hold USDC and a Stellar wallet, which caps your TAM at <1% of Brazilian e-commerce buyers. See [regulatory framing](/slippay-docs/concepts/regulatory.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://slippay.gitbook.io/slippay-docs/quickstart.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
