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

# Accept Crypto Payments with Invoices

> Learn how to create invoices, retrieve payment addresses, and start accepting crypto payments from your customers on IteraPay.

Invoices are the foundation of payment collection on IteraPay. You create an invoice, share it with your customer, and IteraPay generates a crypto payment address for them to send funds to. This guide walks you through the full flow — from creating your first invoice to confirming that payment was received.

## Prerequisites

Before you start, make sure you have:

* A merchant account with your `merchantID`
* A valid API key or JWT bearer token
* The ID of the payment method you want to accept (e.g., USDT on TRON)

***

## Create a one-time invoice

A `onetime` invoice accepts a single payment. Use this for individual orders or transactions.

<Steps>
  <Step title="Create the invoice">
    Send a `POST` request to create the invoice. Provide the amount in USD, a description, and set the type to `onetime`.

    ```bash theme={null}
    curl --request POST \
      --url https://api.iterapay.com/merchants/{merchantID}/invoices \
      --header 'Authorization: Bearer YOUR_JWT_TOKEN' \
      --header 'Content-Type: application/json' \
      --data '{
        "amount": 100,
        "type": "onetime",
        "description": "Order #1042 - Premium Plan"
      }'
    ```

    **Expected response:**

    ```json theme={null}
    {
      "id": "inv_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "amount": 100,
      "type": "onetime",
      "description": "Order #1042 - Premium Plan",
      "status": "pending",
      "createdAt": "2024-01-01T10:00:00Z"
    }
    ```

    Save the `id` — you'll use it in the next steps.
  </Step>

  <Step title="Retrieve the payment address for a crypto method">
    Use the public endpoint to get a payment address for a specific payment method. This endpoint requires no authentication, so you can call it from your frontend or redirect your customer to it.

    ```bash theme={null}
    curl --request GET \
      --url https://api.iterapay.com/public/invoices/{invoiceID}/method/{methodID}/address
    ```

    **Expected response:**

    ```json theme={null}
    {
      "address": "TRX9xKqP2mNvLwXbY3zJdR7oU5cH1sA4fE",
      "amount": "100.500000",
      "expiresAt": "2024-01-01T12:00:00Z"
    }
    ```

    <Warning>
      Payment addresses expire. Present the `expiresAt` timestamp to your customer so they know how long they have to complete the payment.
    </Warning>
  </Step>

  <Step title="Share the invoice with your customer">
    Send your customer the payment address and the exact crypto amount. You can also share the public invoice URL so they can view it directly:

    ```bash theme={null}
    curl --request GET \
      --url https://api.iterapay.com/public/invoices/{invoiceID}
    ```

    This endpoint requires no authentication and returns the full invoice details — safe to link to from your checkout page or email.
  </Step>
</Steps>

***

## List all payment addresses for an invoice

If your invoice supports multiple payment methods, retrieve all available addresses at once:

```bash theme={null}
curl --request GET \
  --url https://api.iterapay.com/public/invoices/{invoiceID}/addresses
```

**Expected response:**

```json theme={null}
[
  {
    "methodID": "method_usdt_tron",
    "address": "TRX9xKqP2mNvLwXbY3zJdR7oU5cH1sA4fE",
    "amount": "100.500000",
    "expiresAt": "2024-01-01T12:00:00Z"
  },
  {
    "methodID": "method_usdc_eth",
    "address": "0x4bF6bC3D1e2a0F9c5d7E8A3b2C1D0e9F8A7B6C5",
    "amount": "100.500000",
    "expiresAt": "2024-01-01T12:00:00Z"
  }
]
```

Present these options to your customer and let them choose their preferred network.

***

## Create a reusable invoice

A `reusable` invoice accepts multiple payments over time — useful for payment links, donation pages, or any scenario where more than one customer may pay.

```bash theme={null}
curl --request POST \
  --url https://api.iterapay.com/merchants/{merchantID}/invoices \
  --header 'Authorization: Bearer YOUR_JWT_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "amount": 50,
    "type": "reusable",
    "description": "Monthly subscription payment"
  }'
```

<Tabs>
  <Tab title="One-time">
    * Accepts a **single payment**
    * Expires after the first successful payment
    * Best for individual orders and transactions
  </Tab>

  <Tab title="Reusable">
    * Accepts **multiple payments**
    * Remains active after each payment
    * Best for payment links, subscriptions, or donation pages
  </Tab>
</Tabs>

<Note>
  Reusable invoices generate a new payment address each time a customer requests one, ensuring that payments are tracked individually even though they share the same invoice.
</Note>

***

## Next steps

Once your customer sends payment, the funds appear as collectible. See [Collect Funds](/guides/collect-funds) to learn how to sweep paid invoice funds into your merchant balance.
