Notus API
Fiat

Create a fiat deposit order

This endpoint creates a fiat deposit order for a given quote id.

POST
/api/v1/fiat/deposit
x-api-key<token>

In: header

quoteIdstring
walletAddressstring
Match^0x[a-fA-F0-9]*$
chainIdnumber
taxIdstring

Response Body

curl -X POST "https://api.notus.team/api/v1/fiat/deposit" \
  -H "Content-Type: application/json" \
  -d '{
    "quoteId": "string",
    "walletAddress": "string",
    "chainId": 0,
    "taxId": "string"
  }'
const body = JSON.stringify({
  "quoteId": "string",
  "walletAddress": "string",
  "chainId": 0,
  "taxId": "string"
})

fetch("https://api.notus.team/api/v1/fiat/deposit", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://api.notus.team/api/v1/fiat/deposit"
  body := strings.NewReader(`{
    "quoteId": "string",
    "walletAddress": "string",
    "chainId": 0,
    "taxId": "string"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.notus.team/api/v1/fiat/deposit"
body = {
  "quoteId": "string",
  "walletAddress": "string",
  "chainId": 0,
  "taxId": "string"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.net.http.HttpRequest.BodyPublishers;

var body = BodyPublishers.ofString("""{
  "quoteId": "string",
  "walletAddress": "string",
  "chainId": 0,
  "taxId": "string"
}""");
HttpClient client = HttpClient.newBuilder()
  .connectTimeout(Duration.ofSeconds(10))
  .build();

HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
  .uri(URI.create("https://api.notus.team/api/v1/fiat/deposit"))
  .header("Content-Type", "application/json")
  .POST(body)
  .build();

try {
  HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
  System.out.println("Status code: " + response.statusCode());
  System.out.println("Response body: " + response.body());
} catch (Exception e) {
  e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;

var body = new StringContent("""
{
  "quoteId": "string",
  "walletAddress": "string",
  "chainId": 0,
  "taxId": "string"
}
""", Encoding.UTF8, "application/json");

var client = new HttpClient();
var response = await client.PostAsync("https://api.notus.team/api/v1/fiat/deposit", body);
var responseBody = await response.Content.ReadAsStringAsync();
{
  "depositOrder": {
    "expiresAt": "2023-12-31T23:59:59.999Z",
    "orderId": "123e4567-e89b-12d3-a456-426614174000",
    "paymentMethodToSendDetails": {
      "type": "PIX",
      "base64QrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=",
      "pixKey": "00020101021226990014br.gov.bcb.pix2577pix.bancogenial.com/qrs1/v2/01snLCV5RHN6V3HVjx5abuLYzECFx4hFwmPZgzIRuAbagzHbvA52040000530398654041.005802BR59213rz Servicos Digitais6014Rio de Janeiro62070503***63048B38"
    }
  }
}
{
  "statusCode": 400,
  "id": "FIAT_QUOTE_EXPIRED",
  "message": "The quote with id '03dbe93b-b259-480b-9fb6-3684ad5b28ba' has expired"
}
{
  "statusCode": 404,
  "id": "FIAT_QUOTE_NOT_FOUND",
  "message": "The quote with id '03dbe93b-b259-480b-9fb6-3684ad5b28ba' was not found"
}
{
  "statusCode": 500,
  "id": "FAILED_TO_CREATE_FIAT_DEPOSIT",
  "message": "Failed to create fiat deposit for quote: '03dbe93b-b259-480b-9fb6-3684ad5b28ba'"
}