Create quick fiat invoice

POST https://app.thedex.cloud/api/v1/invoices/create/quick/fiat

Headers

Name
Type
Description

X-EX-APIKEY*

String

Your API key

X-EX-PAYLOAD*

String

Body to base64

X-EX-SIGNATURE*

String

Encrypted body with the secret key

Request Body

Name
Type
Description

amount*

BigDecimal

fiatCurrency*

String

payCurrency*

String

merchantId*

String

Merchant ID

You can find it on page 'Merchants' in your account

orderId

String

Order ID in your system

email

String

clientId

String

ID of your client

title

String

max size = 50

description

String

max size = 300

recalculation

boolean

Default = false

If recalculation = false, the invoice will be expecting a payment that is equal to or greater than 'amountInPayCurrency'

'amountInPayCurrency' and 'merchantBalance' of invoice will not be recalculated in the case of

Successfulstatus. If client send amount that less than 'amountInPayCurrency' status of invoice will be Underpaid

If recalculation = true, the invoice will be expecting a payment that is equal to or greater than 'amountInPayCurrency'

'amountInPayCurrency' and 'merchantBalance' of invoice will be recalculated in the case of

Successfulstatus. If the client send amount that is less than 'amountInPayCurrency' status of invoice will be Underpaid

Reach out all available invoice statuses by endpoint:

successUrl

String

Custom successUrl for an invoice, that can be differ from merchant settings

failureUrl

String

Custom failureUrl for an invoice, that can be differ from merchant settings

callbackUrl

String

Custom callbackUrl for an invoice, that can be differ from merchant settings

unfixAmount

boolean

Default = false

If unfixAmount = true, the amount of the invoice will be unfixed, so the client can send any amount, and 'amountInPayCurrency' will be recalculated. In this case, only one transaction is allowed to pay.

If unfixAmount = true, the flow of processing invoice will be as recalculation parameter setting

{
   "invoiceId": "String",
   "merchantId": "String",
   "clientId": "String",
   "orderId": "String",
   "purse": "String",
   "amount": "String",
   "currency": "String",
   "payCurrency": "String",
   "blockchainFee": "String",
   "amountInPayCurrency": "String",
   "rate": "String",
   "rateWithCommission": "String",
   "createDate": "String",
   "modifiedDate": "String",
   "status": "Integer",
   "payUrl": "String"
}

Curl request:

curl --location 'https://app.thedex.cloud/api/v1/invoices/create/quick/fiat' \
--header 'X-EX-APIKEY: <string>' \
--header 'X-EX-PAYLOAD: <string>' \
--header 'X-EX-SIGNATURE: <string>' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "amount": "<number>",
  "fiatCurrency": "<string>",
  "payCurrency": "<string>",
  "description": "<string>",
  "email": "<string>",
  "merchantId": "<string>",
  "clientId": "<string>",
  "orderId": "<string>",
  "recalculation": "<boolean>",
  "unfixAmount": "<boolean>",
  "title": "<string>",
  "successUrl": "<string>",
  "failureUrl": "<string>",
  "callbackUrl": "<string>"
}'

Response JSON attributes:

"invoiceId"

String

Invoice id

"merchantId"

String

Merchant Id

"orderId"

String

Order id

"clientId"

String

Client id

"purse"

String

Purse (crypto wallet)

"amount"

String

Amount in fiat currency

"currency"

String

Fiat currency

"payCurrency"

String

Pay currency (crypto currency)

"blockchainFee"

String

Deposit blockchain fee

"amountInPayCurrency"

String

Amount in crypto currency

"rate"

String

Rate

"rateWithCommission"

String

Rate with commission

"createDate"

String

Creation date

"modifiedDate"

String

Modification date

"status"

Integer

"payUrl"

String

Pay Url

Last updated