Skip to main content

PayPal Community

  • Dashboard
  • Send and Request
  • Wallet
  • Business
  • Help
Log in

Le Forum de la communauté n’est pas disponible pour les nouveaux messages ou les réponses; les articles précédents restent disponibles pour vérification. Afin de connaître les options d’assistance complètes, rendez-vous sur PayPal.com/HelpCenter

Si vous souhaitez signaler du contenu illégal et contraire au Règlement sur les services numériques de l’Union Européenne (DSA), veuillez cliquer ici.

since ‎Sep-23-2023
JBuggsy
JBuggsy
New Community Member
1
Post
0
Kudos
0
Solutions
Ice Breaker
View all
Latest Contributions by JBuggsy
  • Topics JBuggsy has Participated In
  • Latest Contributions by JBuggsy

Re: "Token signature verification failed" when cre...

by JBuggsy in Sandbox Environment
‎Sep-23-2023 08:48 PM
‎Sep-23-2023 08:48 PM
I'm having a similar problem but I am coding in VS code.  When I click the paypal button I get: "Could not initiate PayPal Checkout... Error: {"error":"invalid_token","error_description":"Token signature verification failed"}".     How can I fix this in my environment?   here is a code snippet where I found the problem to be.  the "orderData.id" is returning false.  why? window.paypal   .Buttons({     async createOrder() {       try {         const response = await fetch("/api/orders", {           method: "POST",           headers: {             "Content-Type": "application/json",           },           // use the "body" param to optionally pass additional order information           // like product ids and quantities           body: JSON.stringify({             cart: [               {                 id: "YOUR_PRODUCT_ID",                 quantity: "YOUR_PRODUCT_QUANTITY",               },             ],           }),         });         const orderData = await response.json();         if (orderData.id) {           return orderData.id;         } else {           const errorDetail = orderData?.details?.[0];           const errorMessage = errorDetail             ?`${errorDetail.issue} ${errorDetail.description} (${orderData.debug_id})`             : JSON.stringify(orderData);           throw new Error(errorMessage);         }       } catch (error) {         console.error(error);         resultMessage(`Could not initiate PayPal Checkout...<br><br>${error}`);       }     } ... View more
Paypal Logo
  • Help
  • Contact Us
  • Security
  • Fees
  • © 1999-2025 PayPal, Inc. All rights reserved.
  • Privacy
  • Legal
  • Cookies
  • Policy Updates

The money in your balance is eligible for pass-through FDIC insurance.

The PayPal Cash Mastercard is issued by The Bancorp Bank pursuant to a license by Mastercard International Incorporated. The Bancorp Bank; Member FDIC.

Powered by Khoros