ACTIONS
  • Home
  • My Actions
  • My Projects
  • My Packages
Stripe -> Create an Invoice Item
Readonly
Stripe - Create an Invoice Item

Action summary

Stripe -> Create an Invoice Item

Xano / Stripe

Stripe - Create an Invoice Item

How to Get the Stripe API Key

To retrieve your Stripe API key, follow these steps:

  1. Log in to your Stripe dashboard at https://dashboard.stripe.com.
  2. Navigate to Developers > API keys.
  3. Locate the Secret Key under the Standard keys section.
  4. Click Reveal test key (for testing) or use the live key for production.
  5. Copy the API key and store it securely.

Note: Never expose your API key in client-side applications.

1. Inputs

Specify if this function accepts any inputs or query parameters:

  • customer_id (text)
  • price_id (text)
  • stripe_api_key (registry text from Settings Registry)

2. Function Stack

  1. Stripe API Request
    • API Request to: https://api.stripe.com/v1/invoiceitems
    • Returns as: stripe_api
  2. Precondition
    • Condition: var: stripe_api.response.status = 200

3. Response

  • Key: As Self
  • Value: var: stripe_api.response.result

This function allows creating an invoice item in Stripe by making a request to the Stripe API with the necessary inputs. The API request ensures that a valid response (status 200) is received before proceeding.

Example Response

{
  "id": "ii_123456789",
  "object": "invoiceitem",
  "customer": "cus_ABC123",
  "invoice": "in_987654321",
  "price": "price_001",
  "amount": 2000,
  "currency": "usd",
  "description": "Service Charge",
  "created": 1700000000,
  "livemode": false
}

Version notes

2025-03-31 18:02:39
Current
2025-03-31T12:32:41.000+00:00