POST https://graph.oculus.com/$APP_ID/verify_entitlement
Parameter | Required or Optional | Description | Type | Example |
---|---|---|---|---|
access_token | Required | Bearer token that contains OC|$APP_ID |$APP_SECRET or the User Access Token | string | “OC|1234|456789” |
sku | The SKU for the item, defined when created on the Developer Dashboard. | string | “50_gems” | |
user_id | Required | The user id of the user who you want to see the purchases of | string | “123456789” |
curl -d "access_token=OC|$APP_ID|$APP_SECRET" -d "user_id=$USER_ID" -d "sku=$SKU" https://graph.oculus.com/$APP_ID/verify_entitlement
{"success":true}
Field | Definition | Type |
---|---|---|
success | Defines whether or not the user has ownership of an item. | bool |
POST https://graph.oculus.com/$APP_ID/consume_entitlement
Parameter | Required or Optional | Description | Type | Example |
---|---|---|---|---|
access_token | Required | Bearer token that contains OC|$APP_ID |$APP_SECRET or the User Access Token | string | “OC|1234|456789” |
sku | The sku for the item, defined when created on the Developer Dashboard. | string | “50_gems” | |
user_id | Required | The user id of the user who you want to see the purchases of | string | “123456789” |
curl -d "access_token=OC|$APP_ID|$APP_SECRET" -d "user_id=$USER_ID" -d "sku=$SKU" https://graph.oculus.com/$APP_ID/consume_entitlement
{"success":true}
Field | Definition | Type |
---|---|---|
success | Defines whether or not consume entitlement was successful. | bool |
GET https://graph.oculus.com/$APP_ID/viewer_purchases
Parameter | Required or Optional | Description | Type | Example |
---|---|---|---|---|
access_token | Required | Bearer token that contains OC|$APP_ID |$APP_SECRET or the User Access Token | string | “OC|1234|456789” |
user_id | Required | The user id of the user who you want to see the purchases of | string | “123456789” |
fields | Optional | A comma-separated list of field names. Can contain: id, grant_time, expiration_item, item. | comma-separated string | “fields=id,grant_time,expiration_time,item{sku}” |
curl -G -d "access_token=OC|$APP_ID|$APP_SECRET" -d "user_id=$USER_ID" -d "fields=id,grant_time,expiration_time,item{sku}" https://graph.oculus.com/$APP_ID/viewer_purchases
{
"data": [
{
"id":"0",
"grant_time":1626821865,
"expiration_time":0,
"item": {
"sku":"EXAMPLE1",
"id":"3911516768971206"
}
}
],
"paging": {
"cursors": {
"after": "QYFIUjlhQjNhOTJZAR0ZAaMkhhM1JKZADdNX2o0a2FSSlJLSWcw",
"before": "QYFIUkZAxd2FRSkNoWHJQV3FmRG5TY3BDeUgwRzFaMXd"
},
"previous": "https://graph.oculus.com/$APP_ID/viewer_purchases?access_token=..."
"next": "https://graph.oculus.com/$APP_ID/viewer_purchases?access_token=..."
}
}
Field | Definition | Type |
---|---|---|
id | Unique identifier. | string |
grant_time | Time when the user gained entitlement to the item (Unix timestamp). | number |
expiration_time | Time when the user will lose entitlement to the item (Unix timestamp). If the user has an indefinite entitlement it will be 0. | number |
item.sku | The SKU of the time | string |
GET https://graph.oculus.com/application/available_purchases
Parameter | Required or Optional | Description | Type | Example |
---|---|---|---|---|
access_token | Required | Bearer token that contains OC|$APP_ID |$APP_SECRET or the User Access Token | string | “OC|1234|456789” |
fields | Optional | A comma-separated list of field names. Can contain: sku, current_offer, billing_plans (For subscription items). | comma-separated string | “sku,current_offer{description,price{currency,amount_in_hundredths,formatted},name},billing_plans{paid_offer{description,price{currency,amount_in_hundredths,formatted},name},trial_offers{max_term_count,trial_type,trial_term,description,name,price{currency,amount_in_hundredths,formatted}}}” |
curl -d "access_token=OC|$APP_ID|$APP_SECRET" -d "fields=sku,current_offer{description,price{currency,amount_in_hundredths,formatted},name},billing_plans{paid_offer{description,price{currency,amount_in_hundredths,formatted},name},trial_offers{max_term_count,trial_type,trial_term,description,name,price{currency,amount_in_hundredths,formatted}}}" -G https://graph.oculus.com/application/available_purchases
{
"data": [
{
"id": "23518108958879017",
"sku": "subs-bronze:SUBSCRIPTION__MONTHLY",
"current_offer": {
"description": "Subscription - Bronze Description",
"price": {
"currency": "USD",
"amount_in_hundredths": 299,
"formatted": "$2.99"
},
"name": "Subscription - Bronze",
"id": "6974589902912852"
},
"billing_plans": [
{
"paid_offer": {
"description": "Subscription - Bronze Description",
"price": {
"currency": "USD",
"amount_in_hundredths": 299,
"formatted": "$2.99"
},
"name": "Subscription - Bronze",
"id": "2274589902912852"
},
"trial_offers": [
{
"trial_type": "FREE_TRIAL",
"trial_term": "MONTHLY",
"description": "Subscription - Bronze Description",
"name": "Subscription - Bronze",
"price": {
"currency": "USD",
"amount_in_hundredths": 0,
"formatted": "$0.00"
},
"id": "3012763990016787"
}
]
}
]
},
{
"id": "23518108958879017",
"sku": "subs-bronze:SUBSCRIPTION__SEMIANNUAL",
"current_offer": {
"description": "Subscription - Bronze Description",
"price": {
"currency": "USD",
"amount_in_hundredths": 999,
"formatted": "$9.99"
},
"name": "Subscription - Bronze",
"id": "1277845290061617"
},
"billing_plans": [
{
"paid_offer": {
"description": "Subscription - Bronze Description",
"price": {
"currency": "USD",
"amount_in_hundredths": 999,
"formatted": "$9.99"
},
"name": "Subscription - Bronze",
"id": "127784349006157"
},
"trial_offers": [
{
"trial_type": "FREE_TRIAL",
"trial_term": "MONTHLY",
"description": "Subscription - Bronze Description",
"name": "Subscription - Bronze",
"price": {
"currency": "USD",
"amount_in_hundredths": 0,
"formatted": "$0.00"
},
"id": "121211290016787"
}
]
}
]
},
],
"paging": {
"cursors": {
"after": "QYFIUjlhQjNhOTJZAR0ZAaMkhhM1JKZADdNX2o0a2FSSlJLSWcw",
"before": "QYFIUkZAxd2FRSkNoWHJQV3FmRG5TY3BDeUgwRzFaMXd"
}
}
}
Field | Definition | Type |
---|---|---|
id | Unique identifier. | string |
sku | The SKU of the item. Subscription items which have multiple terms will return as separate objects in the response as displayed in the example with the form {SKU}:SUBSCRIPTION__{TERM}. | string |
current_offer | The current best paid or intro offer by price. | CurrentOffer |
billing_plans | An array representing the billing plans of the subscription item. The billing plans includes information about the paid offer, intro offers, and trial offers. NOTE: Only Applicable to Subscription Items. | Array[BillingPlan] |
Field | Definition | Type |
---|---|---|
trial_offers | The trial offers associated with the subscription term: Free Trial or Intro Offer. | Array[TrialOffer] |
paid_offer | The paid offer associated with the subscription term. | PaidOffer |
Field | Definition | Type |
---|---|---|
description | The description of the offer. | string |
name | The name of the offer. | string |
price | The price details associated with the offer. | Price |
Field | Definition | Type |
---|---|---|
subscription_term | The term of the subscription (e.g.: MONTHLY, ANNUAL, WEEKLY, BIWEEKLY, QUARTERLY, SEMIANNUAL). | string |
description | The description of the offer. | string |
name | The name of the offer. | string |
price | The price of the offer. | Price |
Field | Definition | Type |
---|---|---|
trial_term | The term of the subscription (e.g.: MONTHLY, ANNUAL, WEEKLY, BIWEEKLY, QUARTERLY, SEMIANNUAL). | string |
trial_type | The type of the trial (e.g.: FREE_TRIAL, INTRO_OFFER ). | string |
max_term_count | The number of terms the intro_offer will last. Only set for intro offers. | int |
description | The description of the offer. | string |
name | The name of the offer. | string |
price | The price of the offer. | Price |
Field | Definition | Type |
---|---|---|
currency | The currency of the price (e.g.: USD, EUR). | string |
amount_in_hundredths | The amount of the price in hundredths. For example a price of 11.99 is represented as 1199. | number |
formatted | The formatted price (e.g.: $11.99). | string |
POST https://graph.oculus.com/$APP_ID/refund_iap_entitlement
Parameter | Required or Optional | Description | Type | Example |
---|---|---|---|---|
access_token | Required | Bearer token that contains OC|$APP_ID |$APP_SECRET or the User Access Token | string | “OC|1234|456789” |
sku | Required | The sku for the item, defined when created on the Developer Dashboard. | string | “50_gems” |
user_id | Required | The user id of the user who you want to see the purchases of | string | “123456789” |
reason | Required | The reason for the refund (e.g.: customer_support, unable_to_fulfill, other) | string | “customer_support” |
curl -d "access_token=OC|$APP_ID|$APP_SECRET" -d "user_id=$USER_ID" -d "sku=$SKU" -d "reason=$REASON" https://graph.oculus.com/$APP_ID/refund_iap_entitlement
{"success":true}
Field | Definition | Type |
---|---|---|
success | Defines whether or not refund iap entitlement was successful. | bool |