Skip to content

Transaction

Defined in: v1/schemas.ts:161

A single transaction object as returned by the Teachable v1 API.

Financial fields (charge, final_price, tax_charge etc.) are returned as integers representing the smallest currency unit (e.g. cents), so a value of 66045 represents $660.45.

Several fields are nullable as Teachable may omit or null them depending on the transaction type (e.g. refunds, affiliate transactions, chargebacks).

  • output<typeof TransactionSchema>

optional affiliate_fees?: number | null

Defined in: v1/schemas.ts:137

z.infer.affiliate_fees


optional affiliate_id?: number | null

Defined in: v1/schemas.ts:147

z.infer.affiliate_id


optional amount_refunded?: number

Defined in: v1/schemas.ts:135

z.infer.amount_refunded


optional author_fees?: number | null

Defined in: v1/schemas.ts:138

z.infer.author_fees


optional author_id?: number | null

Defined in: v1/schemas.ts:148

z.infer.author_id


charge: number

Defined in: v1/schemas.ts:131

z.infer.charge


optional chargeback_fee?: number | null

Defined in: v1/schemas.ts:136

z.infer.chargeback_fee


optional coupon_id?: number | null

Defined in: v1/schemas.ts:146

z.infer.coupon_id


created_at: string

Defined in: v1/schemas.ts:126

z.infer.created_at


currency: string

Defined in: v1/schemas.ts:141

z.infer.currency


final_price: number

Defined in: v1/schemas.ts:132

z.infer.final_price


optional has_chargeback?: boolean | null

Defined in: v1/schemas.ts:143

z.infer.has_chargeback


id: number

Defined in: v1/schemas.ts:120

z.infer.id


optional pricing_plan_id?: number

Defined in: v1/schemas.ts:122

z.infer.pricing_plan_id


optional purchased_at?: string

Defined in: v1/schemas.ts:127

z.infer.purchased_at


optional refunded_at?: string | null

Defined in: v1/schemas.ts:128

z.infer.refunded_at


optional revenue?: number

Defined in: v1/schemas.ts:134

z.infer.revenue


optional sale_id?: number

Defined in: v1/schemas.ts:123

z.infer.sale_id


optional status?: string | null

Defined in: v1/schemas.ts:142

z.infer.status


optional tax_charge?: number

Defined in: v1/schemas.ts:133

z.infer.tax_charge


user_id: number

Defined in: v1/schemas.ts:121

z.infer.user_id