Source: https://cryptanio.com/fr/docs/reference/create-invoice/
Contract / release / updated: v1 / 1.0.0 62 / 2026-10-10

[Référence de l’API](https://cryptanio.com/fr/docs.html#reference)

# Créez une facture

POST `/v1/invoices`

Contrat v1 / 1.0.0 62 / 2026-10-10

[Markdown](https://cryptanio.com/fr/docs/reference/create-invoice/index.md) [OpenAPI](https://cryptanio.com/openapi.json)

Créer une facture Payments. Fournissez chain et amount pour des coordonnées de paiement fixes, ou omettez chain, asset, amount, address et tolerance et fournissez invoice_currency et invoice_amount pour laisser le payeur choisir le moyen de paiement. Cette seconde option exige une clé de production autorisant l’écriture et Idempotency-Key ; la création et une nouvelle tentative identique renvoient l’URL de paiement interactive. GET et les listes conservent des liens en lecture seule. Après un délai d’attente dépassé, renvoyez le même corps avec le même Idempotency-Key ; des paramètres différents renvoient 409. Une nouvelle tentative avec clé renvoie 201 avec le même ID. Sans clé, répéter une création avec moyen fixe peut créer une autre facture. Ne crée pas de paiement sur la blockchain.

Permissions de la clé : `invoices` / write / `payments`.

## Paramètres

| Paramètre | Entrant | Obligatoire | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | header | Non | 16–80 lettres ASCII, chiffres, tirets ou tirets bas. ID logique de commande unique au sein du compte. Obligatoire lorsque le payeur choisit le moyen de paiement.; `string` minLength: `16`; maxLength: `80`; pattern: `^[A-Za-z0-9_-]+$` |

## Corps de la requête

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `project` | `string` | Non | ID du projet Payments ; une sélection explicite est recommandée. Une clé limitée à un projet utilise son projet. |
| `chain` | `string` | Non | Code réseau.; minLength: `1` |
| `asset` | `string` | Non | Actif de paiement pris en charge : native, symbole ou identifiant connu. Les actifs acceptés dépendent du réseau ; en cas d’omission, native est sélectionné.; Par défaut : `native` |
| `amount` | `string` | Non | Montant crypto positif en unités de l’actif ; la précision ne doit pas dépasser les décimales de l’actif.; pattern: `^[0-9]+(?:\.[0-9]+)?$` |
| `reference` | `string` | Non | Votre référence de commande ; ne remplace pas Idempotency-Key.; maxLength: `120` |
| `address` | `string` | Non | Adresse facultative du pool de paiement du projet. Sinon, le service en sélectionne une. |
| `tolerance` | `string` | Non | Sous-paiement autorisé en unités de l’actif, strictement inférieur à amount. Omettre pour une tolérance nulle.; pattern: `^[0-9]+(?:\.[0-9]+)?$` |
| `customer` | `object` | Non |  |
| `product` | `object` | Non |  |
| `payer` | `object` | Non |  |
| `metadata` | `object` | Non | Jusqu’à 20 paires, au maximum 8192 octets JSON. N’incluez pas de secrets. |
| `invoice_currency` | `string` | Non | Devise à trois lettres du prix de commande ; uniquement avec invoice_amount.; pattern: `^[A-Za-z]{3}$` |
| `invoice_amount` | `string` | Non | Montant positif de la commande en invoice_currency. Avec chain et amount, il constitue l’instantané du marchand. Sans coordonnées de paiement, il s’agit de la valeur fixe de la facture utilisée pour calculer le montant de l’actif choisi par le payeur.; maxLength: `80`; pattern: `^[0-9]+(?:\.[0-9]+)?$` |
| `expires_in` | `integer` | Non | Délai de paiement en minutes, à compter de l’émission réussie des coordonnées. L’absence de valeur ou 0 applique la politique du projet (60 par défaut) ; maximum 10080. Les anciennes requêtes à moyen fixe traitent aussi les valeurs négatives comme absentes ; le paiement avec choix du moyen refuse les valeurs négatives.; Par défaut : `60`; maximum: `10080` |



### application/json

```json
{
  "project": "2002",
  "invoice_currency": "USD",
  "invoice_amount": "12.50",
  "reference": "order-42"
}
```



## Exemples de requêtes

Les exemples réalisent une opération réelle dans votre compte. Définissez les variables d’environnement nommées dans le code. Gardez votre clé privée ; les requêtes d’écriture ne sont pas réessayées automatiquement.



### Shell / cURL

```bash
#!/usr/bin/env bash
set -euo pipefail
: "${CRYPTANIO_API_KEY:?Set CRYPTANIO_API_KEY}"
: "${CRYPTANIO_OPERATION_ID:?Set CRYPTANIO_OPERATION_ID}"
: "${CRYPTANIO_PROJECT_ID:?Set CRYPTANIO_PROJECT_ID}"
json_string() {
  local text="$1" char code index output='"'
  for ((index=0; index<${#text}; index++)); do
    char="${text:index:1}"
    case "$char" in
      '"'|'\') output+="\\$char" ;;
      *) printf -v code '%d' "'$char"
         if ((code < 32)); then printf -v char '\\u%04x' "$code"; fi
         output+="$char" ;;
    esac
  done
  printf '%s"' "$output"
}
response_file="$(mktemp)"
trap 'rm -f "$response_file"' EXIT
transfer_status=0
http_status="$(curl \
  --silent --show-error --max-time 30 --request POST \
  --header "Authorization: Bearer $CRYPTANIO_API_KEY" \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header "Idempotency-Key: $CRYPTANIO_OPERATION_ID" \
  --data-binary '{"project":'"$(json_string "$CRYPTANIO_PROJECT_ID")"',"invoice_currency":"USD","invoice_amount":"12.50","reference":"order-42"}' \
  "https://api.cryptanio.com/v1/invoices" \
  --output "$response_file" --write-out '%{http_code}')" || transfer_status=$?
if [[ "$http_status" == 2?? ]]; then
  cat "$response_file"
  exit "$transfer_status"
fi
printf 'HTTP %s\n' "$http_status" >&2
cat "$response_file" >&2
exit 1
```



[Télécharger l’exemple](https://cryptanio.com/files/examples/api/create-invoice.sh)



### Go

```go
// Go; standard library only. Run: go run request.go
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
    "net/url"
    "os"
    "time"
)

func env(name string) string {
    value := os.Getenv(name)
    if value == "" { fmt.Fprintln(os.Stderr, "Set", name); os.Exit(1) }
    return value
}
func run() error {
    path := "/v1/invoices"

    endpoint, err := url.Parse("https://api.cryptanio.com" + path)
    if err != nil { return err }
    query := endpoint.Query()

    endpoint.RawQuery = query.Encode()
    var payload map[string]any
    if err := json.Unmarshal([]byte("{\"project\":\"2002\",\"invoice_currency\":\"USD\",\"invoice_amount\":\"12.50\",\"reference\":\"order-42\"}"), &payload); err != nil { return err }
    payload["project"] = env("CRYPTANIO_PROJECT_ID")
    body, err := json.Marshal(payload)
    if err != nil { return err }
    request, err := http.NewRequest("POST", endpoint.String(), bytes.NewReader(body))
    if err != nil { return err }
    request.Header.Set("Authorization", "Bearer " + env("CRYPTANIO_API_KEY"))
    request.Header.Set("Accept", "application/json")
    request.Header.Set("Content-Type", "application/json")
    request.Header.Set("Idempotency-Key", env("CRYPTANIO_OPERATION_ID"))
    client := &http.Client{Timeout: 30 * time.Second, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
    response, err := client.Do(request)
    if err != nil { return err }
    defer response.Body.Close()
    if response.StatusCode < 200 || response.StatusCode >= 300 {
        body, err := io.ReadAll(response.Body)
        if err != nil { return err }
        return fmt.Errorf("HTTP %d: %s", response.StatusCode, body)
    }
    _, err = io.Copy(os.Stdout, response.Body)
    return err
}
func main() {
    if err := run(); err != nil { fmt.Fprintln(os.Stderr, err); os.Exit(1) }
}
```



[Télécharger l’exemple](https://cryptanio.com/files/examples/api/create-invoice.go)



### Rust

```rust
// Cargo.toml dependencies:
// reqwest = { version = "=0.12.24", features = ["blocking", "json"] }
// serde_json = "=1.0.145"
use std::{error::Error, io, time::Duration};
use reqwest::{blocking::Client, redirect::Policy, Method, Url};

fn env(name: &str) -> Result<String, Box<dyn Error>> {
    let value = std::env::var(name)?;
    if value.is_empty() { return Err(format!("Set {name}").into()); }
    Ok(value)
}
fn run() -> Result<(), Box<dyn Error>> {
    let mut url = Url::parse("https://api.cryptanio.com")?;
    {
        let mut segments = url.path_segments_mut().map_err(|_| "Invalid base URL")?;
        segments.clear();
        segments.push("v1");
        segments.push("invoices");
    }
    let client = Client::builder().timeout(Duration::from_secs(30)).redirect(Policy::none()).build()?;
    let request = client.request(Method::POST, url)
        .header("Authorization", format!("Bearer {}", env("CRYPTANIO_API_KEY")?))
        .header("Accept", "application/json".to_owned())
        .header("Content-Type", "application/json".to_owned())
        .header("Idempotency-Key", env("CRYPTANIO_OPERATION_ID")?);
    let mut body: serde_json::Value = serde_json::from_str("{\"project\":\"2002\",\"invoice_currency\":\"USD\",\"invoice_amount\":\"12.50\",\"reference\":\"order-42\"}")?;
    body["project"] = serde_json::Value::String(env("CRYPTANIO_PROJECT_ID")?);
    let request = request.json(&body);
    let mut response = request.send()?;
    let status = response.status();
    if !status.is_success() { return Err(format!("HTTP {}: {}", status.as_u16(), response.text()?).into()); }
    io::copy(&mut response, &mut io::stdout())?;
    Ok(())
}
fn main() {
    if let Err(error) = run() { eprintln!("{error}"); std::process::exit(1); }
}
```



[Télécharger l’exemple](https://cryptanio.com/files/examples/api/create-invoice.rs)



### PHP

```php
<?php
// PHP 8 with the cURL extension. Run this on your server.
function env(string $name): string {
    $value = getenv($name);
    if ($value === false || $value === '') throw new RuntimeException('Set ' . $name);
    return $value;
}
try {
    $path = '/v1/invoices';

    $query = [

    ];
    $url = 'https://api.cryptanio.com' . $path . ($query ? '?' . http_build_query($query, '', '&', PHP_QUERY_RFC3986) : '');
    $headers = [
        'Authorization: ' . 'Bearer ' . env('CRYPTANIO_API_KEY'),
        'Accept: ' . 'application/json',
        'Content-Type: ' . 'application/json',
        'Idempotency-Key: ' . env('CRYPTANIO_OPERATION_ID'),
    ];
    $body = json_decode('{"project":"2002","invoice_currency":"USD","invoice_amount":"12.50","reference":"order-42"}', true, 512, JSON_THROW_ON_ERROR);
    $body['project'] = env('CRYPTANIO_PROJECT_ID');
    $curl = curl_init($url);
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_HTTPHEADER => $headers,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_FOLLOWLOCATION => false,
        CURLOPT_CONNECTTIMEOUT => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_POSTFIELDS => json_encode($body, JSON_THROW_ON_ERROR),
    ]);
    $response = curl_exec($curl);
    if ($response === false) throw new RuntimeException(curl_error($curl));
    $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
    if ($status < 200 || $status >= 300) throw new RuntimeException('HTTP ' . $status . ': ' . $response);
    echo $response;
} catch (Throwable $error) {
    fwrite(STDERR, $error->getMessage() . PHP_EOL);
    exit(1);
}
```



[Télécharger l’exemple](https://cryptanio.com/files/examples/api/create-invoice.php)



### Python

```python
# Python 3; standard library only.
import json
import os
import sys
from urllib.error import HTTPError, URLError
from urllib.parse import quote, urlencode
from urllib.request import HTTPRedirectHandler, Request, build_opener

def env(name):
    result = os.environ.get(name)
    if not result:
        raise ValueError("Set " + name)
    return result

class NoRedirect(HTTPRedirectHandler):
    def redirect_request(self, req, fp, code, msg, headers, newurl):
        return None

try:
    path = "/v1/invoices"

    query = {

    }
    url = "https://api.cryptanio.com" + path + ("?" + urlencode(query) if query else "")
    headers = {
        "Authorization": "Bearer " + env("CRYPTANIO_API_KEY"),
        "Accept": "application/json",
        "Content-Type": "application/json",
        "Idempotency-Key": env("CRYPTANIO_OPERATION_ID"),
    }
    body = json.loads("{\"project\":\"2002\",\"invoice_currency\":\"USD\",\"invoice_amount\":\"12.50\",\"reference\":\"order-42\"}")
    body["project"] = env("CRYPTANIO_PROJECT_ID")
    data = json.dumps(body).encode("utf-8")
    request = Request(url, data=data, headers=headers, method="POST")
    with build_opener(NoRedirect()).open(request, timeout=30) as response:
        if not 200 <= response.status < 300:
            raise ValueError("HTTP " + str(response.status))
        sys.stdout.buffer.write(response.read())
except HTTPError as error:
    print("HTTP " + str(error.code) + ": " + error.read().decode("utf-8", errors="replace"), file=sys.stderr)
    sys.exit(1)
except (ValueError, URLError, OSError) as error:
    print(str(error), file=sys.stderr)
    sys.exit(1)
```



[Télécharger l’exemple](https://cryptanio.com/files/examples/api/create-invoice.py)



### Node.js

```javascript
// Node.js 18+. Run on your server, never in a browser.
const env = name => {
  const result = process.env[name];
  if (!result) throw new Error(`Set ${name}`);
  return result;
};
try {
  let path = "/v1/invoices";

  const url = new URL(path, "https://api.cryptanio.com");

  const headers = {
    "Authorization": "Bearer " + env("CRYPTANIO_API_KEY"),
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Idempotency-Key": env("CRYPTANIO_OPERATION_ID"),
  };
  const body = {
    "project": "2002",
    "invoice_currency": "USD",
    "invoice_amount": "12.50",
    "reference": "order-42"
  };
  body["project"] = env("CRYPTANIO_PROJECT_ID");
  const response = await fetch(url, {
    method: "POST", headers, redirect: "manual",
    signal: AbortSignal.timeout(30_000), body: JSON.stringify(body),
  });
  if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
  if (response.body) {
    for await (const chunk of response.body) process.stdout.write(chunk);
  }
} catch (error) {
  console.error(error.message);
  process.exitCode = 1;
}
```



[Télécharger l’exemple](https://cryptanio.com/files/examples/api/create-invoice.mjs)

## Réponses et erreurs

### 201 Réponse réussie.

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `checkout_url` | `string` | Non | Page de paiement hébergée par Cryptanio. La création ou la nouvelle tentative d’une facture avec choix du moyen renvoie un lien d’accès interactif permettant ce choix jusqu’à la détection d’un paiement. La création à moyen fixe et tous les GET et listes renvoient un lien distinct en lecture seule. Ne partagez ces liens qu’avec le payeur prévu ; aucun ne donne accès au compte ni à la clé API. Confirmez le paiement via l’API des factures ou un webhook vérifié, jamais par une redirection du navigateur.; `uri` |
| `id` | `string` | Oui | Identifiant opaque ; conservez-le sous forme de chaîne.; minLength: `1` |
| `status` | `string` | Oui | pending attend le paiement ; seen détecté ; partial partiellement payé ; paid réglé ; underpaid/overpaid/late nécessitent une décision ; expired délai dépassé ; canceled annulé.; `pending`, `seen`, `paid`, `underpaid`, `partial`, `overpaid`, `expired`, `late`, `canceled` |
| `project_id` | `string` | Oui | Identifiant opaque ; conservez-le sous forme de chaîne.; minLength: `1` |
| `reference` | `string` | Non | Référence de la commande. |
| `customer` | `object` | Non |  |
| `product` | `object` | Non |  |
| `payer` | `object` | Non |  |
| `metadata` | `object` | Non | Jusqu’à 20 paires, au maximum 8192 octets JSON. N’incluez pas de secrets. |
| `invoice_currency` | `string` | Non | Devise du prix indiqué pour la commande. |
| `invoice_amount` | `string` | Non | Montant décimal exact sous forme de chaîne ; n’utilisez pas de virgule flottante.; pattern: `^[0-9]+(?:\.[0-9]+)?$` |
| `chain` | `string` | Oui | Code réseau. |
| `asset` | `string` | Oui | Actif de paiement. |
| `address` | `string` | Oui | Adresse de paiement. |
| `payment_route` | `object` | Non | Identifiant de paiement sur la blockchain obligatoire lorsqu’une source automatique fournit un tag, un memo, un commentaire TON ou une référence Solana Pay. Conservez-le avec l’adresse de réception ; la référence de commande du commerçant est un champ distinct. |
| `payment_uri` | `string` | Non | Demande de transfert Solana Pay avec le destinataire, le montant exact, le mint du jeton pris en charge et la référence obligatoire. Encodez cet URI dans le QR de paiement au lieu de la simple adresse de réception.; `uri` |
| `amount` | `string \| string` | Oui | Montant réel que l’acheteur doit envoyer ; il peut différer du montant demandé pour distinguer les factures. Vide tant qu’aucun moyen n’est choisi. |
| `amount_raw` | `string \| string` | Oui | Montant entier dans la plus petite unité, sous forme de chaîne. Vide tant qu’aucun moyen n’est choisi. |
| `asked` | `string \| string` | Oui | Montant en cryptomonnaie demandé à l’origine. Vide tant qu’aucun moyen n’est choisi. |
| `decimals` | `integer` | Oui | Nombre de décimales de l’actif.; minimum: `0` |
| `tolerance` | `string` | Non | Tolérance en plus petites unités ; contrairement à request.tolerance.; pattern: `^[0-9]+$` |
| `sandbox` | `boolean` | Oui | Une facture de test ne prouve pas un paiement réel sur la blockchain. |
| `needs_decision` | `boolean` | Non | Une décision est nécessaire pour les états underpaid, overpaid ou late. |
| `paid` | `string` | Non | Montant reçu en plus petites unités.; pattern: `^[0-9]+$` |
| `tx_id` | `string` | Non | Identifiant de la transaction de paiement. |
| `paid_at` | `string` | Non | Date et heure UTC selon RFC 3339.; `date-time` |
| `expires_at` | `string` | Oui | Date et heure UTC selon RFC 3339.; `date-time` |
| `created_at` | `string` | Oui | Date et heure UTC selon RFC 3339.; `date-time` |



### 201 application/json

```json
{
  "id": "2100",
  "status": "pending",
  "project_id": "2002",
  "reference": "order-42",
  "chain": "ethereum",
  "asset": "USDC",
  "address": "0x52908400098527886E0F7030069857D2E4169EE7",
  "amount": "12.5",
  "amount_raw": "12500000",
  "asked": "12.5",
  "decimals": 6,
  "sandbox": true,
  "expires_at": "2026-10-06T11:00:00Z",
  "created_at": "2026-10-06T10:00:00Z"
}
```



### 400 Requête invalide (bad_request, unsupported_asset).

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `error` | `object` | Oui |  |



### 400 application/json

```json
{
  "error": {
    "code": "forbidden",
    "message": "this API key is read-only"
  }
}
```



### 401 Aucune clé API active valide (unauthorized).

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `error` | `object` | Oui |  |



### 401 application/json

```json
{
  "error": {
    "code": "forbidden",
    "message": "this API key is read-only"
  }
}
```



### 403 La clé n’autorise pas l’opération, le projet, le service ou l’IP ; e-mail non confirmé.

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `error` | `object` | Oui |  |



### 403 application/json

```json
{
  "error": {
    "code": "forbidden",
    "message": "this API key is read-only"
  }
}
```



### 409 Conflit d’état, paramètres de nouvelle tentative contradictoires ou limite de ressources de paiement (conflict, limit_reached, service_inactive).

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `error` | `object` | Oui |  |



### 409 application/json

```json
{
  "error": {
    "code": "forbidden",
    "message": "this API key is read-only"
  }
}
```



### 429 Trop de requêtes (rate_limited) ; réessayez après Retry-After.

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `error` | `object` | Oui |  |



### 429 application/json

```json
{
  "error": {
    "code": "forbidden",
    "message": "this API key is read-only"
  }
}
```



### 500 Erreur interne (internal).

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `error` | `object` | Oui |  |



### 500 application/json

```json
{
  "error": {
    "code": "forbidden",
    "message": "this API key is read-only"
  }
}
```



### 503 Indisponibilité temporaire (unavailable) ; réessayez avec un délai progressif.

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `error` | `object` | Oui |  |



### 503 application/json

```json
{
  "error": {
    "code": "forbidden",
    "message": "this API key is read-only"
  }
}
```



[Gestion des erreurs et nouvelles tentatives sûres](https://cryptanio.com/fr/docs.html#errors)

## Objets imbriqués

### `Invoice`

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `checkout_url` | `string` | Non | Page de paiement hébergée par Cryptanio. La création ou la nouvelle tentative d’une facture avec choix du moyen renvoie un lien d’accès interactif permettant ce choix jusqu’à la détection d’un paiement. La création à moyen fixe et tous les GET et listes renvoient un lien distinct en lecture seule. Ne partagez ces liens qu’avec le payeur prévu ; aucun ne donne accès au compte ni à la clé API. Confirmez le paiement via l’API des factures ou un webhook vérifié, jamais par une redirection du navigateur.; `uri` |
| `id` | `string` | Oui | Identifiant opaque ; conservez-le sous forme de chaîne.; minLength: `1` |
| `status` | `string` | Oui | pending attend le paiement ; seen détecté ; partial partiellement payé ; paid réglé ; underpaid/overpaid/late nécessitent une décision ; expired délai dépassé ; canceled annulé.; `pending`, `seen`, `paid`, `underpaid`, `partial`, `overpaid`, `expired`, `late`, `canceled` |
| `project_id` | `string` | Oui | Identifiant opaque ; conservez-le sous forme de chaîne.; minLength: `1` |
| `reference` | `string` | Non | Référence de la commande. |
| `customer` | `object` | Non |  |
| `product` | `object` | Non |  |
| `payer` | `object` | Non |  |
| `metadata` | `object` | Non | Jusqu’à 20 paires, au maximum 8192 octets JSON. N’incluez pas de secrets. |
| `invoice_currency` | `string` | Non | Devise du prix indiqué pour la commande. |
| `invoice_amount` | `string` | Non | Montant décimal exact sous forme de chaîne ; n’utilisez pas de virgule flottante.; pattern: `^[0-9]+(?:\.[0-9]+)?$` |
| `chain` | `string` | Oui | Code réseau. |
| `asset` | `string` | Oui | Actif de paiement. |
| `address` | `string` | Oui | Adresse de paiement. |
| `payment_route` | `object` | Non | Identifiant de paiement sur la blockchain obligatoire lorsqu’une source automatique fournit un tag, un memo, un commentaire TON ou une référence Solana Pay. Conservez-le avec l’adresse de réception ; la référence de commande du commerçant est un champ distinct. |
| `payment_uri` | `string` | Non | Demande de transfert Solana Pay avec le destinataire, le montant exact, le mint du jeton pris en charge et la référence obligatoire. Encodez cet URI dans le QR de paiement au lieu de la simple adresse de réception.; `uri` |
| `amount` | `string \| string` | Oui | Montant réel que l’acheteur doit envoyer ; il peut différer du montant demandé pour distinguer les factures. Vide tant qu’aucun moyen n’est choisi. |
| `amount_raw` | `string \| string` | Oui | Montant entier dans la plus petite unité, sous forme de chaîne. Vide tant qu’aucun moyen n’est choisi. |
| `asked` | `string \| string` | Oui | Montant en cryptomonnaie demandé à l’origine. Vide tant qu’aucun moyen n’est choisi. |
| `decimals` | `integer` | Oui | Nombre de décimales de l’actif.; minimum: `0` |
| `tolerance` | `string` | Non | Tolérance en plus petites unités ; contrairement à request.tolerance.; pattern: `^[0-9]+$` |
| `sandbox` | `boolean` | Oui | Une facture de test ne prouve pas un paiement réel sur la blockchain. |
| `needs_decision` | `boolean` | Non | Une décision est nécessaire pour les états underpaid, overpaid ou late. |
| `paid` | `string` | Non | Montant reçu en plus petites unités.; pattern: `^[0-9]+$` |
| `tx_id` | `string` | Non | Identifiant de la transaction de paiement. |
| `paid_at` | `string` | Non | Date et heure UTC selon RFC 3339.; `date-time` |
| `expires_at` | `string` | Oui | Date et heure UTC selon RFC 3339.; `date-time` |
| `created_at` | `string` | Oui | Date et heure UTC selon RFC 3339.; `date-time` |

### `ID`

Identifiant opaque. Son format n’est pas garanti ; ne le convertissez pas en nombre.

`string` Identifiant opaque. Son format n’est pas garanti ; ne le convertissez pas en nombre.

### `InvoiceStatus`

pending attend le paiement ; seen détecté ; partial partiellement payé ; paid réglé ; underpaid/overpaid/late nécessitent une décision ; expired délai dépassé ; canceled annulé.

`string` pending attend le paiement ; seen détecté ; partial partiellement payé ; paid réglé ; underpaid/overpaid/late nécessitent une décision ; expired délai dépassé ; canceled annulé.

### `Customer`

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `id` | `string` | Oui | Identifiant du client dans votre système.; maxLength: `120` |

### `Product`

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `id` | `string` | Non | Identifiant du produit dans votre système.; maxLength: `120` |
| `name` | `string` | Non | Nom du produit.; maxLength: `200` |
| `quantity` | `integer` | Non | Quantité.; minimum: `1` ; maximum: `1000000` |

### `Payer`

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `comment` | `string` | Oui | Commentaire du payeur.; maxLength: `500` |

### `InvoiceMetadata`

Jusqu’à 20 paires, au maximum 8192 octets JSON. N’incluez pas de secrets.

`object` Jusqu’à 20 paires, au maximum 8192 octets JSON. N’incluez pas de secrets.

### `Decimal`

`string`

### `RawAmount`

`string`

### `InvoiceRequest`

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `project` | `string` | Non | ID du projet Payments ; une sélection explicite est recommandée. Une clé limitée à un projet utilise son projet. |
| `chain` | `string` | Non | Code réseau.; minLength: `1` |
| `asset` | `string` | Non | Actif de paiement pris en charge : native, symbole ou identifiant connu. Les actifs acceptés dépendent du réseau ; en cas d’omission, native est sélectionné.; Par défaut : `native` |
| `amount` | `string` | Non | Montant crypto positif en unités de l’actif ; la précision ne doit pas dépasser les décimales de l’actif.; pattern: `^[0-9]+(?:\.[0-9]+)?$` |
| `reference` | `string` | Non | Votre référence de commande ; ne remplace pas Idempotency-Key.; maxLength: `120` |
| `address` | `string` | Non | Adresse facultative du pool de paiement du projet. Sinon, le service en sélectionne une. |
| `tolerance` | `string` | Non | Sous-paiement autorisé en unités de l’actif, strictement inférieur à amount. Omettre pour une tolérance nulle.; pattern: `^[0-9]+(?:\.[0-9]+)?$` |
| `customer` | `object` | Non |  |
| `product` | `object` | Non |  |
| `payer` | `object` | Non |  |
| `metadata` | `object` | Non | Jusqu’à 20 paires, au maximum 8192 octets JSON. N’incluez pas de secrets. |
| `invoice_currency` | `string` | Non | Devise à trois lettres du prix de commande ; uniquement avec invoice_amount.; pattern: `^[A-Za-z]{3}$` |
| `invoice_amount` | `string` | Non | Montant positif de la commande en invoice_currency. Avec chain et amount, il constitue l’instantané du marchand. Sans coordonnées de paiement, il s’agit de la valeur fixe de la facture utilisée pour calculer le montant de l’actif choisi par le payeur.; maxLength: `80`; pattern: `^[0-9]+(?:\.[0-9]+)?$` |
| `expires_in` | `integer` | Non | Délai de paiement en minutes, à compter de l’émission réussie des coordonnées. L’absence de valeur ou 0 applique la politique du projet (60 par défaut) ; maximum 10080. Les anciennes requêtes à moyen fixe traitent aussi les valeurs négatives comme absentes ; le paiement avec choix du moyen refuse les valeurs négatives.; Par défaut : `60`; maximum: `10080` |

### `Error`

| Champ | Type | Obligatoire | Description |
| --- | --- | --- | --- |
| `error` | `object` | Oui |  |
