Webhook URL

Description

The task of this functionality is to send data about the paid invoice to the merchant's server. This is necessary in order to automatically process the payment in the merchant's store and issue the product or service to your buyer.

The WH URL is set individually for each project as a link to the scripts and payment handlers inside the merchant's store.

Every time the invoice status changes to "Paid", the service sends a POST request to this URL in the following format:

{
   "wallet":{
      "id":"47aa71e2-07a0-482e-9172-7114d7376ba0",
      "name":"usdt-tron",
      "blockchain":"tron",
      "cryptocurrency":"usdt",
      "address":"TKbstUwMzLrfTAGL4erYb7gc7ghmHQ9zG7"
   },
   "project":{
      "id":"9deea1e2-0c08-41a3-bdc2-a34eada3892d",
      "name":"Forex monitoring Fxmon.io"
   },
   "invoice":{
      "id":"a4c9e2ee-9a03-43e5-a1a1-00caf679d16a",
      "uid":"AFhygKX21ecd",
      "createDatetime":"2024-02-26 13:29:24",
      "timeToPayDatetime":"2024-02-27 01:29:24",
      "amountFiat":"5.00",
      "calcAmountFiat":"5.02",
      "currencyFiat":"USD",
      "description":null,
      "serviceData":null,
      "status":"paid"
   },
   "payment":{
      "id":"f986ad8d-2298-473d-982a-efbc817b975d",
      "amount":"5.02000000",
      "hash":"74763b65e43bcc9492a6ce9a7f26fbfdbd7635aecd3454420b5e9534cba50ee6",
      "transactionDatetime":"2024-02-26 13:32:57"
   }
}

Answer parameters

ParameterDescription

wallet.id

Wallet ID in UUID format

wallet.name

Wallet name

wallet.blockchain

Crypto wallet blockchain

wallet.cryptocurrency

Cryptocurrency of the wallet

wallet.address

Crypto wallet address

project.id

Project ID in UUID format

project.name

Project name

invoice.id

Invoice ID in UUID format

invoice.uid

Invoice ID (for buyer)

invoice.createDatetime

Date and time of invoice creation (UTC)

invoice.timeToPayDatetime

Date and time until which the invoice is valid (UTC)

invoice.amountFiat

Amount in fiat currency

invoice.calcAmountFiat

Calculated amount in invoice.currencyFiat currency using the cryptocurrency exchange rate at the time of payment. This parameter may differ from the amount in invoice.amountFiat due to the fact that the buyer may have paid the invoice not immediately after creation, but after some time. During this time, the cryptocurrency exchange rate relative to invoice.currencyFiat could change in any direction

invoice.currencyFiat

Currency fiat

invoice.description

Description that was set during invoice creation

invoice.serviceData

Service data that was set via API during invoice creation

invoice.status

Invoice status

payment.id

Payment ID in UUID format

payment.amount

Payment amount in cryptocurrency

payment.hash

Transaction hash in blockchain

payment.transactionDatetime

Date and time of the transaction in blockchain (UTC)

Delivery frequency

At the WH URL, the server should respond with an HTTP code of 200.

If the server response will be with HTTP code different from 200, then the service will consider the notification undelivered. In this case, the service will send repeated requests to this WH URL with the following frequency:

  • 5 minutes after the last failed delivery

  • After 15 minutes

  • After 30 minutes

  • After 1 hour

  • After 3 hours

  • After 6 hours

  • After 12 hours

  • After 24 hours

Further attempts to deliver the notification are stopped.

Last updated