## post

Make POST HTTP requests to the Stripe API. The `post` command supports API features like idempotency keys and expandable objects.

See the [API reference](https://docs.stripe.com/api.md) for a complete list of supported URL paths.

**Command:** `stripe post`

### Arguments

- `<path>`
  URL path of the API object to either create or update.

### Flags

- `-c, --confirm`
  Skip the warning prompt and automatically confirm the command being entered.

- `--dark-style`
  Use a darker color scheme better suited for lighter command-line environments.

- `-d, --data <value>`
  Additional data to send with an API request. Supports setting nested values (e.g `nested[param]=value`).

- `-e, --expand <value>`
  Response attributes to expand inline (target nested values with `nested[param]=value`).

- `-i, --idempotency <key>`
  Set an idempotency key for the request, preventing the same request from replaying within 24 hours.

- `--live`
  Make a live request (by default, runs in test mode).

- `-s, --show-headers`
  Show response HTTP headers.

- `--stripe-account <account_id>`
  Specify the Stripe account to use for this request.

- `-v, --stripe-version <version>`
  Specify the Stripe API version to use for this request.

### Examples

**Create a payment intent**

```sh
stripe post /v1/payment_intents \
    -d amount=2000 \
    -d currency=usd \
    -d "payment_method_types[]=card"
```

**Response**

```
{
  "id": "pi_1Gt0Ix2eZvKYlo2CwZBLZZfa",
  "object": "payment_intent",
  "amount": 2000,
  "amount_capturable": 0,
  "amount_details": {
    "tip": {}
  },
  "amount_received": 0,
  "application": null,
  "application_fee_amount": null,
  "automatic_payment_methods": null,
  "canceled_at": null,
  "cancellation_reason": null,
  "capture_method": "automatic",
  "client_secret": "pi_1Gt0Ix2eZvKYlo2CwZBLZZfa_secret_3LwqYVg0STglik0tqpkBQodvA",
  "confirmation_method": "automatic",
  "created": 1591919971,
  "currency": "usd",
  "customer": null,
  "description": "Created by docs.stripe.com/ demo",
  "invoice": null,
  "last_payment_error": null,
  "latest_charge": null,
  "livemode": false,
  "metadata": {},
  "next_action": null,
  "on_behalf_of": null,
  "payment_method": null,
  "payment_method_configuration_details": null,
  "payment_method_options": {
    "card": {
      "installments": null,
      "mandate_options": null,
      "network": null,
      "request_three_d_secure": "automatic"
    }
  },
  "payment_method_types": [
    "card"
  ],
  "processing": null,
  "receipt_email": null,
  "redaction": null,
  "review": null,
  "setup_future_usage": null,
  "shipping": null,
  "statement_descriptor": null,
  "statement_descriptor_suffix": null,
  "status": "requires_payment_method",
  "transfer_data": null,
  "transfer_group": null
}
```
