Title: INVALID_STRING_LENGTH on description
Last modified: December 14, 2021

---

# INVALID_STRING_LENGTH on description

 *  Resolved [solidce](https://wordpress.org/support/users/solidce/)
 * (@solidce)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/invalid_string_length-on-description/)
 * when I try to pay with paypal, I get this error.
    I think because I have unicode
   characters my my description. The plugin takes the unicode characters and truncate
   it to 127 characters. But then, when you convert to json, the unicode characters
   are expanded into their respective codes and the full string becomes longer than
   127 characters.
 * Please check:
 *     ```
       Request Body: {"intent":"CAPTURE","purchase_units":[{"reference_id":"default","amount":{"currency_code":"EUR","value":"37.00","breakdown":{"item_total":{"currency_code":"EUR","value":"37.00"},"shipping":{"currency_code":"EUR","value":"0.00"},"tax_total":{"currency_code":"EUR","value":"0.00"}}},"description":"","items":[{"name":"Myproduct\u2122\ufe0f - The Product Product Product","unit_amount":{"currency_code":"EUR","value":"37.00"},"quantity":1,"description":"\ud83e\udd14Hey! Are you aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm nnn ooo ppp qqq rrr sss ttt uuu vvv www zzz?\r\n\r\n\ud83e\udd14 Do","sku":"GGG","category":"PHYSICAL_GOODS","tax":{"currency_code":"EUR","value":"0.00"}}],"payee":{"merchant_id":"9G5XY123123213"},"shipping":{"name":{"full_name":" "},"address":{"country_code":"ES","address_line_1":"my address","address_line_2":"","admin_area_1":"AL","admin_area_2":"pescara","postal_code":"65111"}}}],"application_context":{"user_action":"CONTINUE","shipping_preference":"SET_PROVIDED_ADDRESS","landing_page":"LOGIN","locale":"en-US","brand_name":"Brand","return_url":"https:\/\/omitted.com\/?wc-ajax=ppc-return-url","cancel_url":"https:\/\/omitted.com\/checkout\/"},"payment_method":{"payee_preferred":"IMMEDIATE_PAYMENT_REQUIRED","payer_selected":"PAYPAL"}}
       Response Debug ID: d417fffffff
       Response: Array
       (
           [code] => 400
           [message] => Bad Request
       )
   
       Response Body: {"name":"INVALID_REQUEST","message":"Request is not well-formed, syntactically incorrect, or violates schema.","debug_id":"d417d11sssss","details":[{"field":"/purchase_units/@reference_id=='default'/items/0/description","value":"\ud83e\udd14Hey! Are you aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm nnn ooo ppp qqq rrr sss ttt uuu vvv www zzz?\r\n\r\n\ud83e\udd14 Do","location":"body","issue":"INVALID_STRING_LENGTH","description":"The value of a field is either too short or too long."}],"links":[{"href":"https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH","rel":"information_link","encType":"application/json"}]}
       ```
   
 * I think this should be fixed or a lot of payments will fail. Thank you

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Support [Syde Joost](https://wordpress.org/support/users/joostvandevijver/)
 * (@joostvandevijver)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/invalid_string_length-on-description/#post-15162192)
 * Hello [@solidce](https://wordpress.org/support/users/solidce/)
 * thank you for reaching out to us, we are here to help.
    Some time ago we ran 
   into the same issue when using emoticons in the description and have been working
   on this for some time. However, we do not yet have a solution in place for it
   and can currently only advise you to use a short product description (and no 
   emoji within the first 127 characters) so that you don’t run into this issue.
 * I have linked your ticket to our bug so that you will be updated once any workaround
   or solution is available for you. I hope that is a workable situation for you,
   for the time being.
 * Kind regards,
    Joost
    -  This reply was modified 4 years, 6 months ago by [Syde Joost](https://wordpress.org/support/users/joostvandevijver/).
    -  This reply was modified 4 years, 6 months ago by [Syde Joost](https://wordpress.org/support/users/joostvandevijver/).
 *  Thread Starter [solidce](https://wordpress.org/support/users/solidce/)
 * (@solidce)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/invalid_string_length-on-description/#post-15162223)
 * Thank you for your response.
    Can you link me to the github bug please? I will
   try to help from there. Thank you 🙂
 *  Plugin Support [Syde Joost](https://wordpress.org/support/users/joostvandevijver/)
 * (@joostvandevijver)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/invalid_string_length-on-description/#post-15162786)
 * Hello [@solidce](https://wordpress.org/support/users/solidce/)
 * at this moment the GH entry is not open yet, but I expect we will get this item
   included in a January release. Once opened it should show up here: [https://github.com/woocommerce/woocommerce-paypal-payments/issues](https://github.com/woocommerce/woocommerce-paypal-payments/issues)
 * Hope that helps you further. I have added your name (and the link here) to the
   jira bug, so they can reach out to you if needed any support from merchants or
   when they have the GH bug opened.
 * Kind regards,
    Joost
 *  [Rivkah](https://wordpress.org/support/users/dobiim/)
 * (@dobiim)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/invalid_string_length-on-description/#post-15384178)
 * I also keep getting this error
 * INVALID_REQUEST – The value of a field is either too short or too long.
 * The plugin was working for a short time and then it stopped
 *  Plugin Support [Syde Joost](https://wordpress.org/support/users/joostvandevijver/)
 * (@joostvandevijver)
 * [4 years ago](https://wordpress.org/support/topic/invalid_string_length-on-description/#post-15699200)
 * Hello Andrea,
    ​ ​Yesterday we released version 1.8.1 which should allow you 
   to add an emoji to the product (description) details. This should resolve this
   issue; if you are still encountering this or a similar issue, please open a new
   thread, since this one is aged and will be marked are resolved. ​ ​Kind regards,
   Joost

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘INVALID_STRING_LENGTH on description’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-paypal-payments/assets/icon-256x256.png?rev=
   3234615)
 * [WooCommerce PayPal Payments](https://wordpress.org/plugins/woocommerce-paypal-payments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-paypal-payments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-paypal-payments/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-paypal-payments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-paypal-payments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-paypal-payments/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Syde Joost](https://wordpress.org/support/users/joostvandevijver/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/invalid_string_length-on-description/#post-15699200)
 * Status: resolved