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

# Create a payment request

> Create a payment request to send as a card.

```bash theme={null}
npx relaymessenger payment-requests create
```

## Usage

```text captured-output theme={null}
Usage: relaymessenger payment-requests create [options]

create a payment request to send as a card

Options:
  --description <text>     the card's title, 1 to 32 characters
  --category <category>    what is sold (choices: "physical_goods", "digital_goods", "donation")
  --amount <number>        the price in the currency's minor units
  --currency <code>        a 3-letter ISO 4217 code
  --mode <mode>            payment or subscription (choices: "payment", "subscription")
  --price-id <id>          a recurring Stripe price, for subscriptions
  --quantity <number>      units of the price
  --customer-id <id>       an existing Stripe customer
  --image-url <url>        an https product picture
  --coupon <id>            a Stripe coupon to apply
  --promotion-code <id>    a Stripe promotion code ID
  --discount-label <text>  your name for the discount
  --metadata <key=value>   your own data, repeated
  --idempotency-key <key>  duplicate-request prevention key
  -h, --help               help

Docs: https://docs.relayapp.im
Report a problem: https://github.com/RelayMessenger/Relay-SDK/issues
```

## Options

```text captured-output theme={null}
  --description <text>     the card's title, 1 to 32 characters
  --category <category>    what is sold (choices: "physical_goods", "digital_goods", "donation")
  --amount <number>        the price in the currency's minor units
  --currency <code>        a 3-letter ISO 4217 code
  --mode <mode>            payment or subscription (choices: "payment", "subscription")
  --price-id <id>          a recurring Stripe price, for subscriptions
  --quantity <number>      units of the price
  --customer-id <id>       an existing Stripe customer
  --image-url <url>        an https product picture
  --coupon <id>            a Stripe coupon to apply
  --promotion-code <id>    a Stripe promotion code ID
  --discount-label <text>  your name for the discount
  --metadata <key=value>   your own data, repeated
  --idempotency-key <key>  duplicate-request prevention key
  -h, --help               help
```

### Global options

```text captured-output theme={null}
  -V, --version                  the version
  --json                         JSON output
  --no-input, --non-interactive  no prompts
  --agent <auto|yes|no>          runtime detection override (default auto)
  -q, --quiet                    errors only
  --verbose                      request method, path, status, milliseconds on stderr
  --profile <name>               the saved profile to use
  --install-skills               Relay skill installation for local runtimes
```

## Exit codes

```text captured-output theme={null}
relaymessenger exit codes

relaymessenger follows normal conventions regarding exit codes.

- If a command completes successfully, the exit code will be 0
- If a command fails for a reason not covered by exit codes 2–4, the exit code will be 1
- If a command is given options it does not understand, or needs an answer and has no terminal, the exit code will be 2
- If the thing a command names does not exist, the exit code will be 3
- If a command needs a token and none is saved, or Relay does not accept the one it has, the exit code will be 4

Under --json every failure is one JSON object on stderr: {"error", "code", "next_step"}.
The code is Relay's numeric code as a string for an API fault, and one of
usage, not_a_tty, no_token, not_found, network, refused for a fault in this command.

Docs: https://docs.relayapp.im
Report a problem: https://github.com/RelayMessenger/Relay-SDK/issues
```

## Next steps

* [Payments](/interactions/payments)
* [CLI](/cli/index)
* [Global options](/cli/global-options)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.