Fetch Billing Transactions

Retrieve all billing transactions for the authenticated user. Returns transaction history including invoices, payments, and billing details.

GET /billing/fetchtransactions

Description

This endpoint retrieves all billing transactions associated with the authenticated user. Transactions are returned in descending order by creation date, including payment status, invoice numbers, and transaction details.

Authentication

This endpoint requires Bearer token authentication via the Authorization header.

Code Examples

curl -X GET "https://api-v3.sweeppea.com/billing/fetchtransactions" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"

Response

200 OK

{ "Response": true, "Data": { "TotalTransactions": 8, "Transactions": [ { "InvoiceNumber": "SP-789012", "TransactionID": "456789123456", "Description": "Monthly subscription payment", "Amount": 49.99, "AmountPrizes": 0, "Status": "paid", "ResponseCode": "1", "ErrorCode": "", "Views": 0, "IsFirstTransaction": false, "IsSandboxTransaction": false, "Refunded": false, "CronPay": false, "DocumentType": "invoice", "DataTransferTx": false, "VoidDate": null, "CreationDate": "2025-01-20T10:15:00.000Z", "ExpirationDate": "2025-02-20T10:15:00.000Z", "SentByEmail": [], "Downloads": [] } ] } }

Error Responses

401 Unauthorized

{ "Response": false, "Message": "Invalid or Missing Bearer Token", "Code": 401 }

403 Forbidden

{ "Response": false, "Message": "Invalid API Token", "Code": 403 }

500 Internal Server Error

{ "Response": false, "Message": "Internal Server Error", "Code": 500 }