88mids

CSV Report API

Request a CSV report of your pay-ins and payouts, get notified when it is ready, and download it.

CSV Report API information

FieldData Description
Base URLhttps://<url-provided> — the same host you use for your other API calls
Request Report URLPOST https://<url-provided>/api/v1/external/report/csv
Report Status URLGET https://<url-provided>/api/v1/external/report/{id}
Data format:All data is sent and received in the JSON format.
Content-Type:application/json
Headers:‘apikey’: <merchant-apikey-provided-by-admin>
Request datesfrom and to are UTC, format yyyy-MM-ddTHH:mm:ss (e.g. 2025-08-01T00:00:00)

How it works

Reports are generated asynchronously. You do not wait for the file in the API response — you receive a report ID immediately and a notification to your webhook URL when the file is ready.

StepWhoWhat happens
1YouSend POST /api/v1/external/report/csv with the report type, period and your webhook URL.
2APIValidates the request and returns the report id with status PENDING.
3APIGenerates the CSV file. Requests are processed one after another, so a report can take from a few seconds to several minutes depending on the period and the queue.
4APISends a POST notification to your webhook URL with status READY and the reportUrl, or FAILED if the report could not be generated.
5YouDownload the CSV file from reportUrl (plain HTTPS GET, no API key needed). The link is valid for 72 hours.
*YouAt any time you can check the status and get the link with GET /api/v1/external/report/{id} — e.g. if your webhook was unavailable.

Report statuses: PENDING — report is queued or being generated; READY — file is available at reportUrl; FAILED — report could not be generated, please request a new one.

Request a CSV Report

Request Report Fields

All fields are required.

FieldTypeDescription
typeStringPAYIN — pay-ins (deposits) only. PAYOUT — payouts only. TRANSACTION — pay-ins and payouts in one file.
fromStringPeriod start (inclusive), UTC, yyyy-MM-ddTHH:mm:ss.
toStringPeriod end (inclusive), UTC, yyyy-MM-ddTHH:mm:ss. Must not be before from.
webhookURLStringAbsolute URL (http/https) where the readiness notification is sent.

Transactions are included by their creation date.

Request Report Sample

curl -X POST "https://{url-provided}/api/v1/external/report/csv" \
  -H "apikey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "PAYIN",
    "from": "2025-08-01T00:00:00",
    "to": "2025-09-29T23:59:59",
    "webhookURL": "https://example.com/webhooks/csv-report"
  }'

Request Report Response Sample

{
  "id": "3f6c2a9e-8b1d-4c7a-9e2f-5d4b7a1c0e93",
  "type": "PAYIN",
  "from": "2025-08-01T00:00:00",
  "to": "2025-09-29T23:59:59",
  "status": "PENDING",
  "reportUrl": null,
  "createdDate": "2025-09-30T08:15:02.417+00:00"
}

Store the id — it identifies the report in the webhook notification and in the status request.

Get Report Status

GET https://{url-provided}/api/v1/external/report/{id}

The apikey header is required. You can only access reports created with your own API key.

Report Status Request Sample

curl "https://{url-provided}/api/v1/external/report/3f6c2a9e-8b1d-4c7a-9e2f-5d4b7a1c0e93" \
  -H "apikey: YOUR_API_KEY"

Report Status Response Sample

{
  "id": "3f6c2a9e-8b1d-4c7a-9e2f-5d4b7a1c0e93",
  "type": "PAYIN",
  "from": "2025-08-01T00:00:00",
  "to": "2025-09-29T23:59:59",
  "status": "READY",
  "reportUrl": "https://{storage-host}/csv-reports/...",
  "createdDate": "2025-09-30T08:15:02.417+00:00"
}

Report Status Response Fields

FieldDescription
idReport ID
typePAYIN, PAYOUT or TRANSACTION
fromPeriod start as requested (UTC)
toPeriod end as requested (UTC)
statusPENDING, READY or FAILED
reportUrlDownload link, set only when status is READY
createdDateWhen the report was requested

Webhook Notification

When the report is finished, a POST request with a JSON body is sent to the webhookURL from your request.

Webhook Headers

HeaderValue
Content-Typeapplication/json
apikeyYour merchant API key — use it to verify the notification comes from us

