refund and dispute. Both are
delivered in the Standard-Webhooks
envelope; the fields below describe the
data object. Every event requires the read:self scope.
These events cover one-time purchases only, identified by a
purchase_reference with the appotp_ prefix. Subscription reversals and
chargebacks are reconciled through the App
Subscriptions endpoints, not these webhooks.Refund resource
data.object is "refund". The refund references the original payment via
payment_id, carries amount (not gross), and has no status or paid_at.
Example: app.refund.created
reason tells the three refund paths apart: refund (a normal refund),
chargeback (a dispute resolved against the sale), and cancel (the purchase
was cancelled).Dispute resource
data.object is "dispute". Both app.dispute.flagged (an early warning,
before a formal chargeback) and app.dispute.created (the formal chargeback)
share the dispute resource. Use source to identify the provider that
reported it.
app.dispute.flagged is an early chargeback warning: a partner has
signalled that a dispute is likely, but no formal chargeback has been filed
yet. Treat it as a heads-up to prepare evidence or pre-emptively refund.
app.dispute.created is the formal dispute being opened, and the same
payment can produce a flagged event and later a created event.Example: app.dispute.created
app.dispute.flagged event uses the identical shape with
"type": "app.dispute.flagged"; treat it as an early heads-up to prepare
evidence before a formal chargeback is filed.
Reconciling
data.payment_id (refund) and data.payment.id (dispute) both carry the
invoice number of the original payment, which you can re-read with the app
payments endpoints. See
Reconciliation.