Download OpenAPI specification:Download
This endpoint requires the following permission(s): customer_information:purchases:read. This endpoint belongs to the Customer Information domain, which has a default rate limit of 480 requests per minute.
| project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
| purchase_id required | string [ 1 .. 255 ] characters Example: purc1a2b3c4d5e ID of the purchase |
| expand | Array of strings[ items [ 1 .. 5000 ] characters ] Items Value: "redemption" Example: expand=redemption Specifies which fields in the response should be expanded.
Accepted values are: |
{- "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": [
- {
- "state": "active",
- "object": "entitlement",
- "project_id": "proj1ab2c3d4",
- "id": "entla1b2c3d4e5",
- "lookup_key": "premium",
- "display_name": "Premium",
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "state": "active",
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "one_time": {
- "is_consumable": true
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "amazon",
- "project_id": "proj1a2b3c4",
- "custom_url_scheme": "rc-1a2b3c4",
- "amazon": {
- "package_name": "string"
}
}, - "indicative_price": {
- "object": "indicative_price",
- "currency": "USD",
- "country": "US",
- "amount_micros": "For 99.99, the value should be 99990000"
}, - "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",
- "redemption": {
- "object": "redemption",
- "redeemed_at": 1658399423658
}
}Lists all Entitlements granted by a Purchase.
This endpoint requires the following permission(s): customer_information:purchases:read. This endpoint belongs to the Customer Information domain, which has a default rate limit of 480 requests per minute.
| project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
| purchase_id required | string [ 1 .. 255 ] characters Example: purc1a2b3c4d5e ID of the purchase |
| starting_after | string Example: starting_after=ent12354 Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page. |
| limit | integer Default: 20 Example: limit=10 Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected. |
{- "object": "list",
- "items": [
- {
- "state": "active",
- "object": "entitlement",
- "project_id": "proj1ab2c3d4",
- "id": "entla1b2c3d4e5",
- "lookup_key": "premium",
- "display_name": "Premium",
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "state": "active",
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "one_time": {
- "is_consumable": true
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "amazon",
- "project_id": "proj1a2b3c4",
- "custom_url_scheme": "rc-1a2b3c4",
- "amazon": {
- "package_name": "string"
}
}, - "indicative_price": {
- "object": "indicative_price",
- "currency": "USD",
- "country": "US",
- "amount_micros": "For 99.99, the value should be 99990000"
}, - "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"
}Refund a Web Billing purchase and revoke access to associated granted entitlements.
This endpoint requires the following permission(s): customer_information:purchases:read_write. This endpoint belongs to the Customer Information domain, which has a default rate limit of 480 requests per minute.
| project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
| purchase_id required | string [ 1 .. 255 ] characters Example: purc1a2b3c4d5e ID of the purchase |
{- "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": [
- {
- "state": "active",
- "object": "entitlement",
- "project_id": "proj1ab2c3d4",
- "id": "entla1b2c3d4e5",
- "lookup_key": "premium",
- "display_name": "Premium",
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "state": "active",
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": "P1M",
- "grace_period_duration": "P3D",
- "trial_duration": "P1W"
}, - "one_time": {
- "is_consumable": true
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": "app",
- "id": "app1a2b3c4",
- "name": "string",
- "created_at": 1658399423658,
- "type": "amazon",
- "project_id": "proj1a2b3c4",
- "custom_url_scheme": "rc-1a2b3c4",
- "amazon": {
- "package_name": "string"
}
}, - "indicative_price": {
- "object": "indicative_price",
- "currency": "USD",
- "country": "US",
- "amount_micros": "For 99.99, the value should be 99990000"
}, - "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",
- "redemption": {
- "object": "redemption",
- "redeemed_at": 1658399423658
}
}Search for a one-time purchases by any of its associated store_purchase_identifier values.
For example, this may include the transactionId of any transaction in an Apple App Store purchase, or any order ID from a Google Play Store purchase.
This endpoint requires the following permission(s): customer_information:purchases:read. This endpoint belongs to the Customer Information domain, which has a default rate limit of 480 requests per minute.
| project_id required | string <= 255 characters Example: proj1ab2c3d4 ID of the project |
| store_purchase_identifier required | string [ 1 .. 255 ] characters Examples:
Store ID associated with the one-time purchase. |
| expand | Array of strings[ items [ 1 .. 5000 ] characters ] Items Value: "items.redemption" Example: expand=items.redemption Specifies which fields in the response should be expanded.
Accepted values are: |
{- "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": [
- {
- "state": "active",
- "object": "entitlement",
- "project_id": "proj1ab2c3d4",
- "id": "entla1b2c3d4e5",
- "lookup_key": "premium",
- "display_name": "Premium",
- "created_at": 1658399423658,
- "products": {
- "object": "list",
- "items": [
- {
- "state": "active",
- "object": "product",
- "id": "prod1a2b3c4d5e",
- "store_identifier": "rc_1w_199",
- "type": "subscription",
- "subscription": {
- "duration": null,
- "grace_period_duration": null,
- "trial_duration": null
}, - "one_time": {
- "is_consumable": null
}, - "created_at": 1658399423658,
- "app_id": "app1a2b3c4",
- "app": {
- "object": null,
- "id": null,
- "name": null,
- "created_at": null,
- "type": null,
- "project_id": null,
- "custom_url_scheme": null,
- "amazon": { }
}, - "indicative_price": {
- "object": null,
- "currency": null,
- "country": null,
- "amount_micros": null
}, - "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",
- "redemption": {
- "object": "redemption",
- "redeemed_at": 1658399423658
}
}
], - "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"
}