Purchases

Get a purchase by reference

Changed on

Retrieves a single purchase including plan snapshot, usage, and billing details.

get/v1/sdk/purchases/{purchaseRef}

Request

Path parameters

purchaseRefstring required
Example:pur_1A2B3C4D

Purchase reference or ID

Response

Purchase retrieved successfully

amountnumber required

Amount in USD cents (normalised for aggregation)

autoRenewboolean

Auto-renew enabled

billingCycle'weekly' | 'monthly' | 'quarterly' | 'yearly'

Billing cycle

cancellationReasonstring

Reason for cancellation

cancelledAtstring

When purchase was cancelled

createdAtstring required

Created at

currencystring required

ISO 4217 currency code of the customer-facing charge

customerEmailstring

Customer email

customerRefstring required

Customer reference

endDatestring

End date of purchase

exchangeRatenumber

Exchange rate from original currency to USD

isRecurringboolean required

Whether the purchase is recurring

metadataobject

Arbitrary metadata attached to the purchase

nextBillingDatestring

Next billing date

origin'paid' | 'free_default' | 'manual' | 'one_time' | 'credit_topup' | 'admin_assignment'

How the purchase originated

originalAmountnumber

Original amount in the payment currency (minor units)

paidAtstring

Paid at timestamp

planRefstring

Plan reference from the plan snapshot, for reliable plan matching

productNamestring

Product name

productRefstring

Product reference

referencestring required

Purchase reference

requiresPaymentboolean

Whether the purchase requires payment

startDatestring required

Start date

statusstring required

Purchase status

Example response

{
  "amount": 9900,
  "cancellationReason": "Customer request",
  "cancelledAt": "2025-10-28T10:00:00Z",
  "currency": "GBP",
  "customerEmail": "customer@example.com",
  "customerRef": "cus_3C4D5E6F",
  "endDate": "2025-11-27T10:00:00Z",
  "exchangeRate": 1.32,
  "isRecurring": true,
  "origin": "paid",
  "originalAmount": 7500,
  "planRef": "pln_abc123",
  "planSnapshot": {
    "currency": "USD",
    "isMetered": true,
    "name": "Pro Monthly",
    "price": 2999,
    "reference": "pln_1A2B3C4D"
  },
  "productName": "API Gateway Manager",
  "productRef": "prd_abc123",
  "reference": "pur_1A2B3C4D",
  "startDate": "2025-10-27T10:00:00Z",
  "status": "active",
  "usage": {
    "periodEnd": "2025-11-01T00:00:00Z",
    "periodStart": "2025-10-01T00:00:00Z"
  }
}

Changes

    • info

      added to the response property allOf list for the response status

    • info

      removed from the response property allOf list for the response status

    • info

      added the optional property to the response with the status

    • info

      added the optional property ///// to the response with the status