> ## Documentation Index
> Fetch the complete documentation index at: https://docs.staging.cope-demo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Who started a refund

> What initiated_via on refund events means, and when it is absent.

# Who started a refund

`payment.refund.created` and `payment.refund.reversed` carry `initiated_via`: how the refund was started. On
`payment.refund.reversed` it describes the refund being reversed, not the reversal.

| Value | Meaning |
| - | - |
| `api` | Your secret API key, for example `POST /v1/commerce/payments/{id}/refunds`. |
| `dashboard` | A person signed in to COPE: the web dashboard or the COPE mobile app. |
| `support` | COPE support, on your behalf. |
| `processor` | A refund made directly at Stripe or PayPal, in their dashboard or through their API. |

The field is a string, not a closed list. Treat a value you do not recognise as unknown and keep processing the
event: more values may be added.

## When it is absent

COPE fills `initiated_via` only when it is certain how the refund was started. It is absent:

* on refunds made before the field existed;
* on refunds of PayPal payments started through COPE;
* when COPE could not attribute the refund with certainty, for example when COPE retried a request after a timeout
  and the processor answered with the refund from the earlier request;
* on a reversal PayPal starts itself, which arrives as `payment.refund.created`.

Chargebacks and disputes carry no initiator: the buyer's card issuer always starts them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.