---
title: "createInvoice"
method: POST
path: "/createInvoice"
---

# createInvoice

`POST /createInvoice`

Creates an invoice, associated to your merchant

## Headers

- `AUTHORIZATION` string, required

## Request body

- object
  - `RAW_BODY` object, required — Invoice input data
    - `asset` string, required — The invoice asset
    - `blockchain` string, required — The invoice blockchain, on on which the asset is located
    - `network` string, required — The blockchain network, on which the asset is located. Examples: "testnet" and "mainnet" in TON.
    - `amount` number, double, required — The invoice amount.
    - `description` string — The invoice description.
    - `metadata` string, json — The invoice attached metadata.
    - `success_url` string — The URL to which the user is redirected to when the invoice is completed.
    - `cancel_url` string — The URL to which the user is redirected to when the invoice is cancelled.
    - `expires_at` integer — Minutes to invoice expiration. If not defined, default is 600 minutes (10 hours).

## Response `200`

200

- object
  - `number` string
  - `asset` string
  - `blockchain` string
  - `network` string
  - `status` string
  - `amount` string
  - `description` string
  - `metadata` object
  - `checkout_url` string
  - `onchain_url` string
  - `success_url` string
  - `cancel_url` string
  - `explorer_url` unknown
  - `expires_at` string
  - `created_at` string
  - `updated_at` unknown

## Other responses

- `400` — 400

---

[API](https://skmtc.net/telepay/apis/telepay-rest-api.md) · [All operations](https://skmtc.net/telepay/apis/telepay-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/telepay/telepay-rest-api/versions/02f04301c30e/schema)
