Skip to main content

Transactions Report

Generate a report of transactions within a specified time range.

POST v1/reports/transactions
curl https://api.sphere.net/v1/reports/transactions \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"format": "json",
"language": "es", // optional, defaults to "en"
"filters": { // optional
"limit": 20, // defaults to 100
"start_time": "2024-01-01T00:00:00Z",
"end_time": "2024-01-31T23:59:59Z",
"currency": "usd",
"customerIds": ["cust_alice", "cust_bob"],
"state": ["completed", "failed"],
"paymentRail": "spherenet"
}
}'

Response

{
"ok": true,
"object": "object",
"statusCode": 200,
"error": null,
"message": "success",
"data": {
"id": "report_123",
"state": "processing",
"type": "transaction_report",
"format": "json",
"language": "es",
"filters": {
"limit": 20,
"start_time": "2024-01-01T00:00:00Z",
"end_time": "2024-01-31T23:59:59Z",
"currency": "usd",
"customerIds": ["cust_alice", "cust_bob"],
"state": ["completed", "failed"],
"paymentRail": "spherenet"
},
"donwloadUrl": null,
"expiresAt": null,
"createdAt": "2024-01-20T19:39:14.316Z",
"updatedAt": "2024-01-20T19:39:14.316Z"
},
"ts": "2024-08-22T16:15:42.707Z",
"request": "request_cdde26b2c0534183a1aaba6baebaec1f"
}

Once the report is ready, the response will include a download URL:

{
"ok": true,
"object": "object",
"statusCode": 200,
"error": null,
"message": "success",
"data": {
"id": "report_123",
"state": "completed",
"type": "transaction_report",
"format": "json",
"language": "es",
"filters": {
"limit": 20,
"start_time": "2024-01-01T00:00:00Z",
"end_time": "2024-01-31T23:59:59Z",
"currency": "usd",
"customerIds": ["cust_alice", "cust_bob"],
"state": ["completed", "failed"],
"paymentRail": "spherenet"
},
"donwloadUrl": "https://api.sphere.net/v1/reports/report_123/download",
"expiresAt": "2024-01-27T19:39:14.316Z",
"createdAt": "2024-01-20T19:39:14.316Z",
"updatedAt": "2024-01-20T19:39:14.316Z"
},
"ts": "2024-08-22T16:15:42.707Z",
"request": "request_cdde26b2c0534183a1aaba6baebaec1f"
}