[POST] New invoice

Generate new payment method

Base url :

/invoice/new

Method :

POST

Auth :

Require

Params :

NONE

Body :

Key
Type
Data

amountToken

uint

amount , in token

amountUsd

uint

amount , in usd

paymentMethodId

string

Id of using payment method

comment

string

Some words in invoice

callback

string

Callback path

timeout

uint

Timeout limit for this inovice

redirect

string

The redirect url after user payment .

Response :

```json
{
    "code": 200, //Status code . 200 success 500 error
    "data": {
        "invoiceId": "9936ace52b30d567d55253c4a57fad8f",
        "botLink": "https://t.me/tonspay_bot?start=19936ace52b30d567d55253c4a57fad8f",
        "webLink": "https://wallet.tonspay.top/page-invoices?id=9936ace52b30d567d55253c4a57fad8f",
        "webappLink": "https://t.me/tonspay_bot/invoice?startapp=9936ace52b30d567d55253c4a57fad8f"
    }
}
```

Last updated