> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stablepay.global/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Swap

> Book a quote as a deal, subject to StablePay approval

# Create Swap

Asks StablePay to book a quote from [Get Quote](https://docs.stablepay.global/api-reference/transactions/get-quote.md) at exactly its amount, rate and INR. The swap starts as `pending`. Our desk approves or rejects it. Once approved, it is booked as a deal and settles through your usual OTC flow.

**quoteId** `string` *required*

The `quoteId` returned by `GET /v2/quotes`. Must be used before the quote's `expiresAt`.

## Request

```bash theme={null}
curl -X POST "https://api.stablepay.global/v2/swap" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "quoteId": "qt_0mi4x2k9a3f9c1e8b2d7a" }'
```

## Response

`201 Created` for a new swap. Each quote makes at most one swap, so sending the same `quoteId` again returns that swap with `200 OK`. Retries are safe.

```json theme={null}
{
  "success": true,
  "data": {
    "id": "swp_0mi4x2l1b7e4a90c3f1d2",
    "quoteId": "qt_0mi4x2k9a3f9c1e8b2d7a",
    "status": "pending",
    "side": "sell",
    "asset": "USDT",
    "network": "tron",
    "amount": "1000",
    "inr": "84415.50",
    "rate": 84.4155,
    "dealNumber": null,
    "rejectReason": null,
    "createdAt": "2026-11-18T10:00:20.000Z",
    "reviewedAt": null
  }
}
```

### Response Fields

| Field | Type | Description |
| - | - | - |
| `id` | string | Swap id |
| `quoteId` | string | The quote this swap books |
| `status` | string | `pending`, `approved` or `rejected` |
| `side` | string | `sell` (you sell USDT for INR) or `buy` (you pay INR for USDT) |
| `amount` | string | USDT amount from the quote |
| `inr` | string | INR amount from the quote |
| `rate` | number | Quoted rate |
| `dealNumber` | string \| null | Deal reference, once approved |
| `rejectReason` | string \| null | Why it was rejected, if a reason was given |

## Errors

| Status | `error` | Meaning |
| - | - | - |
| 400 | `ASSET_NOT_SUPPORTED` | Only USDT quotes can be swapped |
| 404 | `QUOTE_NOT_FOUND` | No such quote for your account |
| 409 | `QUOTE_IN_USE` | A concurrent request is swapping this quote; retry shortly |
| 410 | `QUOTE_EXPIRED` | Get a new quote and swap within its validity |

## Checking status

* `GET /v2/swap/{id}` returns one swap.
* `GET /v2/swap?limit=50` lists your swaps, newest first.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.