Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/antiwork/gumroad/llms.txt

Use this file to discover all available pages before exploring further.

Retrieve all of the successful sales by the authenticated user. Includes sales from all products.
This endpoint uses cursor-based pagination via page_key parameter. The deprecated page parameter will time out for large result sets.

Endpoint

GET https://api.gumroad.com/v2/sales

Authentication

Requires the view_sales OAuth scope.

Query Parameters

page_key
string
Cursor for pagination. Use the next_page_key returned in the response to fetch the next page of results.
after
string
Filter sales created after this date. Format: YYYY-MM-DD.Example: 2024-01-01
before
string
Filter sales created before this date. Format: YYYY-MM-DD.Example: 2024-12-31
email
string
Filter sales by purchaser email address.
product_id
string
Filter sales by product ID (external ID).
order_id
string
Filter sales by order ID (numeric external ID of the purchase).
page
integer
deprecated
Deprecated. Use page_key instead. Page number for offset-based pagination. This parameter may time out for large result sets.

Response

Returns a paginated list of sale objects.
success
boolean
required
Indicates if the request was successful.
sales
array
required
Array of sale objects.
next_page_key
string
Cursor for fetching the next page. Only present if there are more results.
next_page_url
string
Full URL for fetching the next page. Only present if there are more results.

Example Request

curl "https://api.gumroad.com/v2/sales?after=2024-01-01&before=2024-12-31" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response

{
  "success": true,
  "sales": [
    {
      "id": "abc123xyz",
      "email": "buyer@example.com",
      "seller_id": "seller456",
      "created_at": "2024-01-15T10:30:45.000Z",
      "product_id": "prod_abc123",
      "product_name": "My Awesome Product",
      "price": 2999,
      "gumroad_fee": 314,
      "formatted_display_price": "$29.99",
      "formatted_total_price": "$29.99",
      "currency_symbol": "$",
      "order_id": 123456789,
      "purchase_email": "buyer@example.com",
      "full_name": "John Doe",
      "purchaser_id": "user_789",
      "refunded": false,
      "partially_refunded": false,
      "chargedback": false,
      "subscription_id": null,
      "variants": {
        "Size": "Large",
        "Color": "Blue"
      },
      "custom_fields": {
        "Company": "Acme Corp"
      },
      "is_recurring_billing": false,
      "is_product_physical": false
    }
  ],
  "next_page_key": "2024-01-15T09:20:30.123456-next123",
  "next_page_url": "/v2/sales?page_key=2024-01-15T09:20:30.123456-next123"
}

Error Codes

400
error
Bad Request
  • Invalid date format in before or after parameters (must be YYYY-MM-DD)
  • Invalid product_id format
  • Invalid order_id format (must be numeric)
  • Invalid page_key format
401
error
Unauthorized - Invalid or missing access token
403
error
Forbidden - Token does not have view_sales scope

Notes

  • Results are ordered by creation date (descending) and ID (descending)
  • Each page returns up to 10 sales
  • The deprecated page parameter may time out for queries returning large result sets. Use page_key for reliable pagination.
  • Date filters use the sale’s created_at timestamp
  • All monetary values are in cents (USD or the product’s currency)

Build docs developers (and LLMs) love