Download OpenAPI specification:Download
RevenueCat API v1 endpoint reference for Transactions.
Part of the REST API v1 Reference.
Operations about transactions.
POST /receiptsPOST /subscribers/{app_user_id}/subscriptions/{product_identifier}/revokePOST /subscribers/{app_user_id}/subscriptions/{product_identifier}/deferPOST /subscribers/{app_user_id}/transactions/{store_transaction_identifier}/refundPOST /subscribers/{app_user_id}/subscriptions/{store_transaction_identifier}/cancelPOST /subscribers/{app_user_id}/subscriptions/{store_transaction_identifier}/extendRecords a purchase for a Customer from iOS, Android, Stripe, Roku and Paddle will create a Customer if they don't already exist.
| X-Platform required | string Example: ios The platform this purchase is for. Either |
| app_user_id required | string App User ID of the Customer the receipt is associated with. | ||||||||
| fetch_token required | string For iOS, the base64 encoded receipt file (or JWSTransaction for StoreKit2), for Android the receipt token, for Amazon the receipt, for Stripe the subscription ID or the Stripe Checkout Session ID, for Roku the transaction ID, and for Paddle the subscription ID or transaction ID. | ||||||||
| product_id | string The Apple, Google, Amazon, Roku, or Paddle product identifier or SKU. Required for Google. | ||||||||
| price | number <float> The price of the product. Required if you provide a currency. | ||||||||
| currency | string Default: "USD" The currency of the product. The currency must be in ISO 4217 format. Required if you provide a price. | ||||||||
| payment_mode | string Optionally used by the iOS SDK to communicate intro pricing periods. Either | ||||||||
| introductory_price | number <float> Introductory price paid | ||||||||
| is_restore | boolean Deprecated Default: false If true, the fetch token will trigger your configured restore behavior for any other users sharing the same fetch token. | ||||||||
| presented_offering_identifier | string Optional. The offering that was presented to the Customer at the time of purchase. This will be attached to any new transactions in this fetch token and will be available in ETL exports and webhooks. This is mostly useful if you're sending fetch tokens from your backend. | ||||||||
object Any Attributes to set on the Customer as a dictionary keyed by the Attribute name. | |||||||||
| |||||||||
{- "app_user_id": "string",
- "fetch_token": "string",
- "product_id": "com.my.product.iap",
- "price": 1.99,
- "currency": "USD",
- "payment_mode": "string",
- "introductory_price": 0.1,
- "is_restore": false,
- "presented_offering_identifier": "string",
- "attributes": {
- "property1": {
- "value": "string",
- "updated_at_ms": 1709195668093
}, - "property2": {
- "value": "string",
- "updated_at_ms": 1709195668093
}
}
}{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "store_transaction_id": 1000000652379790,
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}Immediately revokes access to a Google Subscription and issues a refund for the last purchase. If you want to refund a one-time Google purchase, see refund a Google purchase.
| app_user_id required | string The App User ID of the Customer. |
| product_identifier required | string The identifier of the product belonging to the subscription that is being revoked. |
{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "store_transaction_id": 1000000652379790,
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}Defers the purchase of a Google Subscription to a later date.
| app_user_id required | string The App User ID of the Customer. |
| product_identifier required | string The identifier of the product belonging to the subscription that is being deferred. This can be found in RevenueCat's Product catalog -> {Product} -> Subscription Id. |
| expiry_time_ms | integer <int64> The desired next expiry time to assign to the subscription, in milliseconds since the Epoch. The given time must be later/greater than the current expiry time for the subscription. Either |
| extend_by_days | integer [ 1 .. 365 ] The number of days to extend the subscription renewal date. Must be between 1 and 365. Either |
{- "expiry_time_ms": 1708417962662,
- "extend_by_days": 30
}{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "store_transaction_id": 1000000652379790,
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}Issues a refund for the specified transaction and revokes access. Works for subscription and non-subscription purchases that occurred in the last 365 days.
| app_user_id required | string The App User ID of the Customer. |
| store_transaction_identifier required | string The identifier of the transaction to refund. Example: GPA.3309-9122-6177-45730 |
{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "store_transaction_id": 1000000652379790,
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}Cancels a Google subscription. The subscription remains valid until its expiration time, but it will not renew.
| app_user_id required | string The App User ID of the Customer. |
| store_transaction_identifier required | string The identifier of the transaction to cancel. Example: GPA.3309-9122-6177-45730 |
{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "store_transaction_id": 1000000652379790,
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}Extends the renewal date of an auto-renewable subscription for up to 90 days for a specific customer.
This uses Apple's Extend a Subscription Renewal Date API.
Requires a v1 Secret API key.
Note: Apple limits subscription extensions to two per year per customer. Apple immediately sends the customer an email notification of the extension.
| app_user_id required | string The App User ID of the Customer. |
| store_transaction_identifier required | string The store transaction identifier of the subscription to extend. Can be original transaction identifier or renewal transaction identifier. Example: 1000000819074923 |
| extend_by_days required | integer [ 1 .. 90 ] The number of days to extend the subscription renewal date. Must be between 1 and 90. |
| extend_reason_code required | integer [ 0 .. 3 ] The reason code for the subscription extension. See Apple's extendReasonCode documentation.
|
{- "extend_by_days": 30,
- "extend_reason_code": 1
}{- "value": {
- "request_date": "2019-07-26T17:40:10Z",
- "request_date_ms": 1564162810884,
- "subscriber": {
- "entitlements": {
- "pro_cat": {
- "expires_date": null,
- "grace_period_expires_date": null,
- "product_identifier": "onetime",
- "purchase_date": "2019-04-05T21:52:45Z"
}
}, - "first_seen": "2019-02-21T00:08:41Z",
- "non_subscriptions": {
- "onetime": [
- {
- "id": "cadba0c81b",
- "is_sandbox": true,
- "purchase_date": "2019-04-05T21:52:45Z",
- "store": "app_store"
}
]
}, - "original_app_user_id": "XXX-XXXXX-XXXXX-XX",
- "original_application_version": "1.0",
- "original_purchase_date": "2019-01-30T23:54:10Z",
- "other_purchases": { },
- "subscriptions": {
- "annual": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-14T21:07:40Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-07-14T20:07:40Z",
- "refunded_at": null,
- "store": "play_store",
- "store_transaction_id": "GPA.6801-7988-0152-76034..5",
- "unsubscribe_detected_at": "2019-07-17T22:48:38Z"
}, - "onemonth": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-06-17T22:47:55Z",
- "grace_period_expires_date": null,
- "is_sandbox": true,
- "original_purchase_date": "2019-02-21T00:42:05Z",
- "ownership_type": "PURCHASED",
- "period_type": "normal",
- "purchase_date": "2019-06-17T22:42:55Z",
- "refunded_at": null,
- "store": "app_store",
- "store_transaction_id": 1000000652379790,
- "unsubscribe_detected_at": "2019-06-17T22:48:38Z"
}, - "rc_promo_pro_cat_monthly": {
- "auto_resume_date": null,
- "billing_issues_detected_at": null,
- "expires_date": "2019-08-26T01:02:16Z",
- "grace_period_expires_date": null,
- "is_sandbox": false,
- "original_purchase_date": "2019-07-26T01:02:16Z",
- "ownership_type": "FAMILY_SHARED",
- "period_type": "normal",
- "purchase_date": "2019-07-26T01:02:16Z",
- "refunded_at": null,
- "store": "promotional",
- "store_transaction_id": "a42db3af39530cb82b17eaf9c6576393",
- "unsubscribe_detected_at": null
}
}
}
}
}All API v1 resources, one page each. General concepts (authentication, request format, URL parameters) live on the API v1 overview.