Tonspay
  • 😇Welcome
  • 🚀Roadmap
  • 💰Price
  • 📈Tokenomics
  • ✌️Chain Supports
  • 🤖Tonspay-Bot
    • General
    • Crosschain Payment
  • 🌉Tonsbridge
    • Genral
    • How to use Tonsbridge
  • 📱TONSPAY-WEBAPP
    • General
    • Pages
      • Home Page
      • Wallet Page
  • ☕Tonspay-dashboard
    • General
  • 🚂Demo Working Bot
    • General
    • How to use
    • Source code & example
  • ⌨️Develop
    • Get start
    • 🎓Restful Api Interface
      • Payment method management
        • [POST] New payment method
        • [GET] Get payment method
      • Invoice management
        • [POST] New invoice
        • [POST] New headless invoice
        • [GET] Get invoice by id
    • 📬Web-page Api interface
    • ⏮️Callback interface
      • Http interface
      • Websocket interface
      • Callback ${body}
      • 🖨️Self host monitor
  • 🔗Links
    • Github
    • Twitter
    • Website
    • TonspayBot
    • TonspayChannel
    • Dev&Spport Group
    • TonsbridgeBot
    • TonspaySupportBot
    • PitchDeck
Powered by GitBook
On this page
  • Base url :
  • Method :
  • Auth :
  • Params :
  • Body :
  • Response :
  1. Develop
  2. Restful Api Interface
  3. Invoice management

[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"
    }
}
```
PreviousInvoice managementNext[POST] New headless invoice

Last updated 1 year ago

⌨️
🎓