Stripe -> Void Invoice
Readonly
Action summary
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}/voidusing the providedstripe_api_keyfor 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_keyis correct and active. - 404 Not Found: Verify the
invoice_idexists 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
Version notes
2025-03-31 18:17:01
Current