HTML forms and links
HTML forms and links are one of the methods to create new invoices.
It is used as the easiest and fastest way to add cryptocurrency payments on websites, online stores and bots.
The method has one limitation: no more than 50 active (unpaid) invoices can be created this way at a time.
HTML forms
Place the following HTML form structure anywhere on the page where you want to display the payment button:
You can decorate the Pay button in any format to fit your page design using CSS styles.
Form parameters
securityKey
String
Security key from project settings
e54mc20bzkrf9evty
yes
projectId
UUID
Project ID in UUID format
1c48b092-9878-48f5-b441-07a8a48e7b54
yes
amountFiat
Float
Amount in fiat currency
10.55
yes
currencyFiat
String
Currency of fiat. Valid values: USD, EUR, RUB
EUR
yes
timeToPay
Integer
Time in hours for invoice payment. Valid values: 0.5, 1, 3, 6, 12
6
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
output
String
Used for debugging the form. If this parameter is set, then detailed information about errors will be output.
This parameter cannot be used in working mode.
Valid values: errors
errors
no
Links
Links The link for invoice creation is convenient to use in chat bots, to pass to other users in chat rooms. But it can also be used on regular pages.
The link uses all the same parameters as HTML form. Example:
Security Key
It is used to check if the form is up to date. If an incorrect combination of security key and project ID is specified, the user will receive an invoice creation error.
Why do I need a security key? In case the method of creating invoices by HTML forms and links has become irrelevant for you - you just generate a new security key in the project settings and all forms and links on the sites stop working (creating invoices).
Webhook and notifications
Invoices created by this method are identical to invoices created via personal cabinet or API. Accordingly, when these invoices are paid, all notifications that were configured in the project will be triggered.
Last updated