Paypal Payments Standard Javascript Documentation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does anyone have any documentation for the Payments Standard JS SDK?
The documentation on the site only refers to extremely basic functions like changing the currency.
I want to itemise the purchase units, handle VAT and enable/disable the button based on stock levels for product variants but there doesn't appear to be any information on how to do this
The API reference only refers to the Rest API (and has next to no code examples) but seems to suggest that this is possible.
- Labels:
-
PayPal HTML Buttons

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @dimedaughter,
Thank you for contacting PayPal community.
We apologize for any inconvenience.
I request to please refer the Smart Payment Buttons, which use the PayPal JavaScript SDK.
Sincerely,
Chiranjeevi
PayPal, Inc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Short answer: there isn't any.
There's an issue tracking it in Paypal's github but the entirety of their response after 8 months has been "lol sorry".
You just have to kinda guess at what the code should be by using the REST API documentation.
Also, if you're using webhooks: "CHECKOUT.ORDER.APPROVED" doesn't always mean that payment was successful, but "PAYMENT.CAPTURE.COMPLETED" doesn't contain the items in the order so you may need to use both.
Unfortunately ['resource']['id'] is different for both of these. ['resource']['purchase_units'][0]['payments']['captures'][0]['id'] on "CHECKOUT.ORDER.APPROVED" matches ['resource']['id'] on "PAYMENT.CAPTURE.COMPLETED", but it doesn't always exist so I have no idea how PayPal expects people to actually align a successful order to a successful payment. There's no documentation on this either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- I keep getting the error: “Unfortunately, a system error has occurred" in NVP/SOAP APIs
- How do I offer PayPal Pay Later button on my website? in PayPal Payments Standard
- Let user pick their own own subscription pricing and period? in SDKs
- How to get the merchant-id or how do i get the id that connects my user to get paid via Paypal in REST APIs
- Integrate PayPal Donations with GiveWP? in PayPal Upgrade Community