ACTIONS
  • Home
  • My Actions
  • My Projects
  • My Packages
Stripe -> Void Invoice
Readonly
Stripe → Void Invoice

Action summary

Stripe -> Void Invoice

Xano / Stripe

Stripe → Void Invoice

Overview

This Xano action enables you to void an existing invoice in Stripe by specifying the invoice ID. The action sends a request to the Stripe API to void the invoice and returns the resulting invoice data.

Inputs

Name Type Required Description
stripe_api_key text Yes Your Stripe API key (from settings registry).
invoice_id text Yes The ID of the Stripe invoice to void.

Function Stack

1. Stripe API Request

  • API Request: Sends a POST request to https://api.stripe.com/v1/invoices/{invoice_id}/void using the provided stripe_api_key for authentication.
  • Precondition: Ensures the response status is 200 (success).

2. Response

  • Returns the result from the Stripe API response.

Example Usage

Request

{
  "stripe_api_key": "sk_test_...",
  "invoice_id": "in_1JYb2D2eZvKYlo2C..."
}

Response

{
  "id": "in_1JYb2D2eZvKYlo2C...",
  "object": "invoice",
  "status": "void",
  // ... other invoice fields
}

Notes

  • Ensure your Stripe API key is kept secure and not shared publicly.
  • The action requires a valid Stripe invoice ID.
  • Voiding an invoice is irreversible; confirm that the invoice should not be paid before proceeding.

Troubleshooting

  • 401 Unauthorized: Check that your stripe_api_key is correct and active.
  • 404 Not Found: Verify the invoice_id exists and is correct.
  • 400 Bad Request: The invoice may already be voided or in a state that cannot be voided.
  • Other Errors: Refer to the Stripe API documentation for additional error details.

References

  • Stripe API: Void an Invoice

Version notes

2025-03-31 18:17:01
Current
2025-03-31T12:47:01.000+00:00