API Reference

Fiat Order

Process description

Create fiat orders to pay for goods and services, as well as to receive fiat deposits to the merchant account.

Integration with cryptocurrency invoices
If you use cryptocurrency invoices, you can pay for them in fiat, when paying, a -
Fiat Order is created, equivalent to the invoice amount in cryptocurrency, you or your users pay in fiat, and receive the selected cryptocurrency to your account.

Order management
All orders created using Fiat Orders are easily tracked and managed through the interface in your merchant account. You will be able to see the status of each order, transaction history and related data.

To create a fiat order via API and receive payment, you need to complete the following steps:

  • Get by merchant account ID, list of geoid and fiat currencies available for this geoid - POST Get geo
  • Select the desired combination - geoid and fiat currency for payment
  • By geoid and the fiat currency available to it, get payment methods, fixed rate, and the expiration date of this rate - POST Get method
  • Pass the data about the selected payment method to the request for creating an order and for getting the URL - POST Create order
    • If the order is successfully created, then in the response we receive a link to the URL for payment
  • After receiving a successful payment, you will receive a webhook - FIAT_APPLIER_FIAT_FUNDS_RECEIVED
    • If after a successful payment a payment adjustment occurs, you will receive a webhook with the adjustment data for the amount - FIAT_APPLIER_ADJUSTMENT
  • If there is an attempt to pay that is not successful, you will receive information about this in the webhook - FIAT_APPLIER_PAYMENT_FAILED
  • If the order time expires and the payment has not been received, you will receive a webhook with the order status unpaid - FIAT_APPLIER_ORDER_UNPAID
    • If after the order expires, there is a status and amount adjustment, you will receive a webhook with the adjustment data - FIAT_APPLIER_ADJUSTMENT

Names of requests on the scheme indicate certain payment API method

Create fiat order request example

Example of the get geo request:

Pass your account ID as a parameter - "account".

Example of the get geo response:

{
  "geo": [
    {
      "geoId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "geoName": "string",
      "geoCode": "string",
      "fiatCurrency": "ARS"
    }
  ]
}

Example of the get method request:

Send in the request the selected geo ID and data on crypto and fiat currency and the amount for payment

{
  "account": "string",
  "timestamp": 0,
  "payload": {
    "currency": {
      "name": "string",
      "feeCurrencyName": "string",
      "coinId": "string",
      "networkData": {
        "frontName": "string",
        "type": "string"
      },
      "scale": 0,
      "blockchainScale": 0,
      "garbageAmount": 0,
      "crypto": true,
      "blockchainName": "string",
      "contract": "string",
      "enabled": true,
      "active": true
    },
    "geoId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }
}

Example of the get method response:

In response you will receive a list of payment methods and rates

{
  "method": [
    {
      "methodName": "string",
      "methodCode": "string",
      "fixedRateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "fixedRate": 0,
      "expiredFixedRateDate": "2024-11-12T12:25:18.983Z",
      "minLimit": 0,
      "maxLimit": 0
    }
  ]
}

Example of the create order request:

Send the amount for payment in cryptocurrency and rate ID

{
  "account": "string",
  "timestamp": 0,
  "payload": {
    "orderType": "INVOICE",
    "amountInCrypto": 0,
    "idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "rateId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "redirectUrl": "string",
    "merchantExternalId": "string"
  }
}

Example of the create order response:

In response you will receive a URL for payments

{
  "url": "string"
}

Example of the get order info request:

Send idempotency key in request

{
  "account": "string",
  "timestamp": 0,
  "payload": {
    "idempotencyKey": "string"
  }
}

Example of the get order info response:

In response you will receive fiat order data

{
  "invoiceId": "string",
  "state": "unpaid",
  "shopId": "string",
  "orderUnpaidType": "string",
  "currency": "string",
  "orderCryptoAmount": 0,
  "paymentCryptoAmount": 0,
  "fiatCurrency": "ARS",
  "orderFiatAmount": 0,
  "paymentFiatAmount": 0,
  "adjustment": {
    "currency": "string",
    "fiatCurrency": "ARS",
    "sumAfterAdjustment": 0,
    "reason": "string",
    "adjustmentDate": "2024-11-12T08:20:44.516Z"
  }
}