Skip to content

Payments History export

Exports the history of payouts to your affiliates as a GZIP-compressed CSV file, one row per payment, including amounts and moderation / payout statuses.

Request example

curl -X POST https://affiliatecontrol-api.com/external/exports/payments-history \
  -H "x-access-key: ak_example123" \
  -H "x-secret-key: sk_example456" \
  -H "Content-Type: application/json" \
  -d '{
    "moderation_status": "approved",
    "payout_status": "paid",
    "created_at_from": "2026-06-01 00:00:00",
    "created_at_to": "2026-06-30 23:59:59",
    "webhook_url": "https://example.com/hook"
  }'

Parameters (all optional — omit to export everything):

  • moderation_status (String): One of on_review, approved, declined.
  • payout_status (String): One of not_paid, for_rework, processing, paid, failed.
  • created_at_from / created_at_to (String): Creation-date range, YYYY-MM-DD HH:mm:ss.
  • updated_at_from / updated_at_to (String): Update-date range, YYYY-MM-DD HH:mm:ss.
  • webhook_url (String): URL notified when the file is ready.

Response:

{ "id": "export-id-here" }

Output fields

# Field Type Description
1 id string Payment ID (UUID).
2 incrementing_id number SID — sequential numeric payment ID.
3 affiliate_id string Affiliate ID (recipient of the payment).
4 amount number Amount.
5 currency_code string Currency Code (ISO 4217) of amount.
6 moderation_status enum Moderation status: on_review | approved | declined.
7 payout_status enum Payout status: not_paid | for_rework | processing | paid | failed.
8 payment_period_start string (date) | null Payment period start.
9 payment_period_end string (date) | null Payment period end.
10 site_payment_method_id string | null Site payment method ID (payout method used).
11 payment_wallet string | null Payment wallet.
12 paid_at string (datetime) | null Paid at (when the payout was sent).
13 paid_manually boolean | null Paid manually.
14 created_at string (datetime) Created at.
15 updated_at string (datetime) Updated at.