# Export payments `GET /api/v1/payments/export` Downloads all matching payment records as CSV. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Payments → Read**. ## Query parameters - `payment_type` (string) — Use incoming or outgoing. - `status` (string or array) — Filter by one or more statuses. For incoming payments, a paid filter also includes refunded. - `sport_id` (integer) — Limit results to an active sport. - `subject_type` (string or null) — Use athlete, coach, staff, or manager. - `subject_id` (integer or null) — ID of the associated person. - `athlete_id` (integer) — Filter by athlete ID. - `payer_parent_id` (integer) — Filter by payer parent. - `supplier_id` (integer) — Filter by supplier. - `subscription_id` (integer) — Filter by subscription. - `year` (integer) — Calendar year when no date range is supplied. Defaults to the current year. - `from_date` (date string) — Inclusive start date in YYYY-MM-DD format. - `to_date` (date string) — Inclusive end date in YYYY-MM-DD format. - `context` (string) — Use athlete_detail, parent_detail, coach_detail, or staff_detail to include the full history. - `coach_id` (integer) — Filter by coach when context is coach_detail. - `expand_subject` (integer) — Use 1 to include the subject’s details. - `expand_payer_parent` (integer) — Use 1 to include the paying parent’s details. - `expand_supplier` (integer) — Use 1 to include supplier details. - `split_amounts` (integer) — Use 1 for separate incoming and outgoing amount columns. API key access to this operation depends on the workspace’s payment sport access. A request can return `403` even when the key has Payments read permission. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --get \ --url "https://api.asdincloud.com/api/v1/payments/export" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --data-urlencode "year=2026" \ --data-urlencode "payment_type=incoming" \ --output "payments.csv" ``` ## Response **200 OK** Returns a CSV file with payment dates, amounts, and classifications. ```http HTTP/1.1 200 OK Content-Type: text/csv; charset=UTF-8 Content-Disposition: attachment; filename="export_payments_2026-11-14_120000.csv" ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `400` — The supplied fields or payment state do not allow this action. - `404` — The requested record was not found.