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

# createTokensInvoice

> Create a Spark invoice to receive tokens.

Creates a Spark invoice for receiving a tokens payment on Spark.

## Method Signature

```typescript theme={null}
async createTokensInvoice({
  amount,
  tokenIdentifier,
  memo,
  senderSparkAddress,
  expiryTime,
}: {
  tokenIdentifier?: Bech32mTokenIdentifier;
  amount?: bigint;
  memo?: string;
  senderSparkAddress?: SparkAddressFormat;
  expiryTime?: Date;
}): Promise<SparkAddressFormat>
```

## Parameters

<ResponseField name="tokenIdentifier" type="Bech32mTokenIdentifier">
  The Bech32m token identifier (e.g., `btkn1...`)
</ResponseField>

<ResponseField name="amount" type="bigint">
  The amount of tokens to receive. Max: 2^128 - 1.
</ResponseField>

<ResponseField name="memo" type="string">
  Optional memo/description for the payment
</ResponseField>

<ResponseField name="senderSparkAddress" type="SparkAddressFormat">
  Optional Spark address of the expected sender
</ResponseField>

<ResponseField name="expiryTime" type="Date">
  Optional expiry time for the invoice
</ResponseField>

## Returns

<ResponseField name="invoice" type="SparkAddressFormat" required>
  A Spark address/invoice that can be paid by another Spark wallet
</ResponseField>

## Example

```typescript theme={null}
const invoice = await wallet.createTokensInvoice({
  tokenIdentifier: "btkn1...",
  amount: 1000n,
  memo: "Token payment"
});
console.log("Token invoice:", invoice);
```
