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 headless invoice

Generate new payment method

Base url :

/invoice/new/headless

Method :

POST

Auth :

Require

Params :

NONE

Body :

Key
Type
Data

amountToken

uint

amount , in token

amountUsd

uint

amount , in usd

comment

string

Some words in invoice

callback

string

Callback path

type

int

ChainId of invoice

token

int

TokenId of invoice

address

string

Reciver address

label

string

Invoice tittle

timeout

uint

Timeout limit to this invoice

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"
    }
}
```
Previous[POST] New invoiceNext[GET] Get invoice by id

Last updated 1 year ago

⌨️
🎓