Skip to main content

PayPal Community

  • Dashboard
  • Send and Request
  • Wallet
  • Business
  • Help
Log in
  • Welcome
    • Guidelines
    • News and Events
    • Suggestions for PayPal
    • General Discussions
  • PayPal Help Community
    • Managing Account
    • Transactions
    • Wallet
    • Security and Fraud
    • Products & Services
    • Reporting
  • MTS Community
    • PayPal Upgrade Community
    • PayPal Payments Standard
    • REST APIs
    • NVP/SOAP APIs
    • SDKs
    • Sandbox Environment
    • PayPal Reporting
    • Payflow
    • Ideas for MTS
    • Client-side Integration
    • Server-side Integration
  • The Archives
    • PayPal Help Community Archives
      • Managing Account Archives
      • Transactions Archives
      • Wallet Archives
      • Security and Fraud Archives
      • Products & Services Archives
      • Reporting Archives
    • Help Community
      • PayPal Basics Archives
      • Payments Archives
      • My Money Archives
      • My Account Archives
      • Disputes and Limitations Archives
      • Products and Services Archives
      • PayPal Credit Archives
    • Merchant Community
      • Merchant Products
      • Business Tools Archives
      • Reporting Archives
      • Managing Risk and Fraud Archives
    • Help Archives
      • About Business (Archive)
      • About Payments (Archive)
      • About Settings (Archive)
      • About eBay (Archive)
      • About Protections (Archive)
      • About Products (Archive)
    • Social and Your Voice Archives
      • Off Topic (Archive)
      • My Feedback for PayPal (Archive)
    • About PayPal Archives
      • Watercooler (Archive)
      • Tax Information (Archive)
      • Fees (Archive)
      • eBay and PayPal (Archive)
      • Coupons and promotions (Archive)
    • My Account Archives
      • My account settings (Archive)
      • Account limits and verification (Archive)
      • Account balance (Archive)
      • Bank accounts and credit cards (Archive)
    • Payments Archives
      • Sending money (Archive)
      • Receiving money (Archive)
      • Refunds (Archive)
      • Donations and Fundraising (Archive)
    • Disputes and Security Archives
      • Disputes and claims (Archive)
      • Fraud, phishing and spoof (Archive)
    • My Business Archives
      • Merchant services (Archive)
      • Reporting and tracking (Archive)
      • Shipping (Archive)
    • PayPal Products Archives
      • PayPal Debit Mastercard (Archive)
      • PayPal Extras MasterCard (Archive)
      • PayPal Mobile & Other Services (Archive)
      • Student Accounts (Archive)
      • Bill Me Later (Archive)
    • Getting to know PayPal
      • My PayPal account
      • Security and protection
    • Receiving and sending money
      • Buying with PayPal
      • Selling with PayPal
    • PayPal Here UK
      • PayPal Here News and Events
      • PayPal Here Community
      • Chip and Pin Card Reader
      • PayPal Here App

The Community Forum will no longer be available starting June 30, 2025. Please note that the forum is now closed for new posts and responses, but previous posts will remain accessible for review until June, 30 2025. For comprehensive support options, please visit PayPal.com/HelpCenter
Merchant Technical Support: For technical support and related questions, please visit our Technical Support Help Center or Developer Central

If you want to report illegal content under the EU Digital Services Act, please do so here

since ‎Oct-19-2018
Country: United States
Type: Business
calirails
calirails Contributor
Contributor
1
Post
0
Kudos
0
Solutions
Your PayPal Anniversary
Organized
Active
The Return
View all
Latest Contributions by calirails
  • Topics calirails has Participated In
  • Latest Contributions by calirails

Create Payment rejects my request made with transa...

by calirails Contributor in Sandbox Environment
‎Oct-19-2018 08:53 AM
‎Oct-19-2018 08:53 AM
I am using the client-side (Javascript) Paypal integration within a Vue.js app. I was able to successfully create and receive a completed payment following this Paypal component guide here. However, I need to be able to pass the detailed line items so that (1) my customers know exactly what they are tendering payment for at all stages of the checkout and so that (2) my merchant has access to their history of what was purchased with each Paypal transaction.    I am currently getting this error but my data suggests appears to be what is required per my understanding of this Paypal create payment API reference here. The error I get from my Chrome Developer Tools is this: Uncaught Error: Error: Request to post https://www.sandbox.paypal.com/v1/payments/payment failed with 400 error. Correlation id: 6cdb868c81733, 6cdb868c81733 { "name": "VALIDATION_ERROR", "details": [ { "field": "transactions.amount", "issue": "Currency amount must be non-negative number, may optionally contain exactly 2 decimal places separated by '.', optional thousands separator ',', limited to 7 digits before the decimal point and currency which is a valid ISO Currency Code" } ], "message": "Invalid request - see details", "information_link": "https://developer.paypal.com/docs/api/payments/#errors", "debug_id": "6cdb868c81733" } at XMLHttpRequest.<anonymous> (https://www.paypalobjects.com/api/checkout.4.0.223.js:14044:39)   In terms of code, my Paypal button is configured as follows: <Paypal env='sandbox'                                 currency='USD'                                 v-bind:client='paypalCredentials'                                 v-bind:button-style='paypalStyle'                                 v-on:payment-cancelled='onPaypalPaymentCancelled'                                 v-on:payment-authorized='onPaypalPaymentAuthorized'                                 v-on:payment-completed='onPaypalPaymentCompleted'                                 v-bind:transactions='paypalTransactionRequest()'>                             </Paypal>   The paypaly button uses the v-bind:transations='' syntax to call a method in my javascript component that returns this JSON payload via JSON.stringify(). I had originally just passed back the object rather than JSON payload. Both methods fail. I noticed the curl example indicates that the price field values are also strings. Is that intended and required? { "intent": "sale", "payer": { "payment_method": "paypal" }, "transactions": [ { "description": "Starwicker Checkout", "amount": { "currency": "USD", "total": 19.94, "details": { "subtotal": 15.94, "tax": 2.01, "shipping": 1.99 } }, "item_list": { "items": [ { "sku": "DTF060", "name": "Mars", "description": "Starwicker Mars", "quantity": 1, "price": 15.94, "tax": 2.01 } ] } } ] }     ... View more
Labels:
  • Labels:
  • Express Checkout
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
Welcome to the PayPal Community!