Skip to main content
GET
/
api
/
v2
/
get-transactions
Get Transactions
curl --request GET \
  --url https://onlyautomator.com/api/v2/get-transactions \
  --header 'Authorization: Bearer <token>'
{
  "status": "success",
  "data": {
    "transactions": [
      {
        "id": "txn_1a2b3c4d-5678-9012-ijkl-456789abcdef",
        "fanId": "12345",
        "type": "tip",
        "amount": 20,
        "currency": "USD",
        "description": "Thank you for the amazing content!",
        "timestamp": "2023-06-15T18:30:45Z",
        "mediaId": null,
        "mediaType": null
      }
    ],
    "summary": {
      "totalAmount": 44.99,
      "tipCount": 1,
      "ppvCount": 1,
      "subscriptionCount": 1,
      "averageAmount": 14.99,
      "highestAmount": 20
    },
    "pagination": {
      "total": 3,
      "limit": 50,
      "offset": 0
    }
  }
}

Description

This endpoint retrieves the transaction history for a specific subscriber, including purchase details, payment amounts, and dates. The data can be used to analyze spending patterns and subscriber value in the CRM interface.

Authentication

This endpoint requires authentication using a valid JWT token representing a valid user session managed by Supabase Auth (cookies).Include the token in the Authorization header as a Bearer token:
Authorization: Bearer <your_jwt_token>
The JWT token is obtained when connecting the account through the extension, or automatically handled by the browser session.Testing Note: Due to the requirement for a live user session, this endpoint cannot be successfully tested directly using the ‘Send’ button in this documentation with a static token.To test:
  1. Call this endpoint from your web application after logging in.
  2. Use curl or a similar tool with a valid, current user JWT obtained from your browser’s session after logging in.
Retrieving JWT Token for Testing: To test endpoints requiring a user session with tools like curl, you need the JWT access token stored by Supabase Auth in your browser.
  1. Log in to your application normally in your browser.
  2. Open Developer Tools (usually F12).
  3. Go to the Application tab (it might be called Storage in Firefox).
  4. Under the Storage section, find Cookies and select your application’s domain (e.g., http://localhost:3000 or https://onlyautomator.com).
  5. Look for a cookie named similar to sb-access-token (the exact name might vary slightly based on Supabase configuration).
  6. Copy the entire value of this cookie. This is your Bearer token.
  7. Use this copied value in the Authorization: Bearer <your_copied_token> header for your curl or other API tool requests.
Note: This token has a limited lifetime and you’ll need to copy a fresh one after it expires.

Request

fanId
string
required
The unique identifier of the subscriber (fan) whose transaction history you want to retrieve
limit
number
default:"50"
Maximum number of transactions to return. Max: 100.
offset
number
default:"0"
Number of transactions to skip (for pagination).
sort
string
default:"date:desc"
Sort order for the transactions. Format: field:direction Possible values: date:asc, date:desc, amount:asc, amount:desc (Note: Actual available sort fields might depend on backend implementation and OpenAPI spec)
startDate
string
Optional ISO date string to filter transactions that occurred on or after this date.
endDate
string
Optional ISO date string to filter transactions that occurred on or before this date.
transactionType
string
Optional filter by transaction type.
Authorization
string
required
Bearer token for authentication

Response

status
string
Indicates the result status (e.g., “success” or “error”).
message
string
A descriptive message, especially in case of an error.
data
object
The main response data if the request is successful.
error
object
Details about the error if the request failed.

Error Codes

Status CodeDescriptionExample JSON Response Body (Illustrative)
200SuccessSee ## Response section above for successful data structure.
400Bad Request (e.g., missing fanId, invalid parameter format)json\n{\n "status": "error",\n "error": {\n "code": "VALIDATION_ERROR",\n "message": "The 'fanId' parameter is required and must be a string.",\n "details": {\n "fanId": "Required field missing or invalid type"\n }\n }\n}\n
401Unauthorized (missing or invalid JWT token)json\n{\n "status": "error",\n "error": {\n "code": "UNAUTHENTICATED",\n "message": "Authentication is required and has failed or has not yet been provided."\n }\n}\n
403Forbidden (user does not have permission)json\n{\n "status": "error",\n "error": {\n "code": "FORBIDDEN",\n "message": "You do not have permission to access transactions for this fan.",\n }\n}\n
404Not Found (e.g., fanId does not exist)json\n{\n "status": "error",\n "error": {\n "code": "NOT_FOUND",\n "message": "Subscriber with ID 'non_existent_fan_id' not found."\n }\n}\n
500Internal Server Errorjson\n{\n "status": "error",\n "error": {\n "code": "INTERNAL_SERVER_ERROR",\n "message": "An unexpected error occurred on the server. Please try again later."\n }\n}\n
Actual error messages and codes might vary slightly based on the specific error condition. Refer to the error object in the response for precise details.

Code Examples

# Get transaction history for a specific fan
# Replace YOUR_JWT_TOKEN and YOUR_FAN_ID with actual values
curl -X GET \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  "https://onlyautomator.com/api/v2/get-transactions?fanId=YOUR_FAN_ID&limit=10&offset=0"

Notes

  • Transaction history is automatically synced when the subscriber’s profile is viewed in the CRM panel.
  • The data includes all transactions captured through the OnlyFans platform that are accessible to OnlyAutomator.
  • For privacy and security reasons, sensitive payment details like credit card information are never stored or returned.
  • Historical data availability may vary depending on when the creator started using OnlyAutomator and the data retention policies of OnlyFans.
  • The sort parameter defines the order of transactions. Ensure your backend implementation correctly parses and applies this.
  • The startDate, endDate, and transactionType parameters allow for more granular filtering of transactions.

Authorizations

Authorization
string
header
required

Standard user JWT token for authentication.

Headers

Authorization
string
required

Bearer token for authentication (JWT)

Query Parameters

fanId
string
required

Unique identifier of the subscriber/fan whose transaction history should be retrieved

startDate
string<date-time>

Optional ISO date string to filter transactions after this date

endDate
string<date-time>

Optional ISO date string to filter transactions before this date

transactionType
enum<string>

Optional filter by transaction type (e.g., 'tip', 'ppv', 'subscription')

Available options:
tip,
ppv,
subscription,
bundle,
stream,
other
limit
integer
default:50

Maximum number of transactions to return (default: 50, max: 100)

Required range: x <= 100
offset
integer
default:0

Number of transactions to skip for pagination (default: 0)

Response

Transactions retrieved successfully

status
string
Example:

"success"

data
object