Purchases

Get a purchase by reference

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

get/v1/sdk/purchases/{purchaseRef}

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

Cancellation reason

cancelledAtstring

Cancelled at

createdAtstring required

Created at

currencystring required

Original payment currency code

customerEmailstring

Customer email

customerRefstring required

Customer reference

endDatestring

End date

exchangeRatenumber

Exchange rate from original currency to USD

isRecurringboolean required

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 (cents/pence)

paidAtstring

Paid at timestamp

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,
  "currency": "GBP",
  "customerEmail": "customer@example.com",
  "customerRef": "cus_3C4D5E6F",
  "exchangeRate": 1.3082,
  "isRecurring": true,
  "origin": "paid",
  "originalAmount": 10000,
  "planSnapshot": {
    "currency": "USD",
    "name": "Pro Monthly",
    "price": 2999,
    "reference": "pln_1A2B3C4D"
  },
  "productName": "API Gateway Manager",
  "productRef": "prd_1A2B3C4D",
  "reference": "pur_1A2B3C4D",
  "status": "active",
  "usage": {
    "periodEnd": "2025-11-01T00:00:00Z",
    "periodStart": "2025-10-01T00:00:00Z",
    "used": 150
  }
}

Changes

Changed in 6 of the 27 revisions of this API.399

    • removed the optional property ///// from the response with the status

      response-optional-property-removed

    • removed the optional property ///// from the response with the status

      response-optional-property-removed

    • removed the optional property ///// from the response with the status

      response-optional-property-removed

    • removed the optional property ///// from the response with the status

      response-optional-property-removed

  • 032545ac8d13143See the full diff
    • removed the required property ///// from the response with the status

      response-required-property-removed

    • removed the optional property ///// from the response with the status

      response-optional-property-removed

    • removed the optional property ///// from the response with the status

      response-optional-property-removed

    • removed the optional property ///// from the response with the status

      response-optional-property-removed

    • removed the optional property ///// from the response with the status

      response-optional-property-removed

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

      response-optional-property-added

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

      response-optional-property-added

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

      response-optional-property-added

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 8578b7536a9f22See the full diff
    • the response property became optional for the status

      response-property-became-optional

    • the response property became optional for the status

      response-property-became-optional

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • the endpoint scheme security SecretKey was added to the API

      api-security-added

    • the endpoint scheme security bearer was removed from the API

      api-security-removed

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

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

      response-optional-property-added

    This revision also has 192 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • removed the optional property ///// from the response with the status

      response-optional-property-removed

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

      response-optional-property-added