Skip to content
← Back to activity

Immutable solution version

Venmo checkout fails with "Buyer access token not present"

Version 1Sign in to save

Complete solution

Covers this PayPal problem: Venmo checkout fails with "Buyer access token not present". PayPal/Venmo checkout failing with "Buyer access token not present" (plus a 403 PERMISSION_DENIED on /smart/api/order/.../capture): this happens when you capture the order client-side from onApprove.

The problem

Issue paypal/paypal-js#615 (closed, 7 comments): ### Library used react-paypal-js v8.8.1 ### 🐞 Describe the Bug Most users, when trying to checkout with Venmo (on iOS device) get the error: "Buyer access token not present" [image] Specifically, the onError handler for the PayPalButtons returns the error: "Buyer access token not present - can not call smart api: /smart/api/order/4AE92946YJ553122K/capture Also, in my Paypal Events I see this 403 error, whenever the issue occurs. [image] ### πŸ”¬ Minimal Reproduction In Mobile Safari, try buying this test product with Venmo mount the host path https at container path //www.ninjaduds.

What fixed it

PayPal/Venmo checkout failing with "Buyer access token not present" (plus a 403 PERMISSION_DENIED on /smart/api/order/.../capture): this happens when you capture the order client-side from onApprove. The frontend runs on a Low Scope Access Token that lacks permission to capture, especially for Venmo, local wallets, and some Sandbox configs. Fix: move the capture entirely server-side. In onApprove, send the order ID to your server and capture it there instead of calling actions.order.capture() in the browser. Reporter-verified.

Evidence

In gh:paypal/paypal-js#615 (PayPal), the issue reported was: Issue paypal/paypal-js#615 (closed, 7 comments): ### Library used react-paypal-js v8.8.1 ### 🐞 Describe the Bug Most users, when trying to checkout with Venmo (on iOS device) get the error: "Buyer access token not present" [image] Specifically, the onError handler for the PayPalButtons returns the error: "Buyer access token not present - can not call smart api: /smart/api/order/4AE92946YJ553122K/capture Also, in my Paypal Events I see this 403 error, whenever the issue occurs. [image] ### πŸ”¬ Minimal Reproduction In Mobile Safari, try buying this test product with Venmo mount the host path https at container path //www.ninjaduds. The verified resolution from the thread: PayPal/Venmo checkout failing with "Buyer access token not present" (plus a 403 PERMISSION_DENIED on /smart/api/order/.../capture): this happens when you capture the order client-side from onApprove. The frontend runs on a Low Scope Access Token that lacks permission to capture, especially for Venmo, local wallets, and some Sandbox configs. Fix: move the capture entirely server-side. In onApprove, send the order ID to your server and capture it there instead of calling actions.order.capture() in the browser. Reporter-verified. Source: mount the host path https at container path //github.com/paypal/paypal-js/issues/615

By @issueatlas Β· Version 1 Β· Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_9FQl3wd7rLrnrmy-WJYsXw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Venmo checkout fails with &quot;Buyer access token not present&quot; <span>β€” Vectle</span></a>