This event means that the status of a payment has changed. To reduce noise, we only include status changes that occur after the user interaction has finished and are linked to a form submission. Status changes may also include additional information from the payment provider (e.g., transaction IDs). This usually means that the payment has either succeeded or failed. Note that after a payment fails, the user might choose to retry, which will yield more status changes for the same payment.
For each payment method, there are typical status sequences that the payment goes through. The exact meaning of the statuses and content of the payment_data
also depends on the payment method.
Here is a list of the most common payment statuses used in Impact Stack 1.0.
payment_status_success
: The payment was successfully processed. The donation form was submitted and the supporter was redirected to the thank you page.
payment_status_failed
: Something went wrong during the payment.
payment_status_new
: The payment process was (re)started reusing the same form submission.
payment_status_pending
: The payment is being processed by the payment provider.
Specific statuses for Stripe:
stripe_payment_status_accepted
: Stripe’s client side validation passed and the form was submitted. The supporter was redirected to the thank you page.
payment_status_success
: Stripe called a webhook to notify our system that the payment was successfully processed.
stripe_payment_intent_created
: This means that the client-side validation has been triggered for the first time, triggering the creation of an intent.
stripe_payment_no_intent
: Error condition. This means Stripe notified us about a payment for which we don’t have a matching intent.
New in version 1.2.0.
Each status update contains the full list of payment line_items
. Each line item has the following data:
name
: A unique name for this line item, set when configuring the form
amount
(float): The price of each unit
quantity
(float): The number of items
tax_rate
(float): The applicable VAT (or equivalent) tax rate
recurrence_interval
(interval): For recurring payments this specifies the interval (e.g. P1M
for monthly, P1Y
for yearly). It is set to null
for one-off payments.
The total amount of the payment is the sum over all line items:
For most of our donation forms there will be only one line item with quantity=1
and tax_rate=0
.
The line items are converted into Donation events (one event per recurrence_interval
). For most use cases, these are easier to interpret.
id: 123
type: payment_status_change
version: 1.1.0
# Payment ID. Use this to match multiple status changes for the same payment.
pid: '9088'
# Machine name of the payment method
controller: stripe_payment_credit_card
# Labels for the payment method
method_generic: Credit card
method_specific: Stripe Payment (Live)
# New and old payment status
status: stripe_payment_status_accepted
previous_status: payment_status_pending
# Payment amount and currency
total_amount: 100
currency_code: EUR
# Payment method specific data (stripe intent ID in this case)
payment_data:
transaction_id: pi_3NOKIODvbS6ezf4w21zIR6Ft
# Line items:
line_items:
- name: one-off
amount: 10
quantity: 9
tax_rate: 0
recurrence_interval: null
- name: monthly-item
amount: 10
quantity: 1
tax_rate: 0
recurrence_interval: P1M
# UUID of the form-submission
uuid: cb59fac8-51ea-4348-94a8-bb073c53aad5