Title: Error
Last modified: October 4, 2022

---

# Error

 *  Resolved [larsnobel](https://wordpress.org/support/users/larsnobel/)
 * (@larsnobel)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/)
 * Fatal error: Uncaught (Status 400) (Request req_vQhqevATh78IqQ) 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](https://stripe.com/docs/payments/checkout/migrating-prices)
   for more information. thrown in /var/www/papas.dk/hjallerup/wp-content/plugins/
   seatreg/php/libs/stripe-php/lib/Exception/ApiErrorException.php on line 38

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/error-1702/page/2/?output_format=md) [→](https://wordpress.org/support/topic/error-1702/page/2/?output_format=md)

 *  Thread Starter [larsnobel](https://wordpress.org/support/users/larsnobel/)
 * (@larsnobel)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/#post-16068105)
 * It’s extremely poorly documented, but it turns out you can change the Stripe 
   API version to any version you want on a per-request basis by setting Stripe.
   api_version = ‘YYYY-MM-DD’ before sending a request using the Ruby bindings (
   [https://stripe.com/docs/api/ruby#versioning](https://stripe.com/docs/api/ruby#versioning)),
   or by sending a Stripe-Version HTTP header.
 * So we’ll plan to configure our specs to use the latest API version for all requests,
   and test for breakage that way.
 *  Thread Starter [larsnobel](https://wordpress.org/support/users/larsnobel/)
 * (@larsnobel)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/#post-16068226)
 *     ```
       invalid_request_error
       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.
   
       Was this useful?
   
       Yes
   
       No
       {
         "payment_intent_data": {
           "metadata": {
             "booking_id": "6800c3691d2696e73fec99c018e9bd84d1b7e290"
           }
         },
         "mode": "payment",
         "line_items": {
           "0": {
             "price_data": {
               "unit_amount": "300",
               "currency": "DKK",
               "product_data": {
                 "metadata": {
                   "booking_id": "6800c3691d2696e73fec99c018e9bd84d1b7e290"
                 },
                 "name": "Hjallerup Marked"
               }
             },
             "description": "Booking 6800c3691d2696e73fec99c018e9bd84d1b7e290",
             "quantity": "1"
           }
         },
         "cancel_url": "http://hjallerup.papas.dk?seatreg=booking-status&registration=e4cb967183&id=6800c3691d2696e73fec99c018e9bd84d1b7e290",
         "success_url": "http://hjallerup.papas.dk?seatreg=payment-return&id=6800c3691d2696e73fec99c018e9bd84d1b7e290"
       }
       Response body
       {
         "error": {
           "message": "You cannot use <code>line_items.amount</code>, <code>line_items.currency</code>, <code>line_items.name</code>, <code>line_items.description</code>, or <code>line_items.images</code> in this API version. Please use <code>line_items.price</code> or <code>line_items.price_data</code>. Please see https://stripe.com/docs/payments/checkout/migrating-prices for more information.",
           "type": "invalid_request_error"
         }
       }
       Request POST body
       {
         "payment_intent_data": {
           "metadata": {
             "booking_id": "6800c3691d2696e73fec99c018e9bd84d1b7e290"
           }
         },
         "mode": "payment",
         "line_items": {
           "0": {
             "price_data": {
               "unit_amount": "300",
               "currency": "DKK",
               "product_data": {
                 "metadata": {
                   "booking_id": "6800c3691d2696e73fec99c018e9bd84d1b7e290"
                 },
                 "name": "Hjallerup Marked"
               }
             },
             "description": "Booking 6800c3691d2696e73fec99c018e9bd84d1b7e290",
             "quantity": "1"
           }
         },
         "cancel_url": "http://hjallerup.papas.dk?seatreg=booking-status&registration=e4cb967183&id=6800c3691d2696e73fec99c018e9bd84d1b7e290",
         "success_url": "http://hjallerup.papas.dk?seatreg=payment-return&id=6800c3691d2696e73fec99c018e9bd84d1b7e290"
       }
       ```
   
    -  This reply was modified 3 years, 7 months ago by [Yui](https://wordpress.org/support/users/fierevere/).
    -  This reply was modified 3 years, 7 months ago by [Yui](https://wordpress.org/support/users/fierevere/).
      Reason: formatting
 *  Thread Starter [larsnobel](https://wordpress.org/support/users/larsnobel/)
 * (@larsnobel)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/#post-16068246)
 * [https://stripe.com/docs/api/versioning](https://stripe.com/docs/api/versioning)
 *  Plugin Author [Siim Kirjanen](https://wordpress.org/support/users/thesiim/)
 * (@thesiim)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/#post-16068323)
 * Thank you for notifying about the issue. I will take a look as soon as I have
   some time.
 *  Thread Starter [larsnobel](https://wordpress.org/support/users/larsnobel/)
 * (@larsnobel)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/#post-16068401)
 * Nps.
 * I added:
    \Stripe\Stripe::setApiVersion( ‘2020-08-27’);
 * To the following file:
    seatreg/php/payment/stripe/create-checkout-session.php
 * And now get the error:
    Fatal error: Uncaught (Status 400) (Request req_x3iEIHmDT0yrSG)
   The Checkout Session’s total amount must convert to at least 50 cents. 3.00 kr
   converts to approximately â‚¬0.40. thrown in /var/www/papas.dk/hjallerup/wp-content/
   plugins/seatreg/php/libs/stripe-php/lib/Exception/ApiErrorException.php on line
   38
 * Hopefully thats useful information. Im not THAT good with coding, but i understand
   the basics 😛
 *  Thread Starter [larsnobel](https://wordpress.org/support/users/larsnobel/)
 * (@larsnobel)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/#post-16068421)
 * Adding \Stripe\Stripe::setApiVersion( ‘2020-08-27’); to the file actually worked
   when i made the price a bit higher than 3DKK
 * might be a simple solution
 *  Thread Starter [larsnobel](https://wordpress.org/support/users/larsnobel/)
 * (@larsnobel)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/#post-16068433)
 * So now i made the price 10DKK with the \Stripe\Stripe::setApiVersion( ‘2020-08-
   27’); line added to the file and i can actually do the payment now. However, 
   when i mark the box “set approved” its not automaticly approving the booking 
   when payed.
 * > [View post on imgur.com](https://imgur.com/a/JS9Y5l0)
 *  Plugin Author [Siim Kirjanen](https://wordpress.org/support/users/thesiim/)
 * (@thesiim)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/#post-16068672)
 * I published a new version of the plugin. 1.26.1 should fix the Stripe API issue
   + the automatic approving should work now.
 *  Plugin Author [Siim Kirjanen](https://wordpress.org/support/users/thesiim/)
 * (@thesiim)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/#post-16068674)
 * Let me know if it helped
 *  Thread Starter [larsnobel](https://wordpress.org/support/users/larsnobel/)
 * (@larsnobel)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/#post-16069044)
 * API version worked like a charm now.
 * However it does not automaticly get approved on the payment.
 * Heres a video showing my procedure: [https://youtu.be/2PvVZ3HSgOU](https://youtu.be/2PvVZ3HSgOU)
 * So basicly, the timer stops (the red text in the mail saying xx minutes left 
   to do the payment), but it says “Your payment is being processed” and the booking
   is not moved into the approved tap in the plugin.
 * Nor do i get an email saying that my booking was approved.
 * Btw i really appreciate your help and im asking my boss if we can make a donation
   tomorrow.
    -  This reply was modified 3 years, 7 months ago by [larsnobel](https://wordpress.org/support/users/larsnobel/).
 *  Plugin Author [Siim Kirjanen](https://wordpress.org/support/users/thesiim/)
 * (@thesiim)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/#post-16069433)
 * I have an idea. Can you do the following:
    In your registration settings turn
   Stripe payments off and save. Then turn on and save again. That updates Stripe
   payment webhooks. I have a feeling that for some reason you lost Stripe webhook.
   You can also check if webhook exists in [https://dashboard.stripe.com/test/webhooks](https://dashboard.stripe.com/test/webhooks)
   There should be a webhook with url to your site that ends with ?seatreg=stripe-
   webhook-callback
 *  Thread Starter [larsnobel](https://wordpress.org/support/users/larsnobel/)
 * (@larsnobel)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/#post-16070590)
 * Tried turning it off and on. Getting the following error:
 * Fatal error: Uncaught (Status 400) (Request req_nMeMSH2YHtu3ev) Invalid URL: 
   [http://hjallerup.papas.dk?seatreg=stripe-webhook-callback](http://hjallerup.papas.dk?seatreg=stripe-webhook-callback).
   URLs in livemode must begin with “[https://&#8221](https://&#8221); thrown in/
   var/www/papas.dk/hjallerup/wp-content/plugins/seatreg/php/libs/stripe-php/lib/
   Exception/ApiErrorException.php on line 38
 * Im running on http atm. Going https now and see if that fix it
 *  Thread Starter [larsnobel](https://wordpress.org/support/users/larsnobel/)
 * (@larsnobel)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/#post-16070689)
 * Now im not getting the error anymore (after moving to https), but i still have
   the same problem. “Your payment is being processed” and the booking is stuck 
   on “pending”.
 * > [View post on imgur.com](https://imgur.com/a/iqGWK3l)
 * I added this webhook manually and that is still not working. Does it have something
   to do with the API version?
 *  Thread Starter [larsnobel](https://wordpress.org/support/users/larsnobel/)
 * (@larsnobel)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/#post-16070694)
 * > [View post on imgur.com](https://imgur.com/a/VaWrIAa)
 * {
    “id”: “evt_3LpS06EqzkoLN3NU1xD8fQrD”, “object”: “event”, “api_version”: “2022-
   08-01”, “created”: 1664954802, “data”: { “object”: { “id”: “pi_3LpS06EqzkoLN3NU1MFii2i7”,“
   object”: “payment_intent”, “amount”: 1000, “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”, “charges”: { “object”: “list”, “data”: [],“
   has_more”: false, “total_count”: 0, “url”: “/v1/charges?payment_intent=pi_3LpS06EqzkoLN3NU1MFii2i7”},“
   client_secret”: “pi_3LpS06EqzkoLN3NU1MFii2i7_secret_EUA7eBGyUPMrYQLeCOytGsyn2”,“
   confirmation_method”: “automatic”, “created”: 1664954802, “currency”: “dkk”, “
   customer”: null, “description”: null, “invoice”: null, “last_payment_error”: 
   null, “livemode”: false, “metadata”: { “booking_id”: “624a77a2f1a861cec2d923937478dd8ffbca4bd6”},“
   next_action”: null, “on_behalf_of”: null, “payment_method”: 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, “review”: null, “setup_future_usage”: null, “shipping”: null, “source”:
   null, “statement_descriptor”: null, “statement_descriptor_suffix”: null, “status”:“
   requires_payment_method”, “transfer_data”: null, “transfer_group”: null } }, “
   livemode”: false, “pending_webhooks”: 1, “request”: { “id”: “req_AuNWHHQmCqlWtD”,“
   idempotency_key”: “2c3868a3-efc9-48a2-b0fb-f82ae808b209” }, “type”: “payment_intent.
   created” }
 *  Thread Starter [larsnobel](https://wordpress.org/support/users/larsnobel/)
 * (@larsnobel)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/page/2/#post-16070701)
 * Changing to my other Stripe Account using the old API version on the webhooks
   worked.
 * I think the API for the webhooks needs to made backward compatible aswell.
 * Best regards
    Lars

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/error-1702/page/2/?output_format=md) [→](https://wordpress.org/support/topic/error-1702/page/2/?output_format=md)

The topic ‘Error’ is closed to new replies.

 * ![](https://ps.w.org/seatreg/assets/icon-128x128.png?rev=2542994)
 * [SeatReg](https://wordpress.org/plugins/seatreg/)
 * [Support Threads](https://wordpress.org/support/plugin/seatreg/)
 * [Active Topics](https://wordpress.org/support/plugin/seatreg/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/seatreg/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/seatreg/reviews/)

 * 18 replies
 * 2 participants
 * Last reply from: [Siim Kirjanen](https://wordpress.org/support/users/thesiim/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/error-1702/page/2/#post-16071772)
 * Status: resolved