Answers.Body: <p>In the documentation at <a href="https://docs.civicrm.org/stripe/en/latest/install/" rel="nofollow noreferrer">https://docs.civicrm.org/stripe/en/latest/install/</a></p>
  <p>it says</p>
  <blockquote>
  <p>To accept payments the user must have the following permissions as a minimum:</p>
  <ul>
  <li>access Ajax API</li>
  <li>make online contributions</li>
  </ul>
  </blockquote>
  <p>It is unclear to me whether you have done this or not.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-15T19:25:34.427Z
Answers.Text: Thank you so much. This solved my issue completely. Although I had "make online contributions" switched on for anonymous users, I had "access Ajax API" switched off. Once I rectified this, it work like a dream. Much appreciated!
Answers.UserDisplayName: gillenpj
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-15T19:07:33.267Z
Answers.LastActivityDate: 2023-06-15T19:07:33.267Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>I've created an events page for an event with fees. The fess are processes via a Stripe payment processor. When I'm logged onto CiviCRM, as an administrator, I can enter my credit card details and submit the form, and everything works perfectly well. However, when I attempt the same browsing incognito, although I'm able to access the events page and enter my credit card details, as soon as I hit the submit button a dialogue box pops up with the message error. I've check the logs and indeed two entries are created when the error is generated but I'm unable to interpret what they mean. I guess it's something to do with permissions. <strong>Would anyone have any suggestions how I could go about more precisely diagnosing and resolving this issue?</strong> I'm including the contents of the relevant log entries below. Thank you.</p>
  <p>[error]
  $Fatal Error Details = array:3 [
  &quot;message&quot; =&gt; &quot;You do not have permission to access this page.&quot;
  &quot;code&quot; =&gt; null
  &quot;exception&quot; =&gt; CRM_Core_Exception {#7937
  -errorData: array:1 [
  &quot;error_code&quot; =&gt; 0
  ]
  #cause: null
  -_trace: null
  #message: &quot;You do not have permission to access this page.&quot;
  #code: 0
  #file: &quot;/home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php&quot;
  #line: 615
  trace: {
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php:615 {
  ›   $civicrm_wp_title = ts('You do not have permission to access this page.');
  ›   throw new CRM_Core_Exception(ts('You do not have permission to access this page.'));
  › }
  }
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php:62 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:239 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm.php:1199 { …}
  /home/embracingage/www/www/wp-includes/class-wp-hook.php:308 { …}
  /home/embracingage/www/www/wp-includes/class-wp-hook.php:332 { …}
  /home/embracingage/www/www/wp-includes/plugin.php:565 { …}
  /home/embracingage/www/www/wp-includes/class-wp.php:797 { …}
  /home/embracingage/www/www/wp-includes/functions.php:1334 { …}
  /home/embracingage/www/www/wp-blog-header.php:16 { …}
  /home/embracingage/www/www/index.php:17 { …}
  }
  }
  ]</p>
  <p>[debug]
  $Fatal Error Details = array:3 [
  &quot;message&quot; =&gt; &quot;You do not have permission to access this page.&quot;
  &quot;code&quot; =&gt; null
  &quot;exception&quot; =&gt; CRM_Core_Exception {#7937
  -errorData: array:1 [
  &quot;error_code&quot; =&gt; 0
  ]
  #cause: null
  -_trace: null
  #message: &quot;You do not have permission to access this page.&quot;
  #code: 0
  #file: &quot;/home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php&quot;
  #line: 615
  trace: {
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php:615 {
  ›   $civicrm_wp_title = ts('You do not have permission to access this page.');
  ›   throw new CRM_Core_Exception(ts('You do not have permission to access this page.'));
  › }
  }
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php:62 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:239 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm.php:1199 { …}
  /home/embracingage/www/www/wp-includes/class-wp-hook.php:308 { …}
  /home/embracingage/www/www/wp-includes/class-wp-hook.php:332 { …}
  /home/embracingage/www/www/wp-includes/plugin.php:565 { …}
  /home/embracingage/www/www/wp-includes/class-wp.php:797 { …}
  /home/embracingage/www/www/wp-includes/functions.php:1334 { …}
  /home/embracingage/www/www/wp-blog-header.php:16 { …}
  /home/embracingage/www/www/index.php:17 { …}
  }
  }
  ]'''</p>
  
Tags: <civievent><payment-processor><stripe>
Title: Permission Error when using Stripe payment process as unauthenticated user
ThreadText: # Permission Error when using Stripe payment process as unauthenticated user
  
  (Asked by: username_0 on 2023-06-15)
  
  I've created an events page for an event with fees. The fess are processes via a Stripe payment processor. When I'm logged onto CiviCRM, as an administrator, I can enter my credit card details and submit the form, and everything works perfectly well. However, when I attempt the same browsing incognito, although I'm able to access the events page and enter my credit card details, as soon as I hit the submit button a dialogue box pops up with the message error. I've check the logs and indeed two entries are created when the error is generated but I'm unable to interpret what they mean. I guess it's something to do with permissions. **Would anyone have any suggestions how I could go about more precisely diagnosing and resolving this issue?** I'm including the contents of the relevant log entries below. Thank you.
  
  [error]
  $Fatal Error Details = array:3 [
  "message" => "You do not have permission to access this page."
  "code" => null
  "exception" => CRM\_Core\_Exception {#7937
  -errorData: array:1 [
  "error\_code" => 0
  ]
  #cause: null
  -\_trace: null
  #message: "You do not have permission to access this page."
  #code: 0
  #file: "/home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php"
  #line: 615
  trace: {
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php:615 {
  › $civicrm\_wp\_title = ts('You do not have permission to access this page.');
  › throw new CRM\_Core\_Exception(ts('You do not have permission to access this page.'));
  › }
  }
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php:62 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:239 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm.php:1199 { …}
  /home/embracingage/www/www/wp-includes/class-wp-hook.php:308 { …}
  /home/embracingage/www/www/wp-includes/class-wp-hook.php:332 { …}
  /home/embracingage/www/www/wp-includes/plugin.php:565 { …}
  /home/embracingage/www/www/wp-includes/class-wp.php:797 { …}
  /home/embracingage/www/www/wp-includes/functions.php:1334 { …}
  /home/embracingage/www/www/wp-blog-header.php:16 { …}
  /home/embracingage/www/www/index.php:17 { …}
  }
  }
  ]
  
  [debug]
  $Fatal Error Details = array:3 [
  "message" => "You do not have permission to access this page."
  "code" => null
  "exception" => CRM\_Core\_Exception {#7937
  -errorData: array:1 [
  "error\_code" => 0
  ]
  #cause: null
  -\_trace: null
  #message: "You do not have permission to access this page."
  #code: 0
  #file: "/home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php"
  #line: 615
  trace: {
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php:615 {
  › $civicrm\_wp\_title = ts('You do not have permission to access this page.');
  › throw new CRM\_Core\_Exception(ts('You do not have permission to access this page.'));
  › }
  }
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php:62 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:239 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
  /home/embracingage/www/www/wp-content/plugins/civicrm/civicrm.php:1199 { …}
  /home/embracingage/www/www/wp-includes/class-wp-hook.php:308 { …}
  /home/embracingage/www/www/wp-includes/class-wp-hook.php:332 { …}
  /home/embracingage/www/www/wp-includes/plugin.php:565 { …}
  /home/embracingage/www/www/wp-includes/class-wp.php:797 { …}
  /home/embracingage/www/www/wp-includes/functions.php:1334 { …}
  /home/embracingage/www/www/wp-blog-header.php:16 { …}
  /home/embracingage/www/www/index.php:17 { …}
  }
  }
  ]'''
  
  **Tags:** civievent, payment-processor, stripe
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-06-15. Score: 3 | Accepted answer
  
  In the documentation at <https://docs.civicrm.org/stripe/en/latest/install/>
  
  it says
  
  > To accept payments the user must have the following permissions as a minimum:
  >
  > * access Ajax API
  > * make online contributions
  
  It is unclear to me whether you have done this or not.
  
  > **Comments:**
  > **username_0**: Thank you so much. This solved my issue completely. Although I had "make online contributions" switched on for anonymous users, I had "access Ajax API" switched off. Once I rectified this, it work like a dream. Much appreciated!  
  
  ---
  
  