v1

latestOpenAPI 3.1.02026-07-1421034.9 KB

createInvoice

Creates an invoice, associated to your merchant

post/createInvoice

Headers

AUTHORIZATIONstring required

Your merchant private API key

Request body

Response

200

numberstring
assetstring
blockchainstring
networkstring
statusstring
amountstring
descriptionstring
metadataobject
checkout_urlstring
onchain_urlstring
success_urlstring
cancel_urlstring
{"stackTrail":"paths:/createInvoice:post:responses:200:content:application/json:schema:properties:explorer_url","oasType":"schema","type":"unknown"}
expires_atstring
created_atstring
{"stackTrail":"paths:/createInvoice:post:responses:200:content:application/json:schema:properties:updated_at","oasType":"schema","type":"unknown"}

Example response

{
  "number": "FFU4OXKDBA",
  "asset": "TON",
  "blockchain": "TON",
  "network": "mainnet",
  "status": "pending",
  "amount": "5.000000000000000000",
  "description": "A product to test invoices",
  "checkout_url": "http://localhost:3000/checkout/FFU4OXKDBA",
  "onchain_url": "ton://transfer/EQC1d9c3e5nMmZ4ZWFecv9k6gJl3RA_93TLWRf_1shkCSByC?amount=1000000000&text=U5I8K0N4JU",
  "success_url": "https://example.com/success",
  "cancel_url": "https://example.com/cancel",
  "expires_at": "2022-03-30T00:29:23.626498Z",
  "created_at": "2022-03-29T23:59:23.626575Z"
}