---
title: "Create invoice"
method: POST
path: "/api/v1/services/invoices/invoice"
tags: ["invoices_service"]
---

# Create invoice

`POST /api/v1/services/invoices/invoice`

## Request

- Base URL: `http://localhost:8888`
- URL: `http://localhost:8888/api/v1/services/invoices/invoice`
- Auth: none declared

## Query parameters

- `app_id` integer

## Request body

- object
  - `amount` string, required: nano ton are expected
  - `life_time` integer, required: seconds are expected
  - `description` string
  - `currency` 'TON' | 'USDT'

## Response `201`

Service invoices fee

- InvoicesInvoice
  - `id` string, required
  - `amount` string, required
  - `overpayment` string
  - `description` string, required
  - `status` 'pending' | 'paid' | 'cancelled' | 'expired', required
  - `pay_to_address` string, required
  - `paid_by_address` string
  - `payment_link` string, required
  - `info` unknown
  - `date_change` integer, required
  - `date_expire` integer, required
  - `date_create` integer, required
  - `currency` 'TON' | 'USDT', required

## Other responses

- `400`: Something went wrong on client side
- `404`: The specified resource was not found
- `500`: Something went wrong on server side

## Changes

- **2024-11-08** `dc03bb6c514d`: 2 info
  - the `currency` request property default value `TON` was removed
  - the `currency` response's property default value `TON` was removed for the status `201`
- **2024-10-17** `f4284b424943`: 2 info
  - added the new optional request property `currency`
  - added the required property `currency` to the response with the `201` status
- **2024-03-22** `dbd561304b3b`: 1 info
  - added the optional property `info` to the response with the `201` status
- **2023-11-01** `f9f50dcb6417`: 1 info
  - added the media type `application/json` for the response with the status `201`
- **2023-10-26** `2596aa00157e`: 1 breaking
  - removed the media type `application/json` for the response with the status `201`

[Operation history](https://skmtc.dev/tonkeeper/apis/rest-api-to-ton-console/changes/api/v1/services/invoices/invoice/post.md)

---

[API](https://skmtc.dev/tonkeeper/apis/rest-api-to-ton-console.md) - [All operations](https://skmtc.dev/tonkeeper/apis/rest-api-to-ton-console/llms.txt) - [OpenAPI document](https://skmtc.dev/tonkeeper/apis/rest-api-to-ton-console/revisions/bffcc11719d3?raw)
