Developer API (2.0.0)
Download OpenAPI specification:Download
RevenueCat provides a REST API for developers to perform customer and transaction related actions from their own server.
Most of this API is geared toward client usage via RevenueCat’s SDK, but there are various endpoints that can be used for refunding purchases, granting promotional entitlements, and other sensitive actions that can only be done via a Secret API key from your server.
If you’re adding subscriptions or other in-app purchases to your app for the first time or if you don’t have a backend that stores your user’s receipts, you’re probably looking to implement the RevenueCat SDK.
If you want to start migrating your existing users to RevenueCat and you have your user’s receipts stored on your own server, or you want to check subscription status of your users from your own server, the REST API is a great solution.
Authentication for the RevenueCat REST API is achieved by setting the Authorization
header with a valid API key. You'll find two types of API keys in your RevenueCat dashboard: public and secret.
Certain endpoints require secret keys, which should be kept out of any publicly accessible areas such as GitHub, client-side code, and so forth. See our Authentication guide for more information.
Authorization: Bearer YOUR_REVENUECAT_API_KEY
You can create a new secret API key in your project settings page > API keys. Select + New.
Give it a name, select V2
as the version, and set your permissions. Be sure to select Generate at the top right corner.
Each endpoint in this documentation will contain a description informing you which permissions are required.
The body of the POST
requests should be encoded in JSON and have the 'Content-Type' header set to 'application/json'.
Content-Type: application/json
{
"app_user_id": "user-1456",
"fetch_token": "MQABC...EFH1234="
}
Top-level API resources have support for bulk fetches via "list" API methods. For instance, you can list products, list entitlements, and list offerings. These list API methods share a common structure, taking at least these two parameters: limit
and starting_after
.
When a response or a field contains multiple entities of the same type, it returns a list
object of the following structure:
{
"object": "list",
"items": [{}],
"next_page": "LIST_BASE_URL?starting_after=LAST_ID",
"url": "LIST_BASE_URL"
}
Where…
url
is the full path base URL of the list endpoint (i.e., if you make a request to this endpoint, you will get the first page), e.g./v2/projects/{project_id}/products
next_page
is the URL for the next page, if there is one. If there is no next page, thenext_page
field will not be present. Example:/v2/projects/{project_id}/products?starting_after={last_id}
items
is an array of the entries of the list.
The starting_after
query parameter of list endpoints accepts the ID of the first list item that will not be part of the list (in other words, the ID of the last item of the previous page).
At the moment we only support forward pagination.
limit
optional, default is 20
A limit on the number of objects to be returned.
starting_after
optional
A cursor for use in pagination. starting_after
is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with foo, your subsequent call can include starting_after=foo
in order to fetch the next page of the list.
We will return the following headers on all successful requests:
RevenueCat-Rate-Limit-Current-Usage
: the number of executed requests for the current rate limiting period, including the current request. The rate limiting period is one minute.RevenueCat-Rate-Limit-Current-Limit
: the limit in requests per minute for this endpoint
If you reach the rate limit, as indicated by a 429 error code, we will also include the following header:
Retry-After
: the number of seconds to wait until you can retry this request.
Below is an example of the response body that will be sent when the rate limit is reached. The value of the backoff_ms
field corresponds to the `Retry-After`` header but specified in milliseconds.
{
"type": "rate_limit_error",
"message": "Rate limit exceeded",
"retryable": true,
"doc_url": "https://errors.rev.cat/rate-limit-error",
"backoff_ms": 1000
}
Expandables allow you to retrieve related data along with the request without making additional requests. Fields in the REST API will allow you to request additional information as an expanded response by using the expand
query parameter.
For example, a product
object will have an associated app_id
field. This app_id
field can be expanded in the same request with the expand
query parameter and will include an app
object in the response.
Without expand
query param
{
"object": "product",
"id": "prod1a2b3c4d5e",
"store_identifier": "rc_1w_199",
"type": "subscription",
"subscription": {
"duration": "P1M",
"grace_period_duration": "P3D",
"trial_duration": "P1W"
},
"created_at": 1658399423658,
"app_id": "app1a2b3c4"
}
With expand
query param:
{
"object": "product",
"id": "prod1a2b3c4d5e",
"store_identifier": "rc_1w_199",
"type": "subscription",
"subscription": {
"duration": "P1M",
"grace_period_duration": "P3D",
"trial_duration": "P1W"
},
"created_at": 1658399423658,
"app_id": "app1a2b3c4",
"app": {
"id": "app1a2b3c4",
"name": "string",
"created_at": 1658399423658,
"type": "amazon",
"project_id": "proj1a2b3c4"
}
}
As you can see from above, the app_id
field remains the same, but the response contains an additional app
object.
Fields that can be expanded into objects are indicated in the endpoint documentation under Query Params and will list accepted values. Also, the required permissions to be defined in the API key are listed there.
RevenueCat uses standard HTTP status codes to indicate the success or failure of an API request. Codes in the 2XX
range indicate the request was successful. 4XX
codes indicate an error caused by the client. 5XX
codes indicate an error in RevenueCat servers.
Successful modifications return the modified entity. Errors return the following fields:
{
"type": "parameter_error",
"param": "customer_id",
"message": "id is too long",
"retryable": false,
"doc_url": "https://errors.rev.cat/parameter-error"
}
For more information on the type
field and how to resolve these errors, please visit our Error Types documentation.
Code | Name | Description |
---|---|---|
200 | OK | Processed as expected |
201 | Created | Entity was created |
202 | Accepted | Request acknowledged, but cannot be processed in real time (for instance, async job) |
204 | No content | The request was successful and there was no content that could be returned |
400 | Bad Request | Client error |
401 | Unauthorized | Not authenticated |
403 | Forbidden | Authorization failed |
404 | Not Found | No resource was found |
409 | Conflict | Uniqueness constraint violation |
418 | I'm a teapot | RevenueCat refuses to brew coffee |
422 | Unprocessable entity | The request was valid and the syntax correct, but we were unable to process the contained instructions. |
423 | Locked | The request conflicted with another ongoing request |
429 | Too Many Requests | Being rate limited |
500 | Internal Server Error | The RevenueCat server ran into an unexpected problem – please check the RevenueCat status page for any known outages and/or report the issue to RevenueCat support |
502 | Bad Gateway | Invalid response from an upstream server |
503 | Service Unavailable | There wasn’t a server to handle the request |
504 | Gateway Timeout | We could not get the response in time from the upstream server |
authentication_error
Authentication is not valid for the given API key. Double check your API key.
authorization_error
The API key does not belong the project you specified. Double check that your API key is associated with the IDs you are passing.
invalid_request
This error can be due to several reasons:
Content-Type: application/json
is missing in the request header forPOST
/PUT
/PATCH
requests- Using the incorrect HTTP method on a path (i.e:
GET …/entitlements/<entitlements_id>/actions/attach_products
)
parameter_error
The parameter provided is invalid. Please refer to the message
field for more information.
- IDs (e.g:
entitlement_id
,project_id
, etc): 1 to 255 characters display_name
(applies to Entitlements): 1 to 1000 characterslookup_key
(applies to Entitlements): 1 to 200 characters
rate_limit_error
The request has hit the rate limit for this endpoint. Refer to the backoff_ms
field to determine how many milliseconds to wait before making another request to the same endpoint.
resource_missing
The resource with the specific ID does not exist. Double check the IDs (e.g: product ID, entitlement ID, etc) you are passing into the endpoints.
resource_already_exists
The resource with the specific ID already exists. Use a different, unique value for ID and try again.
resource_locked_error
The resource is currently being modified by a concurrent request. Refer to the backoff_ms
field to determine when to try again.
server_error
Request is not able to be processed due to an internal server error. Refer to the backoff_ms
field to determine when to try again. Please report this to the RevenueCat team if you are encountering this issue.
store_error
There was a problem with the stores (e.g: Apple App Store, Google Play Store, etc). This typically occurs when the stores are unable to process the request. Refer to the backoff_ms
field to determine when to try again.
unprocessable_entity_error
Request is not able to be processed. Please refer to the message
field for more information.
Get a list of apps
This endpoint requires the following permission(s): project_configuration:apps:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
query Parameters
starting_after | string Example: starting_after=ent12354 |
limit | integer Default: 20 Example: limit=10 |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "list",
- "items": [
- {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}
], - "next_page": "/v2/projects/projec1a2b3c4d/apps?starting_after=app1a2b3c4d",
- "url": "/v2/projects/projec1a2b3c4d/apps"
}
Create an App
This endpoint requires the following permission(s): project_configuration:apps:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
Request Body schema: application/jsonrequired
name required | string [ 1 .. 255 ] characters The name of the app | ||||||||||
type required | string Enum: "amazon" "app_store" "mac_app_store" "play_store" "stripe" The platform of the app. Mac App Store is disabled by default. See Legacy Mac Apps for more details. | ||||||||||
object Amazon type details. Should only be used when type is amazon. | |||||||||||
| |||||||||||
object App Store type details. Should only be used when type is app_store. | |||||||||||
| |||||||||||
object Mac App Store type details. Should only be used when type is mac_app_store. | |||||||||||
| |||||||||||
object Play Store type details. Should only be used when type is play_store. | |||||||||||
| |||||||||||
object Stripe type details. Should only be used when type is stripe. | |||||||||||
|
Responses
Request samples
- Payload
{- "name": "My App Store App",
- "type": "app_store",
- "app_store": {
- "bundle_id": "com.apple.Pages",
- "shared_secret": "1234567890abcdef1234567890abcdef",
- "subscription_private_key": "-----BEGIN EC PRIVATE KEY-----\nMHQCAQEEIGAkwOF0qkGO19yJlIzQVcOg+HBfvLL4KDXDtL+MMHk2oAcGBSuBBAAK\noUQDQgAEhDP7RaX4c6qOHkE1nIWMr5C90ybtr87VRGFm4VsfWqG47NPN+/dHcfwJ\nJPZGFgMcgvBc37AxQPPQjyXYjhhQDg==\n-----END EC PRIVATE KEY-----",
- "subscription_key_id": "6345942CC3",
- "subscription_key_issuer": "5a049d62-1b9b-453c-b605-1988189d8129"
}
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}
Get an app
This endpoint requires the following permission(s): project_configuration:apps:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
app_id required | string <= 255 characters Example: app1ab2c3d4 ID of the app |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}
Update an app
This endpoint requires the following permission(s): project_configuration:apps:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
app_id required | string <= 255 characters Example: app1ab2c3d4 ID of the app |
Request Body schema: application/jsonrequired
name | string [ 1 .. 255 ] characters The name of the app | ||||
object Amazon type details. Should only be used when type is amazon. | |||||
| |||||
object App Store type details. Should only be used when type is app_store. | |||||
| |||||
object Legacy Mac App Store type details. Should only be used when type is mac_app_store. | |||||
| |||||
object Play Store type details. Should only be used when type is play_store. | |||||
| |||||
object Stripe type details. Should only be used when type is stripe. | |||||
|
Responses
Request samples
- Payload
{- "name": "New App name",
- "app_store": {
- "bundle_id": "com.my.new-app",
- "shared_secret": "1234567890abcdef1234567890abcdef"
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}
Delete an app
This endpoint requires the following permission(s): project_configuration:apps:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
app_id required | string <= 255 characters Example: app1ab2c3d4 ID of the app |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "app",
- "id": "string",
- "deleted_at": 1658399423658
}
Get overview metrics for a project
This endpoint requires the following permission(s): charts_metrics:overview:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "overview_metrics",
- "metrics": [
- {
- "object": "overview_metric",
- "id": "active_trials",
- "name": "Active Trials",
- "description": "string",
- "unit": "$",
- "period": "P0D",
- "value": 34765,
- "last_updated_at": 1658399423658,
- "last_updated_at_iso8601": "2022-10-13 09:45:00.123000+00:00"
}
]
}
Get a list of customers
This endpoint requires the following permission(s): customer_information:customers:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
query Parameters
starting_after | string Example: starting_after=ent12354 |
limit | integer Default: 20 Example: limit=10 |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "list",
- "items": [
- {
- "object": "customer",
- "id": "19b8de26-77c1-49f1-aa18-019a391603e2",
- "project_id": "proj1ab2c3d4",
- "first_seen_at": 1658399423658,
- "last_seen_at": 1658399423658,
- "active_entitlements": {
- "object": "list",
- "items": [
- {
- "object": "customer.active_entitlement",
- "entitlement_id": "entla1b2c3d4e5",
- "expires_at": 1658399423658
}
], - "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/active_entitlements?starting_after=entlab21dac",
- "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/active_entitlements"
}, - "experiment": {
- "object": "experiment_enrollment",
- "id": "string",
- "variant": "a"
}
}
], - "next_page": "/v2/projects/projec1a2b3c4d/customers?starting_after=223xx1100",
- "url": "/v2/projects/projec1a2b3c4d/customers"
}
Create a customer
This endpoint requires the following permission(s): customer_information:customers:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
Request Body schema: application/jsonrequired
id required | string [ 1 .. 1500 ] characters ^[0-9a-zA-Z_-]*$ The ID of the customer | ||||
Array of objects <= 50 characters | |||||
Array
|
Responses
Request samples
- Payload
{- "id": "19b8de26-77c1-49f1-aa18-019a391603e2",
- "attributes": [
- {
- "name": "$email",
- "value": "cat@revenuecat.com"
}
]
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "customer",
- "id": "19b8de26-77c1-49f1-aa18-019a391603e2",
- "project_id": "proj1ab2c3d4",
- "first_seen_at": 1658399423658,
- "last_seen_at": 1658399423658,
- "active_entitlements": {
- "object": "list",
- "items": [
- {
- "object": "customer.active_entitlement",
- "entitlement_id": "entla1b2c3d4e5",
- "expires_at": 1658399423658
}
], - "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/active_entitlements?starting_after=entlab21dac",
- "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/active_entitlements"
}, - "experiment": {
- "object": "experiment_enrollment",
- "id": "string",
- "variant": "a"
}
}
Get a customer
This endpoint requires the following permission(s): customer_information:customers:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
customer_id required | string [ 1 .. 1500 ] characters Example: 19b8de26-77c1-49f1-aa18-019a391603e2 ID of the customer |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "customer",
- "id": "19b8de26-77c1-49f1-aa18-019a391603e2",
- "project_id": "proj1ab2c3d4",
- "first_seen_at": 1658399423658,
- "last_seen_at": 1658399423658,
- "active_entitlements": {
- "object": "list",
- "items": [
- {
- "object": "customer.active_entitlement",
- "entitlement_id": "entla1b2c3d4e5",
- "expires_at": 1658399423658
}
], - "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/active_entitlements?starting_after=entlab21dac",
- "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/active_entitlements"
}, - "experiment": {
- "object": "experiment_enrollment",
- "id": "string",
- "variant": "a"
}
}
Delete a customer
This endpoint requires the following permission(s): customer_information:customers:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
customer_id required | string [ 1 .. 1500 ] characters Example: 19b8de26-77c1-49f1-aa18-019a391603e2 ID of the customer |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "customer",
- "id": "b5b7bfd2-66fb-4091-af50-7c3cdccfdf24",
- "deleted_at": 1658399423658
}
Get a list of subscriptions associated with a customer
This endpoint requires the following permission(s): customer_information:subscriptions:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
customer_id required | string [ 1 .. 1500 ] characters Example: 19b8de26-77c1-49f1-aa18-019a391603e2 ID of the customer |
query Parameters
environment | string Enum: "sandbox" "production" Example: environment=production |
starting_after | string Example: starting_after=ent12354 |
limit | integer Default: 20 Example: limit=10 |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "list",
- "items": [
- {
- "object": "subscription",
- "id": "sub1ab2c3d4e5",
- "customer_id": "19b8de26-77c1-49f1-aa18-019a391603e2",
- "original_customer_id": "19b8de26-77c1-49f1-aa18-019a391603e2",
- "product_id": "prod1a2b3c4d5e",
- "starts_at": 1658399423658,
- "current_period_starts_at": 1658399423658,
- "current_period_ends_at": 1658399423658,
- "gives_access": true,
- "pending_payment": true,
- "auto_renewal_status": "will_renew",
- "status": "trialing",
- "total_revenue_in_usd": {
- "currency": "USD",
- "gross": 9.99,
- "commission": 2.99,
- "tax": 0.75,
- "proceeds": 6.25
}, - "presented_offering_id": "ofrnge1a2b3c4d5",
- "entitlements": {
- "object": "list",
- "items": [
- {
- "object": "entitlement",
- "project_id": "proj1ab2c3d4",
- "id": "entla1b2c3d4e5",
- "lookup_key": "premium",
- "display_name": "Premium",
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": null,
- "grace_period_duration": null,
- "trial_duration": null
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": null,
- "id": null,
- "name": null,
- "created_at": null,
- "type": null,
- "project_id": null,
- "amazon": { },
- "app_store": { },
- "mac_app_store": { },
- "play_store": { },
- "stripe": { }
}, - "display_name": "Premium Monthly 2023"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products?starting_after=prodeab21dac",
- "url": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products"
}
}
], - "next_page": "/v2/projects/proj1ab2c3d4/subscriptions/sub1a2b3c4d5e/entitlements?status=active&starting_after=entlab21dac",
- "url": "/v2/projects/proj1ab2c3d4/subscriptions/sub1a2b3c4d5e/entitlements"
}, - "environment": "production",
- "store": "amazon",
- "store_subscription_identifier": 12345678,
- "ownership": "purchased",
- "pending_changes": {
- "product": {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}
}, - "country": "US",
}
], - "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/subscriptions?starting_after=sub1a2b3c4d",
- "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/subscriptions"
}
Get a list of purchases associated with a customer
This endpoint requires the following permission(s): customer_information:purchases:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
customer_id required | string [ 1 .. 1500 ] characters Example: 19b8de26-77c1-49f1-aa18-019a391603e2 ID of the customer |
query Parameters
environment | string Enum: "sandbox" "production" Example: environment=production |
starting_after | string Example: starting_after=ent12354 |
limit | integer Default: 20 Example: limit=10 |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "list",
- "items": [
- {
- "object": "purchase",
- "id": "purch1a2b3c4d5e",
- "customer_id": "19b8de26-77c1-49f1-aa18-019a391603e2",
- "original_customer_id": "19b8de26-77c1-49f1-aa18-019a391603e2",
- "product_id": "prod1a2b3c4d5e",
- "purchased_at": 1658399423658,
- "revenue_in_usd": {
- "currency": "USD",
- "gross": 9.99,
- "commission": 2.99,
- "tax": 0.75,
- "proceeds": 6.25
}, - "quantity": 1,
- "status": "owned",
- "presented_offering_id": "ofrnge1a2b3c4d5",
- "entitlements": {
- "object": "list",
- "items": [
- {
- "object": "entitlement",
- "project_id": "proj1ab2c3d4",
- "id": "entla1b2c3d4e5",
- "lookup_key": "premium",
- "display_name": "Premium",
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": null,
- "grace_period_duration": null,
- "trial_duration": null
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": null,
- "id": null,
- "name": null,
- "created_at": null,
- "type": null,
- "project_id": null,
- "amazon": { },
- "app_store": { },
- "mac_app_store": { },
- "play_store": { },
- "stripe": { }
}, - "display_name": "Premium Monthly 2023"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products?starting_after=prodeab21dac",
- "url": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products"
}
}
], - "next_page": "/v2/projects/proj1ab2c3d4/purchases/sub1a2b3c4d5e/entitlements?status=active&starting_after=entlab21dac",
- "url": "/v2/projects/proj1ab2c3d4/purchases/sub1a2b3c4d5e/entitlements"
}, - "environment": "production",
- "store": "amazon",
- "store_purchase_identifier": 12345678,
- "ownership": "purchased",
- "country": "US"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/purchases?starting_after=purc1a2b3c4d5e",
- "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/purchases"
}
Get a list of customer's active entitlements
This endpoint requires the following permission(s): customer_information:customers:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
customer_id required | string [ 1 .. 1500 ] characters Example: 19b8de26-77c1-49f1-aa18-019a391603e2 ID of the customer |
query Parameters
starting_after | string Example: starting_after=ent12354 |
limit | integer Default: 20 Example: limit=10 |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "list",
- "items": [
- {
- "object": "customer.active_entitlement",
- "entitlement_id": "entla1b2c3d4e5",
- "expires_at": 1658399423658
}
], - "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/active_entitlements?starting_after=entlab21dac",
- "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/active_entitlements"
}
Get a list of the customer's aliases
This endpoint requires the following permission(s): customer_information:customers:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
customer_id required | string [ 1 .. 1500 ] characters Example: 19b8de26-77c1-49f1-aa18-019a391603e2 ID of the customer |
query Parameters
starting_after | string Example: starting_after=ent12354 |
limit | integer Default: 20 Example: limit=10 |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "list",
- "items": [
- {
- "object": "customer.alias",
- "id": "19b8de26-77c1-49f1-aa18-019a391603e2",
- "created_at": 1658399423658
}
], - "next_page": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/aliases?starting_after=9fjeja8fjed",
- "url": "/v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/aliases"
}
Get an entitlement
This endpoint requires the following permission(s): project_configuration:entitlements:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
entitlement_id required | string [ 1 .. 255 ] characters Example: entla1b2c3d4e5 ID of the entitlement |
query Parameters
expand | Array of strings[ items [ 1 .. 5000 ] characters ] Items Value: "product" Example: expand=product Specifies which fields in the response should be expanded.
Accepted values are: |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "entitlement",
- "project_id": "proj1ab2c3d4",
- "id": "entla1b2c3d4e5",
- "lookup_key": "premium",
- "display_name": "Premium",
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products?starting_after=prodeab21dac",
- "url": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products"
}
}
Update an entitlement
This endpoint requires the following permission(s): project_configuration:entitlements:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
entitlement_id required | string [ 1 .. 255 ] characters Example: entla1b2c3d4e5 ID of the entitlement |
Request Body schema: application/jsonrequired
display_name required | string [ 1 .. 1500 ] characters The display name of the entitlement |
Responses
Request samples
- Payload
{- "display_name": "Premium"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "entitlement",
- "project_id": "proj1ab2c3d4",
- "id": "entla1b2c3d4e5",
- "lookup_key": "premium",
- "display_name": "Premium",
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products?starting_after=prodeab21dac",
- "url": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products"
}
}
Delete an entitlement
This endpoint requires the following permission(s): project_configuration:entitlements:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
entitlement_id required | string [ 1 .. 255 ] characters Example: entla1b2c3d4e5 ID of the entitlement |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "app",
- "id": "string",
- "deleted_at": 1658399423658
}
Get a list of entitlements
This endpoint requires the following permission(s): project_configuration:entitlements:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
query Parameters
starting_after | string Example: starting_after=ent12354 |
limit | integer Default: 20 Example: limit=10 |
expand | Array of strings[ items [ 1 .. 5000 ] characters ] Items Value: "items.product" Example: expand=items.product Specifies which fields in the response should be expanded.
Accepted values are: |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "list",
- "items": [
- {
- "object": "entitlement",
- "project_id": "proj1ab2c3d4",
- "id": "entla1b2c3d4e5",
- "lookup_key": "premium",
- "display_name": "Premium",
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products?starting_after=prodeab21dac",
- "url": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products"
}
}
], - "next_page": "/v2/projects/proj1ab2c3d4/entitlements?starting_after=entlab21dac",
- "url": "/v2/projects/proj1ab2c3d4/entitlements"
}
Create an entitlement
This endpoint requires the following permission(s): project_configuration:entitlements:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
Request Body schema: application/jsonrequired
lookup_key required | string [ 1 .. 200 ] characters The identifier of the entitlement |
display_name required | string [ 1 .. 1500 ] characters The display name of the entitlement |
Responses
Request samples
- Payload
{- "lookup_key": "premium",
- "display_name": "Premium access to all features"
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "entitlement",
- "project_id": "proj1ab2c3d4",
- "id": "entla1b2c3d4e5",
- "lookup_key": "premium",
- "display_name": "Premium",
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products?starting_after=prodeab21dac",
- "url": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products"
}
}
Get a list of products attached to a given entitlement
This endpoint requires the following permission(s): project_configuration:entitlements:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
entitlement_id required | string [ 1 .. 255 ] characters Example: entla1b2c3d4e5 ID of the entitlement |
query Parameters
starting_after | string Example: starting_after=ent12354 |
limit | integer Default: 20 Example: limit=10 |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "list",
- "items": [
- {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/entitlements/entla1b2c3d4e5/products?starting_after=prod1a2b3c4d5",
- "url": "/v2/projects/proj1ab2c3d4/entitlements/entla1b2c3d4e5/products"
}
Attach a set of products to an entitlement
This endpoint requires the following permission(s): project_configuration:entitlements:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
entitlement_id required | string [ 1 .. 255 ] characters Example: entla1b2c3d4e5 ID of the entitlement |
Request Body schema: application/jsonrequired
product_ids required | Array of strings [ 1 .. 50 ] characters [ items [ 1 .. 255 ] characters ] IDs of the products to be attached to the entitlement. |
Responses
Request samples
- Payload
{- "product_ids": [
- "prod1a2b3c4d5e"
]
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "entitlement",
- "project_id": "proj1ab2c3d4",
- "id": "entla1b2c3d4e5",
- "lookup_key": "premium",
- "display_name": "Premium",
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products?starting_after=prodeab21dac",
- "url": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products"
}
}
Detach a set of product from an entitlement
This endpoint requires the following permission(s): project_configuration:entitlements:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
entitlement_id required | string [ 1 .. 255 ] characters Example: entla1b2c3d4e5 ID of the entitlement |
Request Body schema: application/jsonrequired
product_ids required | Array of strings [ 1 .. 50 ] characters [ items [ 1 .. 255 ] characters ] IDs of the products to be detached from the entitlement. |
Responses
Request samples
- Payload
{- "product_ids": [
- "prod1a2b3c4d5e"
]
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "entitlement",
- "project_id": "proj1ab2c3d4",
- "id": "entla1b2c3d4e5",
- "lookup_key": "premium",
- "display_name": "Premium",
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products?starting_after=prodeab21dac",
- "url": "/v2/projects/proj1ab2c3d4/entitlements/entle1a2b3c4d5/products"
}
}
Get an offering
This endpoint requires the following permission(s): project_configuration:offerings:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
offering_id required | string [ 1 .. 255 ] characters Example: ofrnge1a2b3c4d5 ID of the offering |
query Parameters
expand | Array of strings[ items [ 1 .. 5000 ] characters ] Items Enum: "package" "package.product" Example: expand=package Specifies which fields in the response should be expanded.
Accepted values are: |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "offering",
- "id": "ofrnge1a2b3c4d5",
- "lookup_key": "default",
- "display_name": "The standard set of packages",
- "is_current": true,
- "created_at": 1658399423658,
- "project_id": "proj1ab2c3d4",
- "metadata": {
- "color": "blue",
- "call_to_action": "Subscribe Now!"
}, - "packages": {
- "object": "list",
- "items": [
- {
- "object": "package",
- "id": "pkge1a2b3c4d5",
- "lookup_key": "monthly",
- "display_name": "Monthly discounted with 3-day trial",
- "position": 1,
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "product": {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": null
}, - "app_store": {
- "bundle_id": null
}, - "mac_app_store": {
- "bundle_id": null
}, - "play_store": {
- "package_name": null
}, - "stripe": {
- "stripe_account_id": null
}
}, - "display_name": "Premium Monthly 2023"
}, - "eligibility_criteria": "all"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products"
}
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages?starting_after=pkgeab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages"
}
}
Update an offering
This endpoint requires the following permission(s): project_configuration:offerings:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
offering_id required | string [ 1 .. 255 ] characters Example: ofrnge1a2b3c4d5 ID of the offering |
Request Body schema: application/jsonrequired
display_name | string [ 1 .. 1500 ] characters The display name of the offering | ||
is_current | boolean Indicates if the offering is the current offering | ||
object or null (OfferingMetadata) Custom metadata of the offering | |||
|
Responses
Request samples
- Payload
{- "display_name": "premium access to features",
- "is_current": true,
- "metadata": {
- "color": "blue",
- "call_to_action": "Subscribe Now!"
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "offering",
- "id": "ofrnge1a2b3c4d5",
- "lookup_key": "default",
- "display_name": "The standard set of packages",
- "is_current": true,
- "created_at": 1658399423658,
- "project_id": "proj1ab2c3d4",
- "metadata": {
- "color": "blue",
- "call_to_action": "Subscribe Now!"
}, - "packages": {
- "object": "list",
- "items": [
- {
- "object": "package",
- "id": "pkge1a2b3c4d5",
- "lookup_key": "monthly",
- "display_name": "Monthly discounted with 3-day trial",
- "position": 1,
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "product": {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": null
}, - "app_store": {
- "bundle_id": null
}, - "mac_app_store": {
- "bundle_id": null
}, - "play_store": {
- "package_name": null
}, - "stripe": {
- "stripe_account_id": null
}
}, - "display_name": "Premium Monthly 2023"
}, - "eligibility_criteria": "all"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products"
}
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages?starting_after=pkgeab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages"
}
}
Delete an offering and its attached packages
This endpoint requires the following permission(s): project_configuration:offerings:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
offering_id required | string [ 1 .. 255 ] characters Example: ofrnge1a2b3c4d5 ID of the offering |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "app",
- "id": "string",
- "deleted_at": 1658399423658
}
Get a list of offerings
This endpoint requires the following permission(s): project_configuration:offerings:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
query Parameters
starting_after | string Example: starting_after=ent12354 |
limit | integer Default: 20 Example: limit=10 |
expand | Array of strings[ items [ 1 .. 5000 ] characters ] Items Enum: "items.package" "items.package.product" Example: expand=items.package Specifies which fields in the response should be expanded.
Accepted values are: |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "list",
- "items": [
- {
- "object": "offering",
- "id": "ofrnge1a2b3c4d5",
- "lookup_key": "default",
- "display_name": "The standard set of packages",
- "is_current": true,
- "created_at": 1658399423658,
- "project_id": "proj1ab2c3d4",
- "metadata": {
- "color": "blue",
- "call_to_action": "Subscribe Now!"
}, - "packages": {
- "object": "list",
- "items": [
- {
- "object": "package",
- "id": "pkge1a2b3c4d5",
- "lookup_key": "monthly",
- "display_name": "Monthly discounted with 3-day trial",
- "position": 1,
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "product": {
- "object": null,
- "id": null,
- "store_identifier": null,
- "type": null,
- "subscription": null,
- "created_at": null,
- "app_id": null,
- "app": null,
- "display_name": null
}, - "eligibility_criteria": "all"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products"
}
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages?starting_after=pkgeab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages"
}
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings?starting_after=ofrngeab21da",
- "url": "/v2/projects/proj1ab2c3d4/offerings"
}
Create an offering
This endpoint requires the following permission(s): project_configuration:offerings:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
Request Body schema: application/jsonrequired
lookup_key required | string [ 1 .. 200 ] characters The custom identifier of the offering | ||
display_name required | string [ 1 .. 1500 ] characters The display_name of the offering | ||
object or null (OfferingMetadata) Custom metadata of the offering | |||
|
Responses
Request samples
- Payload
{- "lookup_key": "default",
- "display_name": "The standard set of packages",
- "metadata": {
- "color": "blue",
- "call_to_action": "Subscribe Now!"
}
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "offering",
- "id": "ofrnge1a2b3c4d5",
- "lookup_key": "default",
- "display_name": "The standard set of packages",
- "is_current": true,
- "created_at": 1658399423658,
- "project_id": "proj1ab2c3d4",
- "metadata": {
- "color": "blue",
- "call_to_action": "Subscribe Now!"
}, - "packages": {
- "object": "list",
- "items": [
- {
- "object": "package",
- "id": "pkge1a2b3c4d5",
- "lookup_key": "monthly",
- "display_name": "Monthly discounted with 3-day trial",
- "position": 1,
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "product": {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": null
}, - "app_store": {
- "bundle_id": null
}, - "mac_app_store": {
- "bundle_id": null
}, - "play_store": {
- "package_name": null
}, - "stripe": {
- "stripe_account_id": null
}
}, - "display_name": "Premium Monthly 2023"
}, - "eligibility_criteria": "all"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products"
}
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages?starting_after=pkgeab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages"
}
}
Get a package
This endpoint requires the following permission(s): project_configuration:packages:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
package_id required | string [ 1 .. 255 ] characters Example: pkge1a2b3c4d5 ID of the package |
query Parameters
expand | Array of strings[ items [ 1 .. 5000 ] characters ] Items Value: "product" Example: expand=product Specifies which fields in the response should be expanded.
Accepted values are: |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "package",
- "id": "pkge1a2b3c4d5",
- "lookup_key": "monthly",
- "display_name": "Monthly discounted with 3-day trial",
- "position": 1,
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "product": {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}, - "eligibility_criteria": "all"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products"
}
}
Update a package
This endpoint requires the following permission(s): project_configuration:packages:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
package_id required | string [ 1 .. 255 ] characters Example: pkge1a2b3c4d5 ID of the package |
Request Body schema: application/jsonrequired
display_name | string [ 1 .. 1500 ] characters The display name of the package |
position | integer >= 1 The position of the package within the offering |
Responses
Request samples
- Payload
{- "display_name": "monthly with one-week trial",
- "position": 2
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "package",
- "id": "pkge1a2b3c4d5",
- "lookup_key": "monthly",
- "display_name": "Monthly discounted with 3-day trial",
- "position": 1,
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "product": {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}, - "eligibility_criteria": "all"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products"
}
}
Delete a package
This endpoint requires the following permission(s): project_configuration:packages:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
package_id required | string [ 1 .. 255 ] characters Example: pkge1a2b3c4d5 ID of the package |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "app",
- "id": "string",
- "deleted_at": 1658399423658
}
Get a list of packages in an offering
This endpoint requires the following permission(s): project_configuration:packages:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
offering_id required | string [ 1 .. 255 ] characters Example: ofrnge1a2b3c4d5 ID of the offering |
query Parameters
starting_after | string Example: starting_after=ent12354 |
limit | integer Default: 20 Example: limit=10 |
expand | Array of strings[ items [ 1 .. 5000 ] characters ] Items Value: "items.product" Example: expand=items.product Specifies which fields in the response should be expanded.
Accepted values are: |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "list",
- "items": [
- {
- "object": "package",
- "id": "pkge1a2b3c4d5",
- "lookup_key": "monthly",
- "display_name": "Monthly discounted with 3-day trial",
- "position": 1,
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "product": {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}, - "eligibility_criteria": "all"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products"
}
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages?starting_after=pkgeab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages"
}
Create a package
This endpoint requires the following permission(s): project_configuration:packages:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
offering_id required | string [ 1 .. 255 ] characters Example: ofrnge1a2b3c4d5 ID of the offering |
Request Body schema: application/jsonrequired
lookup_key required | string [ 1 .. 200 ] characters The lookup_key of the package |
display_name required | string [ 1 .. 1500 ] characters The display name of the package |
position | integer The position of the package in the offering |
Responses
Request samples
- Payload
{- "lookup_key": "monthly",
- "display_name": "monthly with one-week trial",
- "position": 1
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "package",
- "id": "pkge1a2b3c4d5",
- "lookup_key": "monthly",
- "display_name": "Monthly discounted with 3-day trial",
- "position": 1,
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "product": {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}, - "eligibility_criteria": "all"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products"
}
}
Get a list of products attached to a given package of an offering
This endpoint requires the following permission(s): project_configuration:packages:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
package_id required | string [ 1 .. 255 ] characters Example: pkge1a2b3c4d5 ID of the package |
query Parameters
starting_after | string Example: starting_after=ent12354 |
limit | integer Default: 20 Example: limit=10 |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "list",
- "items": [
- {
- "product": {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}, - "eligibility_criteria": "all"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/packages/pkge1a2b3c4d5/products?starting_after=prod1a2b3c4d5",
- "url": "/v2/projects/proj1ab2c3d4/packages/pkge1a2b3c4d5/products"
}
Attach a set of products to a package
This endpoint requires the following permission(s): project_configuration:packages:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
package_id required | string [ 1 .. 255 ] characters Example: pkge1a2b3c4d5 ID of the package |
Request Body schema: application/jsonrequired
required | Array of objects (PackageProductIDAssociation) [ 1 .. 50 ] characters Product association list | ||||
Array
|
Responses
Request samples
- Payload
{- "products": [
- {
- "product_id": "prod1a2b3c4d5e",
- "eligibility_criteria": "all"
}
]
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "package",
- "id": "pkge1a2b3c4d5",
- "lookup_key": "monthly",
- "display_name": "Monthly discounted with 3-day trial",
- "position": 1,
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "product": {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}, - "eligibility_criteria": "all"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products"
}
}
Detach a set of products from a package
This endpoint requires the following permission(s): project_configuration:packages:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
package_id required | string [ 1 .. 255 ] characters Example: pkge1a2b3c4d5 ID of the package |
Request Body schema: application/jsonrequired
product_ids required | Array of strings [ 1 .. 50 ] characters [ items [ 1 .. 255 ] characters ] IDs of the products to detach from the package |
Responses
Request samples
- Payload
{- "product_ids": [
- "prod1a2b3c4d5e"
]
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "package",
- "id": "pkge1a2b3c4d5",
- "lookup_key": "monthly",
- "display_name": "Monthly discounted with 3-day trial",
- "position": 1,
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "product": {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}, - "eligibility_criteria": "all"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products?starting_after=prodab21dac",
- "url": "/v2/projects/proj1ab2c3d4/offerings/ofrnge1a2b3c4d5/packages/pkge1a2b3c4d5/products"
}
}
Get a product
This endpoint requires the following permission(s): project_configuration:products:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
product_id required | string [ 1 .. 255 ] characters Example: prod1a2b3c4d5 ID of the product |
query Parameters
expand | Array of strings[ items [ 1 .. 5000 ] characters ] Items Value: "app" Example: expand=app Specifies which fields in the response should be expanded.
Accepted values are: |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}
Delete a product
This endpoint requires the following permission(s): project_configuration:products:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
product_id required | string [ 1 .. 255 ] characters Example: prod1a2b3c4d5 ID of the product |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "app",
- "id": "string",
- "deleted_at": 1658399423658
}
Get a list of products
This endpoint requires the following permission(s): project_configuration:products:read
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
query Parameters
app_id | string Example: app_id=app1a2b3c4 This is an optional query parameter to get a list of products of a given entitlement associated with a particular app |
starting_after | string Example: starting_after=ent12354 |
limit | integer Default: 20 Example: limit=10 |
expand | Array of strings[ items [ 1 .. 5000 ] characters ] Items Value: "items.app" Example: expand=items.app Specifies which fields in the response should be expanded.
Accepted values are: |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "object": "list",
- "items": [
- {
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}
], - "next_page": "/v2/projects/proj1ab2c3d4/products?starting_after=prodab21dac",
- "url": "/v2/projects/proj1ab2c3d4/products"
}
Create a product
This endpoint requires the following permission(s): project_configuration:products:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
Request Body schema: application/jsonrequired
store_identifier required | string [ 1 .. 200 ] characters The store identifier of the product.
|
app_id required | string [ 1 .. 255 ] characters The ID of the app |
type required | string (ProductType) Enum: "subscription" "one_time" |
display_name | string or null [ 1 .. 1500 ] characters The display name of the product |
Responses
Request samples
- Payload
{- "store_identifier": "com.revenuecat.magicweather.monthly9.99",
- "app_id": "app1a2b3c4",
- "type": "subscription",
- "display_name": "Premium Monthly 2023"
}
Response samples
- 201
- 400
- 401
- 403
- 404
- 409
- 422
- 423
- 429
- 500
- 503
{- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "app_store",
- "project_id": "proj1a2b3c4",
- "amazon": {
- "package_name": "string"
}, - "app_store": {
- "bundle_id": "string"
}, - "mac_app_store": {
- "bundle_id": "string"
}, - "play_store": {
- "package_name": "string"
}, - "stripe": {
- "stripe_account_id": "string"
}
}, - "display_name": "Premium Monthly 2023"
}
Cancels an active RevenueCat Billing subscription
This endpoint requires the following permission(s): customer_information:subscriptions:read_write
.
Authorizations:
path Parameters
project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
subscription_id required | string [ 1 .. 255 ] characters Example: sub1a2b3c4d5e ID of the subscription |