Emojis shown incorrectly in Transaction Search API

cmbuckley
Contributor
Contributor

Hi,

 

One of my transactions contains an emoji in the notes field. In the PayPal dashboard, I can see it is correctly displayed:

cmbuckley_0-1707342931679.png

However, the Transaction Search API response contains a replacement character:

 

 

"transaction_note": "Spider �️"

 

 

I thought this was a problem on my end but I piped a curl response directly into hexdump and the bytes are:

 

ef bf bd ef b8 8f

 

or U+FFFD (replacement character) followed by U+FE0F (VS16, emoji) - so I’m pretty sure this is an issue with the API.

Login to Me Too
2 REPLIES 2

Kavyar
Moderator
Moderator

Good day @cmbuckley 

 

Thank you for posting to the PayPal community.

 

The "transaction_note" field serves as a means for the payer to communicate special requests or instructions to the payee.

It is important to note that "transaction_note" field only accepts values in the form of a "string". Therefore, it is not possible to include emojis or any other non-string characters in the transaction_note.

 

For more information, kindly visit the following link - https://developer.paypal.com/docs/api/transaction-search/v1/#definition-transaction_info

 

If you are still experiencing issues, please create an MTS ticket via the following URL  - https://www.paypal-support.com/s/?language=en_US  .Please ensure that you provide detailed information and error details when submitting the ticket.

 

Sincerely,

Kavya

PayPal MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

cmbuckley
Contributor
Contributor

Hi Kavya,

 

An emoji is a string, so yes it absolutely can be included in the notes field, and the mobile app encourages it:

IMG_4685.jpg

The screen shot above containing "Spider 🕷" is from one such note that I have created. It is showing correctly in the mobile app and in the desktop website as mentioned, but the API response seems not to be properly handling UTF-8. The correct bytes would be f0 9f 95 b7 (U+1F577).

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.