GET
/
api
/
v2
/
get-transactions
// Example: Get transaction history for a subscriber
fetch('https://onlyautomator.com/api/v2/get-transactions?fanId=12345&limit=25&sort=date:desc', {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_JWT_TOKEN'
  }
})
.then(response => response.json())
.then(data => {
  if (data.status === 'success') {
    console.log('Transaction history:', data.data.transactions);
    console.log('Total spent:', data.data.stats.totalSpent);
  } else {
    console.error('Error:', data.error.message);
  }
})
.catch(error => {
  console.error('Request failed:', error);
});
{
  "status": "error",
  "error": {
    "code": "authentication_required",
    "message": "You must be authenticated to access this resource"
  }
}

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
skip
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
Authorization
string
required
Bearer token for authentication

Response

status
string
Will be success when the request is successful
data
object

Error Codes

{
  "status": "error",
  "error": {
    "code": "authentication_required",
    "message": "You must be authenticated to access this resource"
  }
}
{
  "status": "error",
  "error": {
    "code": "validation_error",
    "message": "The 'fanId' parameter is required"
  }
}
{
  "status": "error",
  "error": {
    "code": "resource_not_found",
    "message": "Subscriber with ID '12345' not found"
  }
}
{
  "status": "error",
  "error": {
    "code": "permission_denied",
    "message": "You do not have permission to view transactions for this subscriber"
  }
}

Example Usage

// Example: Get transaction history for a subscriber
fetch('https://onlyautomator.com/api/v2/get-transactions?fanId=12345&limit=25&sort=date:desc', {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_JWT_TOKEN'
  }
})
.then(response => response.json())
.then(data => {
  if (data.status === 'success') {
    console.log('Transaction history:', data.data.transactions);
    console.log('Total spent:', data.data.stats.totalSpent);
  } else {
    console.error('Error:', data.error.message);
  }
})
.catch(error => {
  console.error('Request failed:', error);
});

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
  • 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

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

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