Sweeppea API v3

Fetch Billing Transactions

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

POST https://api-v3.sweeppea.com/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 POST "https://api-v3.sweeppea.com/billing/fetchtransactions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

{
  "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

{
  "Response": false,
  "Message": "Missing or invalid Bearer token. Send your API token in the Authorization header as: Authorization: Bearer YOUR_API_TOKEN",
  "Code": 401
}
{
  "Response": false,
  "Message": "Invalid API token. It does not match any account.",
  "Code": 403
}
{
  "Response": false,
  "Message": "Internal server error. Please try again; if it persists, contact support with the time of this request.",
  "Code": 500
}
© Sweeppea. All rights reserved.