stripe-cli
stripe-cli copied to clipboard
`stripe trigger` returns "You cannot use (…) in this API version"
Issue
When running stripe trigger "checkout.session.completed" or stripe trigger "checkout.session.async_payment_succeeded" I get the following error:
Setting up fixture for: checkout_session
Running fixture for: checkout_session
Trigger failed: Request failed, status=400, body={
"error": {
"message": "You cannot use `line_items.amount`, `line_items.currency`, `line_items.name`, `line_items.description`, or `line_items.images` in this API version. Please use `line_items.price` or `line_items.price_data`. Please see https://stripe.com/docs/payments/checkout/migrating-prices for more information.",
"type": "invalid_request_error"
}
}
Expected Behavior
The error should not occur 🙃
Steps to reproduce
My stripe client is initialized as follows:
const stripeClient = new Stripe(secretKey, { apiVersion: "2022-08-01" });
Env
stripe version 1.11.0