Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Roadmap of planned features
This roadmap may not always be up to date but gives an idea of what is planned and where funding/support is required.
## Automatic import of subscriptions / payments
If we already have the Stripe customer in CiviCRM we can import subscriptions and one-off contributions that were
created outside of CiviCRM (eg. via WooCommerce, Stripe Dashboard).
### Specification
1. Add a setting to control whether import should happen automatically.
2. Update Stripe IPN code to automatically create:
- A recurring contribution when an unknown Stripe subscription ID is received.
- A contribution linked to a recurring contribution when an unknown invoice ID is received.
- A contribution when an unknown charge ID is received (that does not have an associated invoice ID).
- A payment linked to a contribution via charge ID / invoice ID.
### Estimate
This would require funding for approximately 12 hours work.
## UI to map customers to CiviCRM contacts
Based on the existing `Stripe.Importcustomers` API we can build a UI in CiviCRM that allows to manually
confirm and map Stripe customer IDs to CiviCRM contacts.
### Specification
1. Build a UI that lists Stripe customers which do not exist in CiviCRM.
2. Provide options to:
- Confirm the auto-detected mapping.
- Manually find and map contact.
- Import all missing subscriptions/contributions for customer (up to certain date?).
### Estimate
This would require funding for approximately 16 hours work.
See: https://lab.civicrm.org/extensions/stripe/-/issues/64
Stripe supports saving cards and other payment methods. These can be retrieved, re-used and updated.
We would like to provide support for re-using saved cards in CiviCRM.
### Specification
#### 1. Allow users to update card details (edit current or add new)
Implement API to retrieve all cards for customer and build UI to display cards.
* Stripe API to list cards: https://stripe.com/docs/api/cards/list
Implement API and UI to update card details.
* Use stripe card element with SetupIntent: https://support.stripe.com/questions/update-card-details-with-a-setupintent
Add form to CiviCRM specifically for card updates.
#### 2. Allow admin to update card details
Extend above to work on admin as well. Will be more complex and won't work as well because of card
security requiremetns (eg. 3dsecure).
Administrators can do it through the stripe portal currently so user self-service
is probably a priority for civi?
#### 3. Integrate card-selection UI into payment flow
(so for example a form validation failure will remember the card you just entered and verified).
#### 4. Develop a method to deduplicate payment methods
See: eg. https://github.com/stripe/stripe-payments-demo/issues/45).
Cards are duplicated by default and we need to clean this up before we can provide a UI to retrieve cards in CiviCRM.
## Payment Requests (Google / Apple Pay)
See [Stripe#81](https://lab.civicrm.org/extensions/stripe/-/issues/81).
See [Make it Happen](https://civicrm.org/make-it-happen/stripe-ach-payments) campaign on CiviCRM.org.
See [Stripe documentation - bancontact](https://stripe.com/docs/payments/bancontact)
### Implementation
1. Create a paymentIntent of type "bancontact" and return the client secret.
2. Collect payment method details (name) on the client form.
3. Handle redirect to bancontact to make payment and return to CiviCRM.
4. Handle payment_intent.succeeded webhook to confirm payment.
20 hours. This represents approximately 12 hours for the generic [Bank Redirect](https://stripe.com/docs/payments/bank-redirects) functionality
in the Stripe extension and then 8 hours for the specific payment method "Bancontact".
Adding additional payment methods such as Sofort would then require approximately 8 hours each
to implement.
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
## Update Subscription
See: https://lab.civicrm.org/extensions/stripe/-/issues/18
#### Stripe -> CiviCRM
The actual amount is taken and processed via Stripe so the sync from Stripe -> CiviCRM is *information only*.
This requires handling the `customer.subscription.updated` webhook and extracting the required
information to update the recurring contribution in CiviCRM.
#### CiviCRM -> Stripe
CiviCRM has native forms for updating the subscription in CiviCRM. The parameters to support are:
* Amount.
* Schedule (frequency unit/interval).
To setup a subscription in Stripe there are 3 objects involved:
* Subscription - one or more "plans" that make up a subscription.
* Plan - A payment plan (eg. once a month).
* Product - one or more "products" that are included in a plan.
Currently we create a product, add it to a plan and add that plan to a subscription. Then we link the
subscription to CiviCRM via the Stripe subscription ID.
We create plans based on the frequency interval, unit, amount + currency and re-use existing ones if we have already created them:
```php
$planId = "every-{$params['recurFrequencyInterval']}-{$params['recurFrequencyUnit']}-{$amount}-" . strtolower($currency);
```
### Estimate