---
title: "Verify USDC payment for discount code"
method: POST
path: "/v1/payment/confirm"
tags: ["Discounts & Codes"]
---

# Verify USDC payment for discount code

`POST /v1/payment/confirm`

## Request

- Base URL: `https://api.insumermodel.com`
- URL: `https://api.insumermodel.com/v1/payment/confirm`
- Auth: API key in header `X-API-Key`

After /v1/verify, confirm that a USDC payment was made on-chain. The server checks the transaction receipt to verify USDC arrived at the merchant address.

## Request body

- object
  - `code` string, required: Verification code (e.g. INSR-A7K3M)
  - `txHash` string, required: On-chain transaction hash or Solana signature
  - `chainId` union, required: Chains accepted for USDC payment confirmation: Ethereum (1), Base (8453), Polygon (137), Arbitrum (42161), Optimism (10), BNB Chain (56), Avalanche (43114), or "solana". Bitcoin and Tron are not accepted here.
    - 1 | 8453 | 137 | 42161 | 10 | 56 | 43114
    - 'solana'
  - `amount` union, required: USDC amount sent
    - string
    - number

## Response `200`

Payment confirmed

- object
  - `ok` true
  - `data` object
    - `confirmed` boolean
    - `code` string
    - `txHash` string
    - `chainId` union
      - 1 | 8453 | 137 | 42161 | 10 | 56 | 43114
      - 'solana'
    - `chainName` string
    - `amountVerified` string
    - `confirmedAt` string, date-time
  - `meta` Meta
    - `version` string
    - `timestamp` string, date-time

## Other responses

- `400`: Validation error
- `401`: Invalid or missing API key
- `403`: Merchant USDC payments not enabled
- `404`: Code or merchant not found
- `409`: Payment already confirmed
- `410`: Code expired
- `422`: On-chain verification failed
- `429`: Rate limit exceeded. API-key requests count against the key's daily limit; every authenticated response carries X-RateLimit-Limit and X-RateLimit-Remaining headers, and a 429 additionally carries Retry-After (seconds until the window resets).
- `500`: Unexpected server error. Safe to retry; no credits are charged on a 500. Router endpoints return the standard error envelope; standalone endpoints (the ones whose 200 is a flat object) return a flat {"error": "..."} object.
- `503`: On-chain verification temporarily unavailable. Retry in a few seconds.

---

[API](https://skmtc.dev/insumermodel/apis/insumerapi.md) · [All operations](https://skmtc.dev/insumermodel/apis/insumerapi/llms.txt) · [OpenAPI document](https://skmtc.dev/insumermodel/apis/insumerapi/revisions/91f56fe9e3d8?raw)
