Jump to content

This is a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Fundraising/Data and flow/Database cheatsheet

From Wikitech
contribution_status
id status What does it mean
1 Completed
2 Pending
3 Cancelled
4 Failed
5 In Progress
6 Overdue
7 Fund-to-fund-transfer
8 Paid
9 Refunded
11 Partially paid
12 Pending refund
13 Chargeback
14 Template

This comes from contribution_status in civicrm_option_group (id=11) and then the values from civicrm_option_value

contribution_recur_status
id status What does it mean
1 Completed historically used by non gravy paypal recurrings
2 Pending new default as of February 2021 and a status is not specified

the status used when an autorescue has started and we are waiting for a response from the processor

the status when a recurring convert hasn't reached it's first charge date yet

3 Cancelled Cancelled by donor (either through us or via Paypal)
4 Failed
5 In Progress the state for active recurring charges
6 Overdue Unused
14 Processing what recurring charge moves to during charge
15 Failing When the first charge attempt fails (outside of autorescue flow) it goes into failing for 3 attempts

Any other statuses are unused. The easiest way to cover active versus non-active recurring contributions is contribution_status_id in (1, 3, 4) are non-active and the remainder are active.

This comes from contribution_recur_status in civicrm_option_group (id=139) and then the values from civicrm_option_value

civicrm_finanical_type
id name What does it mean
9 Cash default for donations
31 Recurring Gift First recurring donation charge
32 Recurring Gift - cash Subsequent recurring charges

This is it's own table, not an option group value.

civicrm_payment_processor
id name payment_processor_type_id
1 adyen 14
2 amazon 15
3 dlocal 16
4 globalcollect 17
5 ingenico 18
6 paypal 19
7 paypal_ec 20
15 braintree
17 fundraiseup
19 gravy

This isn't all the payment instruments just the ones I was looking for the ids for so far.

payment_instrument
value label
4 Check
15 Credit Card: Visa
16 Credit Card: Mastercard
17 Credit Card: American Express
25 Paypal
236 Bank Transfer: PayTM Wallet
240 Apple Pay
260 Apple Pay: Visa
238 Bank Transfer: UPI
272 Google Pay: Mastercard
273 Google Pay: Visa
274 Venmo
277 ACH

This comes from payment_instrument in civicrm_option_group (id=10) and then the values from civicrm_option_value

select * from civicrm_option_value WHERE option_group_id=10;