Webhook Fields

FieldDescription
idReport ID returned when the report was requested
typePAYIN, PAYOUT or TRANSACTION
fromPeriod start (UTC)
toPeriod end (UTC)
statusREADY or FAILED
reportUrlDownload link (only for READY)
messageError description (only for FAILED)

Webhook Sample — Report Ready

{
  "id": "3f6c2a9e-8b1d-4c7a-9e2f-5d4b7a1c0e93",
  "type": "PAYIN",
  "from": "2025-08-01T00:00:00",
  "to": "2025-09-29T23:59:59",
  "status": "READY",
  "reportUrl": "https://{storage-host}/csv-reports/...",
  "message": null
}

Webhook Sample — Report Failed

{
  "id": "3f6c2a9e-8b1d-4c7a-9e2f-5d4b7a1c0e93",
  "type": "PAYIN",
  "from": "2025-08-01T00:00:00",
  "to": "2025-09-29T23:59:59",
  "status": "FAILED",
  "reportUrl": null,
  "message": "Report generation failed"
}

Your webhook endpoint should respond with any 2xx status. The notification is sent once and is not retried — if your endpoint was unavailable, use GET /api/v1/external/report/{id} to get the status and the download link.

Report File

PropertyValue
FormatCSV, UTF-8, comma separated, first row is the header, values containing commas are quoted
RowsOne row per transaction whose creation date is within the requested period
SortingBy creation date, oldest first. In TRANSACTION reports pay-ins and payouts are mixed in date order
DatesUTC, format yyyy-MM-dd HH:mm:ss
AmountsDecimal with 2 digits and a dot separator, e.g. 1250.00
Empty periodThe file contains only the header row

Report File Columns

#ColumnDescription
1TypePAYIN or PAYOUT
2IDTransaction ID
3Order IDYour order ID sent when the transaction was created
4StatusTransaction status, e.g. SUCCESS, PENDING, REJECTED, REVERSED
5MethodPayment method, e.g. BANK_TRANSFER
6CurrencyTransaction currency, e.g. INR
7AmountTransaction amount
8FeeTransaction fee
9Created Date (UTC)When the transaction was created
10Updated Date (UTC)When the transaction was last updated

Report File Sample

Type,ID,Order ID,Status,Method,Currency,Amount,Fee,Created Date (UTC),Updated Date (UTC)
PAYIN,DP-1001,order-1001,SUCCESS,BANK_TRANSFER,INR,1250.00,31.25,2025-08-01 09:12:44,2025-08-01 09:14:02
PAYOUT,PO-2001,order-2001,SUCCESS,BANK_TRANSFER,INR,500.00,5.00,2025-08-01 10:03:10,2025-08-01 10:05:51
PAYIN,DP-1002,order-1002,REJECTED,BANK_TRANSFER,INR,300.00,0.00,2025-08-02 14:40:00,2025-08-02 14:41:12
PAYOUT,PO-2002,order-2002,REVERSED,BANK_TRANSFER,INR,500.00,-5.00,2025-08-03 08:20:31,2025-08-04 11:00:09
  • reportUrl is a private, pre-signed link to your file only. Open it with a plain HTTPS GET — no API key or other headers are needed.
  • The link is valid for 72 hours. Anyone who has the link can download the file during that time, so do not share it.
  • Files are kept for 3 days. After the link expires, request a new report for the same period.

Errors

Errors are returned as JSON:

{
  "timestamp": "2025-09-30T08:15:02.417+00:00",
  "message": "from date must be before to date",
  "details": "MERCHANT_EXCEPTION"
}
HTTP statusmessageReason
400{type is required;}Missing field. Several missing or invalid fields are listed together, e.g. {from is required;to is required;}
400{webhookURL must be a valid URL;}webhookURL is not an absolute http/https URL
400from date must be before to datefrom is later than to
400An invalid parameter messageUnknown type value or wrong date format
400Report not foundUnknown report ID, or the report belongs to another merchant
400Could not create report, please try again laterTemporary issue — retry the request later
400Error: The IP not whitelistedThe request comes from an IP address that is not whitelisted for your account
403No api key provided / Api key is incorrectMissing or wrong apikey header

On this page