Showing results for 
Search instead for 
Did you mean: 

Javascript buttons return error 401 from graphql with Sanbox client-id

Posted on



Without any code changes on my site, all of a sudden, my sandbox client-id's don't seem to be working anymore. However, I'm not sure if this error is strictly related to my account. The full error is as follows.



/graphql returned status 401\nCe/<@"


Can anyone help me troubleshoot this?


My Javascript looks like the following...


	style: {
		shape: 'pill',
		color: 'white',
		layout: 'vertical',
		label: 'paypal',
    createOrder: function(data, actions) {
      return actions.order.create({
        purchase_units: [{
          amount: {
            value: '24.00'
    onApprove: function(data, actions) {
      return actions.order.capture().then(function(details) {
        // Call your server to save the transaction
        return fetch('/pp/getOrder.php', {
          method: 'post',
          headers: {
            'content-type': 'application/json'
          body: JSON.stringify({
            orderID: data.orderID,
			checkout: 'u5o5LI5RnKMQEM7J9hdCH5Bj2yGcPQas',
			customer: 100,
			cmd: 'newPlan'
        }).then(function(val) { window.location.href='/ovpn/account.php'; });

I'm also using Cloudflare.

Thanks for your time.

Haven't Found your Answer?

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