# PAN to GSTIN API

> Verify a PAN to GSTIN in real time. Endpoint: `POST https://api-b2b.stampmitra.in/v1/verify/pan-to-gstin`.

Price: ₹5 per successful call, pay-as-you-go (lower on Growth and Scale). Sandbox keys are free. Prices exclude 18% GST.

- HTML docs: https://developer.stampmitra.in/docs/verification/pan-to-gstin
- Product page: https://developer.stampmitra.in/products/pan-to-gstin
- Pricing: https://developer.stampmitra.in/pricing
- Authentication: https://developer.stampmitra.in/docs/auth

## Verify PAN to GSTIN

`POST https://api-b2b.stampmitra.in/v1/verify/pan-to-gstin`

Required scope: `verification.pan_to_gstin.read`

Validates and verifies a PAN to GSTIN. Requires the `verification.pan_to_gstin.read` scope on the API key. Metered as `pan.to_gstin` after a successful response - usage is only recorded (and the fulfilment wallet debited, for priced services) once verification completes successfully. The response below is the exact real shape returned by `/v1/verify/pan-to-gstin`, including its `referenceId` field.

### 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.
- `pan` (string, required): PAN to resolve to associated GSTIN(s).

### Request example

```json
{
  "pan": "ABCDE1234F"
}
```

### Response example

```json
{
  "referenceId": "SMV-20260927-1L67Z5",
  "found": true,
  "gstins": [
    {
      "gstin": "07AAAAA1111A1Z1",
      "state": "Delhi",
      "status": "Active"
    }
  ]
}
```

### Errors

- 401: Missing or invalid API key
- 403: Valid key, missing required scope
- 400: Validation error
- 402: Insufficient wallet balance
- 429: Rate limited
- 502: Upstream verification service unreachable

Notes: Input format is validated up front - a malformed pan/gstin/etc. fails fast with a 400 rather than being submitted for verification. referenceId (format SMV-YYYYMMDD-XXXXXXX) is StampMitra's own transaction id for this call and is always present, including on a negative (valid: false / found: false) result - both positive and negative determinations are completed, billable verifications. This is not an idempotency key.
