# e-Stamp Order Creation API

> Create an e-Stamp order using the generic orders API with an e-Stamp serviceCode. Endpoint: `POST https://api-b2b.stampmitra.in/v1/orders`.

API fee: ₹5 per successful call, pay-as-you-go (lower on Growth and Scale). State procurement fee and stamp duty are quoted per order. Sandbox keys are free. Prices exclude 18% GST.

- HTML docs: https://developer.stampmitra.in/docs/estamp/estamp-orders
- Product page: https://developer.stampmitra.in/products/estamp-orders
- Pricing: https://developer.stampmitra.in/pricing
- Authentication: https://developer.stampmitra.in/docs/auth

## Create an order (generic - works for any entitled serviceCode, including e-Stamp)

`POST https://api-b2b.stampmitra.in/v1/orders`

Required scope: `orders.create`

Generic order-creation endpoint. For e-Stamp, pass an e-Stamp `serviceCode` (from GET /v1/services) and put instrument/party/value details in the free-form `details` object. There is no e-Stamp-specific request/response contract yet (no first-class `state`, `article`, `parties[]` fields) - the shape of `details` for e-Stamp is not finalized upstream.

### Parameters

- `Authorization` (header, required): Bearer <api-key> (e.g. sk_test_... in sandbox, sk_live_... in production). The x-api-key header is also accepted.
- `Idempotency-Key` (header, optional): Optional idempotency key.
- `externalOrderId` (string, required): Your own reference for this order.
- `externalCustomerId` (string, required): Your own reference for the customer.
- `serviceCode` (string, required): The entitled service to order (e.g. an estamp.* code).
- `details` (object, optional): Free-form service-specific payload (e-Stamp field shape is not finalized).

### Request example

```json
{
  "externalOrderId": "ord_ext_123",
  "externalCustomerId": "cust_ext_456",
  "serviceCode": "estamp.instrument.rent_agreement",
  "details": {
    "state": "MH",
    "stampValue": 500,
    "note": "Shape not finalized - illustrative only"
  }
}
```

### Response example

```json
{
  "externalOrderId": "ord_ext_123",
  "createdAt": "2026-10-15T09:41:07.000Z",
  "serviceCode": "estamp.instrument.rent_agreement"
}
```

## Get an order

`GET https://api-b2b.stampmitra.in/v1/orders/:id`

Required scope: `orders.read`

Fetch an order by the externalOrderId you supplied when you created it.

### Parameters

- `Authorization` (header, required): Bearer <api-key> (e.g. sk_test_... in sandbox, sk_live_... in production). The x-api-key header is also accepted.

## Get order status

`GET https://api-b2b.stampmitra.in/v1/orders/:id/status`

Required scope: `orders.read`

Poll the current lifecycle status of an order.

### Parameters

- `Authorization` (header, required): Bearer <api-key> (e.g. sk_test_... in sandbox, sk_live_... in production). The x-api-key header is also accepted.
