install.md 2.99 KB
Newer Older
mattwire's avatar
mattwire committed
1
# Install / Configuration
mattwire's avatar
mattwire committed
2
3
4
5
6
7
8
9

## Installation
**The [mjwshared](https://lab.civicrm.org/extensions/mjwshared) extension is required and MUST be installed.**

**If using drupal webform or other integrations that use Contribution.transact API you should install the [contributiontransactlegacy](https://github.com/mjwconsult/civicrm-contributiontransactlegacy) extension to work around issues with that API.**

The extension will show up in the extensions browser for automated installation.
Otherwise, download and install as you would for any other CiviCRM extension.
mattwire's avatar
mattwire committed
10
11

## Configuration
12
13

### Stripe
mattwire's avatar
mattwire committed
14
15
16
17
18
19
20

Stripe automatically provides both a live and test account for you. Toggle the "test" switch in the Stripe dashboard to switch between the two accounts.

Create API keys and a webhook secret by logging in to your Stripe dashboard and selecting
[API keys](https://dashboard.stripe.com/account/apikeys) from the menu. You can use the
standard key, or you can click "Create restricted key" to have a more limited key.
Example key restrictions are listed below.
21
22

### CiviCRM
mattwire's avatar
mattwire committed
23

mattwire's avatar
mattwire committed
24
Configure a Stripe payment processor in the same way as you would for any other payment processor in CiviCRM.
25

mattwire's avatar
mattwire committed
26
All configuration is in the standard Payment Processors settings area in CiviCRM admin (**Administer menu > System Settings > Payment Processors**).
mattwire's avatar
mattwire committed
27

mattwire's avatar
mattwire committed
28
29
Add a payment processor, select "Stripe" as the type and enter your
*Publishable* and *Secret* keys and your *webhook secret* from the Stripe Dashboard.
mattwire's avatar
mattwire committed
30

mattwire's avatar
mattwire committed
31
32
33
34
35
36
37
38
## Permissions

To accept payments the user must have the following permissions as a minimum:
* `access Ajax API`
* `make online contributions`

This applies to both unauthenticated (anonymous) and authenticated users.

mattwire's avatar
mattwire committed
39
### How to update Stripe API version
40
More info on how to change: [Stripe: Upgrading your API version](https://stripe.com/docs/upgrades#how-can-i-upgrade-my-api).
mattwire's avatar
mattwire committed
41

mattwire's avatar
mattwire committed
42
Go to **Stripe Dashboard > Developers** to view and upgrade your API version:
mattwire's avatar
mattwire committed
43
![Stripe Dashboard API Version](images/stripedashboard_apiversion.png)
mattwire's avatar
mattwire committed
44

mattwire's avatar
mattwire committed
45
The Webhook API versions will be configured / updated automatically by this Stripe extension but if you didn't create them using the automated method you may need to delete them and allow the extension to re-create them.
46
47
48
49

### Stripe API Key restrictions
If you prefer, you can restrict the permissions available to the API key you create.  The below is an example that may have more permissions than is needed, but works with one-time payments, recurring payments, and the webhook check built into this extension.  If a permission isn't listed below, leave it as *None*.

50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
**Core resources**
Balance: *Read*
Charges: *Write*
Customers: *Write*
Disputes: *Write*
Events: *Read*
Products: *Write*
Sources: *Write*
Tokens: *Read*
**Billing resources**
Plans: *Write*
Subscriptions: *Write*
**Connect resources**
Application Fees: *Write*
**Orders resources**
SKUs: *Write*
**Webhook resources**
Webhook Endpoints: *Write* (required for the webhook system check/auto-create webhooks)
mattwire's avatar
mattwire committed
68
![Example Stripe API Permissions](images/example_api_perms.png)
69
70