Skip to main content

Types of crypto invoices (Crypto processing)

XAMAX uses several types of crypto invoices, which differ from each other.

What types are there?

Currently, 3 types of crypto invoices have been added to processing:

  • static
  • revolver
  • user

For each invoice created, the User can set a different invoice type.

What is each type for?

Invoice type: static

With this type of invoice, current and subsequent invoices are created for one invoice wallet, until the balance of this wallet reaches the rotation amount and the wallet is rotated.

After rotation, this wallet is no longer used and is deactivated. Funds sent to it will be lost after deactivation.

Invoice type: revolver

With this type of invoice, the current and each subsequent transaction will be created to a new invoice wallet, until the transaction status for one of the wallets is set to Complete, after which this wallet will return to the “issue” and a transaction will be created for it. When a balance in the rotation amount is reached, the wallet data will be rotated.

After rotation, this wallet is no longer used and is deactivated. Funds sent to it will be lost after deactivation.

Invoice type: user

With this type of invoice, the current and subsequent transactions will be created to a new invoice wallet.

Peculiarities:

  • The wallet does not rotate automatically, there is no expiration time, that is, the wallet is eternal until it is forcibly rotated
  • You can make multiple requests with the same code and txID and get the same wallet
  • Funds are withdrawn from the wallet when they reach the value from the wallet-rotate-amount-${CODE} setting
  • The merchant’s client can send any amount, not lower than the minimum value.

In this type of invoice, an invoice is created for the user (payer) and the user data can constantly interact with this invoice.

How to create an invoice with a specific type?

The user can set a default value for all created invoices using various options.

API method

PATCH https://api.xamax.io/v1/merchant/preferences HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json

{
"key": "default-invoice-type",
"value": "static"
}

After setting the settings, when creating an invoice using the API method. The user can specify in the request body:

POST https://api.xamax.io/v1/transaction/invoice HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json

{
"txId": "400",
"code": "usdt",
"amount": "20000000",
"type": "invoice_type_default"
}

Personal Area

Setting the default value for the invoice type in your personal account will be available in the near future.

To install it is necessary for the invoice type to work, you need to complete the following steps:

  1. Opening a personal account
  2. Go to settings
  3. Open the “Crypto Processing” tab
  4. In the drop-down window, select the required invoice type

The value will be automatically saved in the settings and will be applied by default.

Two types of invoice at the same time

For each invoice created, the user can select a different invoice type from the default one set in the settings.

To do this, the user needs to send a request via the API, which specifies the value not of invoice_type_default, but of the desired type. Eg:

By default, the value is set to type = revolver, but the User creates a new invoice with the static type.

POST https://api.xamax.io/v1/transaction/invoice HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json

{
"txId": "400",
"code": "usdt",
"amount": "20000000",
"type": "invoice_type_static"
}