Invoice creation

Request

curl -X POST https://api.bitsby.app/invoices/create \
  -H "Authorization: Token MSvL2ltaDZdWVjmZURURMVWhqSJLT2NURjhL2Fla1Z1T1IxQTltKs1T3Ay" \
	-F "projectId=9deea1e2-0c08-41a3-bdc2-a34eada3892d" \
	-F "amountFiat=10.55" \
	-F "currencyFiat=EUR" \
	-F "description=12 months license for BITSBY" \
	-F "serviceData={\"userId\":100,\"orderId\":500}" \
	-F "timeToPay=6"

Request parameters

ParameterData typeDescriptionExampleMandatory?

projectId

UUID

Project ID in UUID format

1c48b092-9878-48f5-b441-07a8a48e7b54

yes

amountFiat

Float

Amount in fiat currency

10.55

yes

currencyFiat

String

Fiat currency. Valid values: USD, EUR, RUB

EUR

yes

description

String

Description of the product or service. Displayed to the buyer on the payment page

12 months license for BITSBY

no

serviceData

String

Service data. NOT displayed to the buyer. When paying the invoice, it is passed to the webhook URL of the store. This data is used to link the invoice and payment to the buyer in the merchant's webhook. It is convenient to use data in JSON format

{"userId":100,"orderId":500}

no

timeToPay

Integer

Time in hours to pay the invoice. Valid values: 0.5, 1, 3, 6, 12

1

yes

Example answer

{
   "result":"success",
   "data":{
      "id":"ade9550d-3dc7-4fd3-b94e-3b4c12aaaa0c",
      "uid":"MXNj4m8HhcM4",
      "createDatetime":"2024-02-29 15:20:24",
      "timeToPayDatetime":"2024-03-01 03:20:24",
      "url":"https:\/\/dash.bitsby.app\/invoices\/pay\/MXNj4m8HhcM4",
      "wallets":[
         {
            "id":"c27b0847-40c9-4f1e-87f5-9c3d4999dfc1",
            "name":"usdt-bnb",
            "blockchain":"bnbSmartChain",
            "cryptocurrency":"usdt",
            "address":"0x1427ca2c71bCa28f0B619b70E3F112065D5411aC",
            "amountCrypto":"11.45000000"
         },
         {
            "id":"a4c9e2ee-9a03-43e5-a1a1-00caf679d16a",
            "name":"usdt-ethereum",
            "blockchain":"ethereum",
            "cryptocurrency":"usdt",
            "address":"0x1427ca2c71bCa28f0B619b70E3F112065D5411aC",
            "amountCrypto":"11.45000000"
         },
         {
            "id":"47aa71e2-07a0-482e-9172-7114d7376ba0",
            "name":"usdt-tron",
            "blockchain":"tron",
            "cryptocurrency":"usdt",
            "address":"TKbstUwMzLrfTAGL4erYb7gc7ghmHQ9zG7",
            "amountCrypto":"11.45000000"
         },
         {
            "id":"d7169f3a-f354-4f84-b85e-cf63e0a53367",
            "name":"ethereum",
            "blockchain":"ethereum",
            "cryptocurrency":"eth",
            "address":"0x1427ca2c71bCa28f0B619b70E3F112065D5411aC",
            "amountCrypto":"0.00329601"
         },
         {
            "id":"dee35e92-a2e2-4b12-be8c-e5505c62f1d6",
            "name":"btc",
            "blockchain":"bitcoin",
            "cryptocurrency":"btc",
            "address":"bc1qd9hs6dal8k2x0l8zhsgywqyvn9tpj3mrkk430t",
            "amountCrypto":"0.00018186"
         }
      ]
   }
}

Answer parameters

ParameterDescription

id

Invoice ID in UUID format

uid

Invoice ID (for buyer)

createDatetime

Date and time of invoice creation (UTC)

timeToPayDatetime

The date and time until which the invoice is valid (UTC). The buyer must have time to pay the invoice before this date

url

A link to the payment page for the buyer. This link must be given to the buyer to pay the invoice

wallets

A list of your crypto wallets with reserved amounts. During the invoice validity period the service will check incoming transactions to the specified addresses of crypto wallets with the corresponding amounts

wallets.id

Wallet ID in UUID format

wallets.name

Wallet name

wallets.blockchain

Blockchain of the crypto wallet

wallets.cryptocurrency

Cryptocurrency of the wallet

wallets.address

Crypto wallet address

wallets.amountCrypto

Reserved (expected) payment amount in cryptocurrency

Last updated