Transaction Report S2S

📄 Transaction Report (Server-to-Server)

POST {{API_BASE_URL}}/api/v1/report-generator/s2s

ℹ️

Note: Please contact your Facilero account manager to obtain the correct production or sandbox API base URL.

🧾 Overview

This endpoint allows merchants to programmatically download transaction reports for a specific date range in either CSV or XLS format.

It replicates the Export Transactions feature available in the Facilero Merchant Portal, but is designed for server-to-server (S2S) use. This is ideal for merchants looking to automate:

  • Reconciliation workflows
  • Accounting/reporting processes
  • Internal or third-party integrations

🔐 Authentication & Headers

Header NameRequiredDescription
x-merchant-keyYour public merchant API key
x-merchant-secretYour private merchant API secret
Content-TypeMust be set to application/json

📤 Request Body Parameters

NameTypeRequiredDescription
dateFromstringYesStart date (YYYY-MM-DD)
dateTostringYesEnd date (YYYY-MM-DD)
dateSourcestringYesDate types: createdDate (default) or lastModifiedDate
formatstringNoReport format: CSV (default) or XLS

🔎

Dates can include time for more precise filtering (e.g., "2025-07-05 00:00:00").


📥 Response

  • Success: HTTP 200 OK Returns the report file as a binary stream.
  • Error: HTTP 4xx/5xx Returns a JSON error message.

✅ Example – Download CSV with Original Filename

curl -OJ '{{API_BASE_URL}}/api/v1/report-generator/s2s' \
  -H 'x-merchant-key: YOUR_KEY' \
  -H 'x-merchant-secret: YOUR_SECRET' \
  -H 'Content-Type: application/json' \
  --data '{"dateFrom":"2025-07-05 00:00:00","dateTo":"2025-07-06 23:59:59", "dateSource":"createdDate"}'
💾

This will save the file using the name provided by the API (e.g., transaction-report-YYYY-MM-DD.csv), assuming the Content-Disposition header is returned.


📊 Optional – Download XLS Format

curl -OJ '{{API_BASE_URL}}/api/v1/report-generator/s2s' \
  -H 'x-merchant-key: YOUR_KEY' \
  -H 'x-merchant-secret: YOUR_SECRET' \
  -H 'Content-Type: application/json' \
  --data '{"dateFrom":"2025-07-01","dateTo":"2025-07-07","dateSource":"createdDate" ,"format":"XLS"}'

❌ Error Examples

1. Missing Fields

curl -X POST '{{API_BASE_URL}}/api/v1/report-generator/s2s' \
  -H "Content-Type: application/json" \
  -H "x-merchant-key: YOUR_KEY" \
  -H "x-merchant-secret: YOUR_SECRET" \
  -d '{"dateFrom":"","dateTo":"2025-07-07"}'

Response:

{
  "error": "Invalid or missing 'dateFrom' field"
}

2. Invalid Credentials

curl -X POST '{{API_BASE_URL}}/api/v1/report-generator/s2s' \
  -H "Content-Type: application/json" \
  -H "x-merchant-key: INVALID" \
  -H "x-merchant-secret: INVALID" \
  -d '{"dateFrom":"2025-07-01","dateTo":"2025-07-07"}'

Response:

{
  "error": "Invalid merchant credentials"
}

📘 Final Notes

  • This API is designed for automation, not manual use — perfect for scheduled reconciliation or integration with external systems.
  • The output format matches what is downloadable from the Merchant Portal.
  • Include timestamps in your date range if you need more precise filtering.
  • For access to the sandbox or production environment, please contact your Facilero account manager.