> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.finrock.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Payment Invoice — POST /dac/v1/create-invoice

> Generate a crypto payment invoice with optional fiat price estimation. Returns a deposit address, crypto amount due, and expiry time for your payer.

Finrock's invoicing feature lets you generate on-chain payment requests that your customers can settle in cryptocurrency. When you create an invoice you specify the crypto asset to accept, an optional fiat currency for price estimation, a descriptive memo, and optionally the payer's details. Finrock returns a unique deposit address, a payment amount (calculated at current market rates if fiat is provided), and an expiry time, giving your payer clear and time-bound payment instructions.

## Request

**Method:** `POST`
**URL:** `https://api.finrock.io/dac/v1/create-invoice`

<ParamField body="crypto" type="object" required>
  Crypto payment details specifying which asset to accept.

  <Expandable title="crypto object fields">
    <ParamField body="asset_id" type="string" required>
      The ticker symbol of the cryptocurrency to accept for this invoice (e.g., `BTC`, `ETH`, `USDT`).
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="fiat" type="object">
  Optional fiat estimation details. When provided, Finrock converts the fiat amount to an equivalent crypto amount using the current exchange rate.

  <Expandable title="fiat object fields">
    <ParamField body="asset_id" type="string">
      The fiat currency code to use for price estimation (e.g., `USD`, `EUR`, `GBP`, `AED`).
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="memo" type="string" required>
  A descriptive note for this payment. This is displayed to the payer and helps you identify the invoice in your records (e.g., `Order #1042`, `Subscription renewal - Jan 2025`).
</ParamField>

<ParamField body="payer" type="object">
  Optional information about the sender of the payment.

  <Expandable title="payer object fields">
    <ParamField body="name" type="string">
      Full name of the payer.
    </ParamField>

    <ParamField body="email" type="string">
      Email address of the payer, used for payment confirmation notifications.
    </ParamField>
  </Expandable>
</ParamField>

## Example Request

```bash theme={null}
curl --request POST \
     --url https://api.finrock.io/dac/v1/create-invoice \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
  "crypto": {
    "asset_id": "BTC"
  },
  "fiat": {
    "asset_id": "GBP"
  },
  "memo": "Order #1042 - Product subscription"
}'
```

## Response

A `200` response returns the created invoice object, including a deposit address, the crypto amount due, and an expiry timestamp. A `400` response indicates a missing required field or invalid asset.

<ResponseField name="200" type="object">
  The newly created invoice object, including payment address, amount, fiat equivalent, memo, and expiry time.
</ResponseField>

<ResponseField name="400" type="object">
  Returned when required fields are missing or the specified asset is not supported.
</ResponseField>

<Note>
  Invoices are time-limited. Ensure your payer sends the payment before the expiry timestamp. Payments received after expiry may require manual reconciliation.
</Note>
