Fovea.Billing

is now IAPTIC, please go to the new and better version of our system.

Transactions API

GET /v2/transactions
Access the individual transactions.

Requirements

Response body

The /v2/transactions request returns a JSON object containing information about the transactions.

{
  "paging": {
    "skip": 0,
    "limit": 4,
    "total": 129
  },
  "rows": [
    {
      "transactionId": "apple:1001",
      "productId": "apple:monthly_subscription",
      "receiptId": "apple:100000888100001",
      "platform": "apple",
      "purchaseDate": "2021-06-28T13:10:59.000Z",
      "expirationDate": "2022-02-28T13:10:59.000Z",
      "renewalDate": "2022-01-28T13:10:59.000Z",
      "isExpired": false,
      "renewalIntent": "Lapse",
      "renewalIntentChangeDate": "2022-01-12T00:00:02.022Z",
      "priceUSD": 2.99,
      "priceMicros": 2990000,
      "currency": "USD",
      "priceConsentStatus": "Notified"
    }
  ]
}
Property name Type Description
rows Transactions[] Array of transactions. See Transactions below.
paging Paging Request paging information. See Paging below.

Query Parameters

Property name Type Description
skip number Number of rows to skip in the output.
limit number Maximal number of rows to return.
startdate date-time Only return transactions that happened after the provided start date (included).
enddate date-time Only return transactions that happened before the provided end date (excluded).

Transaction

Information about a transaction.

Property name Type Description
transactionId string Transaction identifier.
purchaseId string Identifier for the purchase this transaction is a part of.
productId string Purchased product.
platform Platform Platform the purchase was made from.
sandbox boolean True when the transaction was made in sandbox environment.
purchaseDate date-time Time the purchase was made. For subscriptions this is equal to the date of the first transaction.
Note that it might be undefined for deleted transactions (google for instance don’t provide any info in that case).
lastRenewalDate date-time Time a subscription was last renewed.
expirationDate date-time When the subscription is set to expire following this transaction.
renewalIntent string Whether the customer intents to let a subscription be renewed when it reaches its current expiry time. Possible values:

  • Renew – The subscription will renew at the end of the current subscription period.
  • Lapse – The customer has turned off automatic renewal for the subscription. Check the cancelationReason field for details.
renewalIntentChangeDate date-time When the renewal intent was changed.
cancelationReason string Reason for a purchase to have been cancelled. Possible values:

  • Developer – Subscription canceled by the developer.
  • System – Subscription canceled by the system for an unspecified reason.
  • System.Replaced – Subscription upgraded or downgraded to a new subscription.
  • System.ProductUnavailable – Product not available for purchase at the time of renewal.
  • System.BillingError – Billing error; for example customer’s payment information is no longer valid.
  • Customer – Subscription canceled by the user for an unspecified reason.
  • Customer.TechnicalIssues – Customer canceled their transaction due to an actual or perceived issue within your app.
  • Customer.PriceIncrease – Customer did not agree to a recent price increase. See also priceConsentStatus.
  • Customer.Cost – Customer canceled for cost-related reasons.
  • Customer.FoundBetterApp – Customer claimed to have found a better app.
  • Customer.NotUsefulEnough – Customer did not feel he is using this service enough.
  • Customer.OtherReason – Subscription canceled for another reason; for example, if the customer made the purchase accidentally.
  • Unknown – Subscription canceled for unknown reasons.
isPending boolean True when the transaction is still pending payment.
isAcknowledged boolean True when the transaction has been acknowledged to the platform.
isConsumed boolean True when the transaction was consumed.
isBillingRetryPeriod boolean Whether an auto-renewable subscription is in the billing retry period.

  • true – The platform is attempting to renew the subscription.
  • false – The platform has stopped attempting to renew the subscription.

This field indicates whether the platform is attempting to renew an expired subscription automatically. If the customer’s subscription failed to renew because the platform was unable to complete the transaction, this value reflects whether the platform is still trying to renew the subscription. You can use this field to:

  • Inform the user that there may be an issue with their billing information. For example, an expired credit card or insufficient balance could prevent this customer’s account from being billed.
  • Implement a grace period to improve recovery, if the value is true and the isExpired field is set. A grace period is free or limited subscription access while a subscriber is in a billing retry state.
isTrialPeriod boolean True when this is a transaction for the trial period.
Note that a trial period is a *free* introductory period.
isIntroPeriod boolean True when this is the introductory period.
priceConsentStatus string Price consent status for a subscription price increase. Possible values:

  • Notified – Customer has been notified of the price increase but did not agree to it.
  • Agreed – Customer agreed to the price increase.
discountId string Identifier of a discount applied to this transaction.
quantity number Number of elements purchases (only meaningful for consumables).
amountUSD number Amount in USD for this transaction, when known.
amountMicros number Amount in micro units (1/1000000) for this transaction, in provided currency, when known.
currency string Currency used to make this transaction. 3 letters code. Example: EUR, USD, …

Paging

Information about request pagination.

Property name Type Description
skip number Number of rows that have been skipped in the output.
limit number Maximal number of rows returned in the output.
total number Total number of rows in the database.

Notes

  • All dates are in the ISO 8601 date-time format.