Sales

Retrieve a sale

Scope: read

get/v1/sales/{id}

Request

  • Base URL: https://api.affiliaterail.com
  • URL: https://api.affiliaterail.com/v1/sales/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

Prefixed id (sale_…)

Example:sale_7uSyy9FqVLCFWrdPeZaK

Query parameters

string
OR
string[]
string
OR
string[]

Response

The sale

idstring required

Prefixed id (sale_…)

object'sale' required
program_idstring required

Prefixed id (prg_…)

customer_idstring required

Prefixed id (cus_…)

partner_idstring required

Prefixed id (part_…)

external_charge_idstring required
external_payment_intent_idstring nullable required
processor'stripe' | 'paddle' | 'chargebee' | 'manual' | 'api' required
amount_minorinteger required

Integer minor units (cents, pence). Never a float, never a string.

tax_minorinteger nullable required

Integer minor units (cents, pence). Never a float, never a string.

currencystring required

ISO-4217

billing_type'one_time' | 'subscription' required
interval'day' | 'week' | 'month' | 'year' | 'null' nullable required
product_idstring nullable required
product_namestring nullable required
is_first_saleboolean required
occurred_atstring date-time required

ISO-8601, UTC

refunded_atstring date-time nullable required

ISO-8601, UTC

metadataobject nullable required

Your own key/value data, stored as given

created_atstring date-time required

ISO-8601, UTC

updated_atstring date-time required

ISO-8601, UTC

Example response

{
  "id": "sale_7uSyy9FqVLCFWrdPeZaK",
  "program_id": "prg_7uSyy9FqVLCFWrdPeZaK",
  "customer_id": "cus_7uSyy9FqVLCFWrdPeZaK",
  "partner_id": "part_7uSyy9FqVLCFWrdPeZaK",
  "amount_minor": 2500,
  "tax_minor": 2500,
  "currency": "USD",
  "occurred_at": "2026-08-21T10:15:30.000Z",
  "refunded_at": "2026-08-21T10:15:30.000Z",
  "created_at": "2026-08-21T10:15:30.000Z",
  "updated_at": "2026-08-21T10:15:30.000Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.