

Ooyala eCommerce API
version v3
https://player.ooyala.com/commerce
Overview
The eCommerce API is the payment API for the Revenue Builder project. It is responsible for processing all payments and granting entitlements to a user. It uses custom billing vendor for payment processing, validation and product catalog management, Vindicia Cashbox and Stripe, and Ooyala Rights Locker for handling entitlements.
The Base Path
The Usage REST API is available at the following URL: https://player.ooyala.com/commerce.
Prefix any request with this URL.
Example:
https://player.ooyala.com/commerce/v3/accounts/subscriptions?pcm_id=...&bv_id=...&account_token=..."
Authentication
In addition to the parameters required by each route in this reference, all requests must provide the following extra query parameters:
-
account_token
: An account token generated for the provider (see "Ooyala Account Token API").
Changelog
- 07-22-16
- Initial release (see "eCommerce Release Notes 07-22-16").
Billing Vendor Vindicia Integration
To succesfully integrate the eCommerce API with your billing vendor, please follow the notes below.
Vindicia
Requirements
Please ensure you understand all these specs before you start using the eCommerce API along with Vindicia. Ensure that any
product id
or
subscription id
that you send as part of any request, exists in
Vindicia
, and that it's an actual product ID. If you're going to use PayPal payment method type, make sure to talk to your PayPal account representative about enabling Reference transactions for your merchant account. If the reference transactions feature is not enabled for your merchant account, all calls using PayPal will fail.
Products
A product needs to have the following specifications in order to be valid.
- Have a
Price
defined. - Have a
Custom Product Data
withname
as "type" andvalue
as "ppv". - Have at least one
Entitlement
defined (you can get these entitlements from Backlot).
Subscriptions
Subscriptions are actually Vindicia products, but with different configurations. A Vindicia product needs to have the following specifications in order to be a valid subscription.
- Have a
Custom Product Data
withname
as "type" andvalue
as "subscription". - Have at least one
Entitlement
defined (you can get these entitlements from Backlot). - Have a
Default billing plan
in order to be a valid subscription.
Billing Vendor Stripe Integration
Stripe
Products
A product needs to have the following specifications in order to be valid.
- Have a
sku
added to itsInventory
. - Have a
Metadata
withkey
as "type" andvalue
as "ppv".
Subscriptions
In this context, subscriptions are actually Stripe Plans. A Stripe Plan needs to have the following specifications in order to be a valid subscription.
- Have at least one
Entitlement
set as a comma-separated value inMetadata
withkey
as "labels".
Caveats
You can define up to two price cycles for subscriptions in Stripe.
- A trial period restricted to days (optional)...
- And the overall price plan live cycle.
Account
DEPRECATED: see GET /v3/accounts
DEPRECATED: see GET /v3/accounts
get /v3/account
DEPRECATED: see GET /v3/accounts
Token generated by the pcode of the provider, account ID of a user under the provider, the API Key of the provider and the API secret of the provider.
URI Parameters
-
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"account": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"address": {
"type": "array",
"items": {
"type": "string"
}
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"country": {
"type": "string"
}
},
"required": [
"id",
"name",
"address",
"city",
"state",
"postal_code",
"country"
]
}
},
"required": [
"id",
"name",
"email",
"address"
]
}
},
"required": [
"account"
]
}
Example:
{
"account": {
"id": "example",
"name": "Freeman",
"email": "example@test.com",
"address": {
"id": "789e0724dd0fdf36e2f625609a004831c1d546c5",
"name": "test example",
"address": [
"addrs1",
"addrs2",
"addrs3"
],
"city": "example",
"state": "example",
"postal_code": "75024",
"country": "US"
}
}
}
HTTP status code 400
Bad Request - Billing vendor error.
Body
Type: application/json
Example:
{
"error": {
"code": "BillingVendorError",
"message": "",
"metadata": {
"returnedCode": "400",
"returnedError": "PayPal tx needs to be in AuthPending dispsosition Disposition AuthorizationPending 175140249(10)"
}
}
}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid account token."}
HTTP status code 403
Forbidden - Unauthorized request.
Body
Type: application/json
Example:
{
"error": {
"code": "UnauthorizedBillingRequestError",
"message": "Content.hash is not valid",
"metadata": {
"unauthorizedResource": "Content"
}
}
}
HTTP status code 404
Not found - A resource is not found.
Body
Type: application/json
Example:
{
"error": {
"code": "ResourceNotFound",
"message": "",
"metadata": {
"resourceId": "MIDAS_ybom_DAY",
"resourceName": "Product"
}
}
}
HTTP status code 422
ObjectConversionError - A field is missing, invalid or malformed.
Body
Type: application/json
Example:
{
"error": {
"code": "ObjectConversionError",
"message": "id is empty",
"metadata": {
"dest": "vendor.PaymentMethod",
"field": "payment_method.id",
"source": "ooyala.PaymentMethod"
}
}
}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{
"error": {
"code": "InternalServerError",
"message": "An internal error occurred while processing the request"
}
}


Secured by ooyala-auth
Accounts
Creates a new account within the custom billing vendor. This will fail if the end user already has an account.
Creates a new user account within the custom billing vendor. Optionally, the user can enter their payment method. They can then purchase any product that does not require a special payment method, such as a promo code or earned credits. Later the user can update their payment method. This POST fails if the end user already has an account.
Returns fields associated with an account.
post /v3/accounts
Creates a new user account within the custom billing vendor. Optionally, the user can enter their payment method. They can then purchase any product that does not require a special payment method, such as a promo code or earned credits. Later the user can update their payment method. This POST fails if the end user already has an account.
Token generated by the pcode of the provider, account ID of a user under the provider, the API Key of the provider and the API secret of the provider.
URI Parameters
-
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"account": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
}
},
"required": [
"name",
"email"
]
}
},
"required": [
"account"
]
}
Example:
{
"account": {
"name": "Account Test",
"email": "account@test.com"
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"account": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"address": {
"type": "array",
"items": {
"type": "string"
}
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"country": {
"type": "string"
}
},
"required": [
"id",
"name",
"address",
"city",
"state",
"postal_code",
"country"
]
}
},
"required": [
"id",
"name",
"email",
"address"
]
}
},
"required": [
"account"
]
}
Example:
{
"account": {
"id": "example",
"name": "Freeman",
"email": "example@test.com",
"address": {
"id": "789e0724dd0fdf36e2f625609a004831c1d546c5",
"name": "test example",
"address": [
"addrs1",
"addrs2",
"addrs3"
],
"city": "example",
"state": "example",
"postal_code": "75024",
"country": "US"
}
}
}
HTTP status code 400
Bad Request - Billing vendor error.
Body
Type: application/json
Example:
{
"error": {
"code": "BillingVendorError",
"message": "",
"metadata": {
"returnedCode": "400",
"returnedError": "PayPal tx needs to be in AuthPending dispsosition Disposition AuthorizationPending 175140249(10)"
}
}
}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid account token."}
HTTP status code 403
Forbidden - Unauthorized request.
Body
Type: application/json
Example:
{
"error": {
"code": "UnauthorizedBillingRequestError",
"message": "Content.hash is not valid",
"metadata": {
"unauthorizedResource": "Content"
}
}
}
HTTP status code 404
Not found - A resource is not found.
Body
Type: application/json
Example:
{
"error": {
"code": "ResourceNotFound",
"message": "",
"metadata": {
"resourceId": "MIDAS_ybom_DAY",
"resourceName": "Product"
}
}
}
HTTP status code 422
ObjectConversionError - A field is missing, invalid or malformed.
Body
Type: application/json
Example:
{
"error": {
"code": "ObjectConversionError",
"message": "id is empty",
"metadata": {
"dest": "vendor.PaymentMethod",
"field": "payment_method.id",
"source": "ooyala.PaymentMethod"
}
}
}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{
"error": {
"code": "InternalServerError",
"message": "An internal error occurred while processing the request"
}
}


Secured by ooyala-auth
get /v3/accounts
Returns fields associated with an account.
Token generated by the pcode of the provider, account ID of a user under the provider, the API Key of the provider and the API secret of the provider.
URI Parameters
-
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"account": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"address": {
"type": "array",
"items": {
"type": "string"
}
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"country": {
"type": "string"
}
},
"required": [
"id",
"name",
"address",
"city",
"state",
"postal_code",
"country"
]
}
},
"required": [
"id",
"name",
"email",
"address"
]
}
},
"required": [
"account"
]
}
Example:
{
"account": {
"id": "example",
"name": "Freeman",
"email": "example@test.com",
"address": {
"id": "789e0724dd0fdf36e2f625609a004831c1d546c5",
"name": "test example",
"address": [
"addrs1",
"addrs2",
"addrs3"
],
"city": "example",
"state": "example",
"postal_code": "75024",
"country": "US"
}
}
}
HTTP status code 400
Bad Request - Billing vendor error.
Body
Type: application/json
Example:
{
"error": {
"code": "BillingVendorError",
"message": "",
"metadata": {
"returnedCode": "400",
"returnedError": "PayPal tx needs to be in AuthPending dispsosition Disposition AuthorizationPending 175140249(10)"
}
}
}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid account token."}
HTTP status code 403
Forbidden - Unauthorized request.
Body
Type: application/json
Example:
{
"error": {
"code": "UnauthorizedBillingRequestError",
"message": "Content.hash is not valid",
"metadata": {
"unauthorizedResource": "Content"
}
}
}
HTTP status code 404
Not found - A resource is not found.
Body
Type: application/json
Example:
{
"error": {
"code": "ResourceNotFound",
"message": "",
"metadata": {
"resourceId": "MIDAS_ybom_DAY",
"resourceName": "Product"
}
}
}
HTTP status code 422
ObjectConversionError - A field is missing, invalid or malformed.
Body
Type: application/json
Example:
{
"error": {
"code": "ObjectConversionError",
"message": "id is empty",
"metadata": {
"dest": "vendor.PaymentMethod",
"field": "payment_method.id",
"source": "ooyala.PaymentMethod"
}
}
}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{
"error": {
"code": "InternalServerError",
"message": "An internal error occurred while processing the request"
}
}


Secured by ooyala-auth
Creates a new payment method or returns all the registered payment methods.
Creates a new payment method for the current account. To do this, you register a tracking ID that is used to pay using the payment method type. Valid types of payment are credit card and PayPal. When the tracking ID has been paid, it can be reused to create a new subscription or one-time charge.
Returns all the payment methods previously registered for the current account.
post /v3/accounts/payment-methods
Creates a new payment method for the current account. To do this, you register a tracking ID that is used to pay using the payment method type. Valid types of payment are credit card and PayPal. When the tracking ID has been paid, it can be reused to create a new subscription or one-time charge.
Token generated by the pcode of the provider, account ID of a user under the provider, the API Key of the provider and the API secret of the provider.
URI Parameters
-
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"payment_method_type": {
"type": "string"
}
},
"required": [
"id",
"payment_method_type"
]
}
Example:
{
"id": "123456789abc123456789abc",
"payment_method_type": "CreditCard"
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"payment_method": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"payment_method_type": {
"type": "string"
},
"details": {
"type": "object",
"properties": {
"last-digits": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
},
"required": [
"id",
"payment_method_type",
"details"
]
}
},
"required": [
"payment_method"
]
}
Example:
{
"payment_method": {
"id": "CreditCard_574de06b_32093f9949f7ce81",
"payment_method_type": "CreditCard",
"details": {
"last-digits": "2217"
}
}
}
HTTP status code 400
Bad Request - Billing vendor error.
Body
Type: application/json
Example:
{
"error": {
"code": "BillingVendorError",
"message": "",
"metadata": {
"returnedCode": "400",
"returnedError": "PayPal tx needs to be in AuthPending dispsosition Disposition AuthorizationPending 175140249(10)"
}
}
}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid account token."}
HTTP status code 403
Forbidden - Unauthorized request.
Body
Type: application/json
Example:
{
"error": {
"code": "UnauthorizedBillingRequestError",
"message": "Content.hash is not valid",
"metadata": {
"unauthorizedResource": "Content"
}
}
}
HTTP status code 404
Not found - A resource is not found.
Body
Type: application/json
Example:
{
"error": {
"code": "ResourceNotFound",
"message": "",
"metadata": {
"resourceId": "MIDAS_ybom_DAY",
"resourceName": "Product"
}
}
}
HTTP status code 422
ObjectConversionError - A field is missing, invalid or malformed.
Body
Type: application/json
Example:
{
"error": {
"code": "ObjectConversionError",
"message": "id is empty",
"metadata": {
"dest": "vendor.PaymentMethod",
"field": "payment_method.id",
"source": "ooyala.PaymentMethod"
}
}
}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{
"error": {
"code": "InternalServerError",
"message": "An internal error occurred while processing the request"
}
}


Secured by ooyala-auth
get /v3/accounts/payment-methods
Returns all the payment methods previously registered for the current account.
Token generated by the pcode of the provider, account ID of a user under the provider, the API Key of the provider and the API secret of the provider.
URI Parameters
-
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"payment_methods": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"payment_method_type": {
"type": "string"
},
"details": {
"type": "object",
"properties": {
"last-digits": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
},
"required": [
"id",
"payment_method_type",
"details"
]
}
}
},
"required": [
"payment_methods"
]
}
Example:
{
"payment_methods": [
{
"id": "CreditCard_574de06b_32093f9949f7ce81",
"payment_method_type": "CreditCard",
"details": {
"last-digits": "2217"
}
}
]
}
HTTP status code 400
Bad Request - Billing vendor error.
Body
Type: application/json
Example:
{
"error": {
"code": "BillingVendorError",
"message": "",
"metadata": {
"returnedCode": "400",
"returnedError": "PayPal tx needs to be in AuthPending dispsosition Disposition AuthorizationPending 175140249(10)"
}
}
}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid account token."}
HTTP status code 403
Forbidden - Unauthorized request.
Body
Type: application/json
Example:
{
"error": {
"code": "UnauthorizedBillingRequestError",
"message": "Content.hash is not valid",
"metadata": {
"unauthorizedResource": "Content"
}
}
}
HTTP status code 404
Not found - A resource is not found.
Body
Type: application/json
Example:
{
"error": {
"code": "ResourceNotFound",
"message": "",
"metadata": {
"resourceId": "MIDAS_ybom_DAY",
"resourceName": "Product"
}
}
}
HTTP status code 422
ObjectConversionError - A field is missing, invalid or malformed.
Body
Type: application/json
Example:
{
"error": {
"code": "ObjectConversionError",
"message": "id is empty",
"metadata": {
"dest": "vendor.PaymentMethod",
"field": "payment_method.id",
"source": "ooyala.PaymentMethod"
}
}
}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{
"error": {
"code": "InternalServerError",
"message": "An internal error occurred while processing the request"
}
}


Secured by ooyala-auth
Initialize payment method registration to setup the tracking ID.
Creates a new token that is used to register a new payment method. This token identifies the payment method in other eCommerce operations. This token is not the same as an Ooyala Account Token, see Security Schemes.
WORKFLOW
Creating a new payment method is a three-step process. NOTE: Depending of the billing vendor this flow may have less steps.
For Credit Card:
- 1. To Register a Payment Method:
Initialize payment method registration to setup the tracking ID (after this, user submits confidential data).
POST /v3/accounts/payment-methods/token
- 2. Enable user to submit credit card information to billing vendor.
- 3. To Confirm a Payment Method:
POST /v3/accounts/payment-methods
Creates a new payment method for the current account. Valid types of payment are credit card and PayPal.
For PayPal:
- Same steps as before; however, at step two, the user will be redirected to a PayPal URL where they will enter their PayPal credentials, review the payment, and approve it. If the submission succeeds, the user will be redirected to the “success_callback” that you have specified, and should trigger the confirm step. If there’s a problem from PayPal, the user will be redirected to “error_callback” that you have specified.
post /v3/accounts/payment-methods/token
Creates a new token that is used to register a new payment method. This token identifies the payment method in other eCommerce operations. This token is not the same as an Ooyala Account Token, see Security Schemes.
WORKFLOW
Creating a new payment method is a three-step process. NOTE: Depending of the billing vendor this flow may have less steps.
For Credit Card:
- 1. To Register a Payment Method:
Initialize payment method registration to setup the tracking ID (after this, user submits confidential data).
POST /v3/accounts/payment-methods/token
- 2. Enable user to submit credit card information to billing vendor.
- 3. To Confirm a Payment Method:
POST /v3/accounts/payment-methods
Creates a new payment method for the current account. Valid types of payment are credit card and PayPal.
For PayPal:
- Same steps as before; however, at step two, the user will be redirected to a PayPal URL where they will enter their PayPal credentials, review the payment, and approve it. If the submission succeeds, the user will be redirected to the “success_callback” that you have specified, and should trigger the confirm step. If there’s a problem from PayPal, the user will be redirected to “error_callback” that you have specified.
Token generated by the pcode of the provider, account ID of a user under the provider, the API Key of the provider and the API secret of the provider.
URI Parameters
-
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"payment_method_type": {
"type": "string"
},
"metadata": {
"type": "object",
"description": "Metadata requirement is defined by each adapter specification and they are a pair of key and value. ",
"properties": {
"key": {
"type": "Value"
}
}
}
},
"required": [
"payment_method_type"
]
}
Example:
{
"payment_method_type": "CreditCard",
"metadata": {
"currency": "USD",
"success_callback": "http://www.example.com/",
"error_callback": "http://www.example.com/"
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"token": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"token": {
"type": "string"
}
},
"required": [
"id",
"token"
]
}
},
"required": [
"token"
]
}
Example:
{
"token": {
"id": "123456789abc123456789abc",
"token": "https://www.secure.prodtest.sj.vindicia.com/vws/"
}
}
HTTP status code 400
Bad Request - Billing vendor error.
Body
Type: application/json
Example:
{
"error": {
"code": "BillingVendorError",
"message": "",
"metadata": {
"returnedCode": "400",
"returnedError": "PayPal tx needs to be in AuthPending dispsosition Disposition AuthorizationPending 175140249(10)"
}
}
}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid account token."}
HTTP status code 403
Forbidden - Unauthorized request.
Body
Type: application/json
Example:
{
"error": {
"code": "UnauthorizedBillingRequestError",
"message": "Content.hash is not valid",
"metadata": {
"unauthorizedResource": "Content"
}
}
}
HTTP status code 404
Not found - A resource is not found.
Body
Type: application/json
Example:
{
"error": {
"code": "ResourceNotFound",
"message": "",
"metadata": {
"resourceId": "MIDAS_ybom_DAY",
"resourceName": "Product"
}
}
}
HTTP status code 422
ObjectConversionError - A field is missing, invalid or malformed.
Body
Type: application/json
Example:
{
"error": {
"code": "ObjectConversionError",
"message": "id is empty",
"metadata": {
"dest": "vendor.PaymentMethod",
"field": "payment_method.id",
"source": "ooyala.PaymentMethod"
}
}
}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{
"error": {
"code": "InternalServerError",
"message": "An internal error occurred while processing the request"
}
}


Secured by ooyala-auth
Helps to pay an invoice of a subscription used by the payment method “MAP”.
The invoice ID to identify the invoice to pay for a subscription. The invoice ID is used by the payment method “MAP”.
put /v3/accounts/invoices/{invoice_id}
The invoice ID to identify the invoice to pay for a subscription. The invoice ID is used by the payment method “MAP”.
Token generated by the pcode of the provider, account ID of a user under the provider, the API Key of the provider and the API secret of the provider.
URI Parameters
-
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
invoice_id: required (string)
Invoice id for the subscription or one time purchase that was previously created. type: string example: AB_578914a0_78629a0f5f3f164f-00000001
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"invoice": {
"type": "object",
"properties": {
"hash": {
"type": "string"
},
"subscription_id": {
"type": "string"
},
"payment": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
}
},
"required": [
"hash",
"subscription_id",
"payment"
]
}
},
"required": [
"invoice"
]
}
Example:
{
"invoice": {
"hash": "a55555b55555c55555d55555e55555i=",
"subscription_id": "AB_555555555_55555555555555555",
"payment": {
"amount": 10,
"currency": "USD"
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"invoice": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"payment": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
},
"subscription_id": {
"type": "string"
},
"status": {
"type": "string"
},
"note": {
"type": "string"
}
},
"required": [
"id",
"payment",
"subscription_id",
"status",
"note"
]
}
},
"required": [
"invoice"
]
}
Example:
{
"invoice": {
"id": "a55555b55555c55555d55555e55555i",
"payment": {
"amount": 10,
"currency": "USD"
},
"subscription_id": "AB_555555555_55555555555555555",
"status": "Success",
"note": ""
}
}
HTTP status code 400
Bad Request - Billing vendor error.
Body
Type: application/json
Example:
{
"error": {
"code": "BillingVendorError",
"message": "",
"metadata": {
"returnedCode": "400",
"returnedError": "PayPal tx needs to be in AuthPending dispsosition Disposition AuthorizationPending 175140249(10)"
}
}
}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid account token."}
HTTP status code 403
Forbidden - Unauthorized request.
Body
Type: application/json
Example:
{
"error": {
"code": "UnauthorizedBillingRequestError",
"message": "Content.hash is not valid",
"metadata": {
"unauthorizedResource": "Content"
}
}
}
HTTP status code 404
Not found - A resource is not found.
Body
Type: application/json
Example:
{
"error": {
"code": "ResourceNotFound",
"message": "",
"metadata": {
"resourceId": "MIDAS_ybom_DAY",
"resourceName": "Product"
}
}
}
HTTP status code 422
ObjectConversionError - A field is missing, invalid or malformed.
Body
Type: application/json
Example:
{
"error": {
"code": "ObjectConversionError",
"message": "id is empty",
"metadata": {
"dest": "vendor.PaymentMethod",
"field": "payment_method.id",
"source": "ooyala.PaymentMethod"
}
}
}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{
"error": {
"code": "InternalServerError",
"message": "An internal error occurred while processing the request"
}
}


Secured by ooyala-auth
Subscription associated with an account.
This route creates a subscription for the current user.
This route returns all the subscriptions associated with the current user.
post /v3/accounts/subscriptions
This route creates a subscription for the current user.
Token generated by the pcode of the provider, account ID of a user under the provider, the API Key of the provider and the API secret of the provider.
URI Parameters
-
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"subscription": {
"type": "object",
"properties": {
"payment_method": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"payment_method_type": {
"type": "string"
}
},
"required": [
"id",
"payment_method_type"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
}
},
"required": [
"product"
]
}
},
"metadata": {
"type": "object",
"description": "Metadata requirement is defined by each adapter specification and they are a pair of key and value. ",
"properties": {
"key": {
"type": "Value"
}
}
}
},
"required": [
"payment_method",
"items"
]
}
},
"required": [
"subscription"
]
}
Example:
{
"subscription": {
"payment_method": {
"id": "CreditCard_57b767dc_1408d2ac22c4d294",
"payment_method_type": "CreditCard"
},
"items": [
{
"product": {
"id": "subscription_for_freeloaders"
}
}
],
"metadata": {
"currency": "USD"
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"subscription": {
"type": "object",
"properties": {
"billing_start_date": {
"type": "string"
},
"id": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"expiration-date": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"description": "Metadata requirement is defined by each adapter specification and they are a pair of key and value. ",
"properties": {
"key": {
"type": "Value"
}
}
},
"price_plan": {
"type": "object",
"properties": {
"cycles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cycles": {
"type": "integer"
},
"period": {
"type": "string"
},
"price": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
},
"unit": {
"type": "integer"
}
},
"required": [
"cycles",
"period",
"price",
"unit"
]
}
},
"id": {
"type": "string"
}
},
"required": [
"cycles",
"id"
]
},
"status": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"description",
"expiration-date",
"id",
"price_plan",
"status",
"type"
]
}
},
"required": [
"product"
]
}
},
"payment_method": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"payment_method_type": {
"type": "string"
},
"details": {
"type": "object",
"properties": {
"last-digits": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
},
"required": [
"id",
"payment_method_type",
"details"
]
},
"price": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
},
"price_plan": {
"type": "object",
"properties": {
"cycles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cycles": {
"type": "integer"
},
"period": {
"type": "string"
},
"price": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
},
"unit": {
"type": "integer"
}
},
"required": [
"cycles",
"period",
"price",
"unit"
]
}
},
"id": {
"type": "string"
}
},
"required": [
"cycles",
"id"
]
},
"status": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
"required": [
"status"
]
}
},
"required": [
"billing_start_date",
"id",
"items",
"payment_method",
"price",
"price_plan",
"status"
]
}
},
"required": [
"subscription"
]
}
Example:
{
"subscription": {
"billing_start_date": "2016-08-19T13:18:04-07:00",
"id": "AB_57b7697b_1b6cffa2ba517936",
"items": [
{
"product": {
"description": "Freeloader product",
"expiration-date": "2016-04-30T00:00:00-07:00",
"id": "some product",
"metadata": {
"ooyalaEntitlementsPrefix": "oo:"
},
"price_plan": {
"cycles": [
{
"cycles": 0,
"period": "Day",
"price": {
"amount": 5,
"currency": "USD"
},
"unit": 1
}
],
"id": "oneday"
},
"status": "Active",
"type": "subscription"
}
}
],
"payment_method": {
"id": "CreditCard_574de06b_32093f9949f7ce81",
"payment_method_type": "CreditCard",
"details": {
"last-digits": "2217"
}
},
"price": {
"amount": 15,
"currency": "USD"
},
"price_plan": {
"cycles": [
{
"cycles": 0,
"period": "Day",
"price": {
"amount": 5,
"currency": "USD"
},
"unit": 1
}
],
"id": "oneday"
},
"status": {
"status": "active"
}
}
}
HTTP status code 400
Bad Request - Billing vendor error.
Body
Type: application/json
Example:
{
"error": {
"code": "BillingVendorError",
"message": "",
"metadata": {
"returnedCode": "400",
"returnedError": "PayPal tx needs to be in AuthPending dispsosition Disposition AuthorizationPending 175140249(10)"
}
}
}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid account token."}
HTTP status code 403
Forbidden - Unauthorized request.
Body
Type: application/json
Example:
{
"error": {
"code": "UnauthorizedBillingRequestError",
"message": "Content.hash is not valid",
"metadata": {
"unauthorizedResource": "Content"
}
}
}
HTTP status code 404
Not found - A resource is not found.
Body
Type: application/json
Example:
{
"error": {
"code": "ResourceNotFound",
"message": "",
"metadata": {
"resourceId": "MIDAS_ybom_DAY",
"resourceName": "Product"
}
}
}
HTTP status code 422
ObjectConversionError - A field is missing, invalid or malformed.
Body
Type: application/json
Example:
{
"error": {
"code": "ObjectConversionError",
"message": "id is empty",
"metadata": {
"dest": "vendor.PaymentMethod",
"field": "payment_method.id",
"source": "ooyala.PaymentMethod"
}
}
}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{
"error": {
"code": "InternalServerError",
"message": "An internal error occurred while processing the request"
}
}


Secured by ooyala-auth
get /v3/accounts/subscriptions
This route returns all the subscriptions associated with the current user.
Token generated by the pcode of the provider, account ID of a user under the provider, the API Key of the provider and the API secret of the provider.
URI Parameters
-
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"subscriptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"payment_method": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"payment_method_type": {
"type": "string"
},
"details": {
"type": "object",
"properties": {
"last-digits": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
},
"required": [
"id",
"payment_method_type",
"details"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"expiration-date": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"description": "Metadata requirement is defined by each adapter specification and they are a pair of key and value. ",
"properties": {
"key": {
"type": "Value"
}
}
},
"price_plan": {
"type": "object",
"properties": {
"cycles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cycles": {
"type": "integer"
},
"period": {
"type": "string"
},
"price": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
},
"unit": {
"type": "integer"
}
},
"required": [
"cycles",
"period",
"price",
"unit"
]
}
},
"id": {
"type": "string"
}
},
"required": [
"cycles",
"id"
]
},
"status": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"description",
"expiration-date",
"id",
"price_plan",
"status",
"type"
]
}
},
"required": [
"product"
]
}
},
"status": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
"required": [
"status"
]
},
"billing_start_date": {
"type": "string"
},
"price_plan": {
"type": "object",
"properties": {
"cycles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cycles": {
"type": "integer"
},
"period": {
"type": "string"
},
"price": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
},
"unit": {
"type": "integer"
}
},
"required": [
"cycles",
"period",
"price",
"unit"
]
}
},
"id": {
"type": "string"
}
},
"required": [
"cycles",
"id"
]
},
"metadata": {
"type": "object",
"description": "Metadata requirement is defined by each adapter specification and they are a pair of key and value. ",
"properties": {
"key": {
"type": "Value"
}
}
},
"price": {
"type": "null"
}
},
"required": [
"id",
"payment_method",
"items",
"status",
"billing_start_date",
"price_plan",
"price"
]
}
}
},
"required": [
"subscriptions"
]
}
Example:
{
"subscriptions": [
{
"id": "AB_5781227c_1408d2ac22c4d294",
"payment_method": {
"id": "CreditCard_574de06b_32093f9949f7ce81",
"payment_method_type": "CreditCard",
"details": {
"last-digits": "2217"
}
},
"items": [
{
"product": {
"description": "Freeloader product",
"expiration-date": "2016-04-30T00:00:00-07:00",
"id": "some product",
"metadata": {
"ooyalaEntitlementsPrefix": "oo:"
},
"price_plan": {
"cycles": [
{
"cycles": 0,
"period": "Day",
"price": {
"amount": 5,
"currency": "USD"
},
"unit": 1
}
],
"id": "oneday"
},
"status": "Active",
"type": "subscriptions"
}
}
],
"status": {
"status": "active"
},
"billing_start_date": "2016-07-09T09:12:45-07:00",
"price_plan": {
"cycles": [
{
"cycles": 0,
"period": "Day",
"price": {
"amount": 5,
"currency": "USD"
},
"unit": 1
}
],
"id": "oneday"
},
"metadata": {
"next_billing_date_time": "2016-09-09T00:00:00-07:00"
},
"price": null
}
]
}
HTTP status code 400
Bad Request - Billing vendor error.
Body
Type: application/json
Example:
{
"error": {
"code": "BillingVendorError",
"message": "",
"metadata": {
"returnedCode": "400",
"returnedError": "PayPal tx needs to be in AuthPending dispsosition Disposition AuthorizationPending 175140249(10)"
}
}
}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid account token."}
HTTP status code 403
Forbidden - Unauthorized request.
Body
Type: application/json
Example:
{
"error": {
"code": "UnauthorizedBillingRequestError",
"message": "Content.hash is not valid",
"metadata": {
"unauthorizedResource": "Content"
}
}
}
HTTP status code 404
Not found - A resource is not found.
Body
Type: application/json
Example:
{
"error": {
"code": "ResourceNotFound",
"message": "",
"metadata": {
"resourceId": "MIDAS_ybom_DAY",
"resourceName": "Product"
}
}
}
HTTP status code 422
ObjectConversionError - A field is missing, invalid or malformed.
Body
Type: application/json
Example:
{
"error": {
"code": "ObjectConversionError",
"message": "id is empty",
"metadata": {
"dest": "vendor.PaymentMethod",
"field": "payment_method.id",
"source": "ooyala.PaymentMethod"
}
}
}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{
"error": {
"code": "InternalServerError",
"message": "An internal error occurred while processing the request"
}
}


Secured by ooyala-auth
Creates a new subscription or remove or update a specific subscription of the current user previously created.
Helps confirm the payment of a subscription by a hosted page.
Returns a specific subscription for the current user.
Changes the status of a specific subscription for the current user to canceled. Cancellation prevents further renewals. The user’s entitlements remain until the end of the current cycle.
put /v3/accounts/subscriptions/{subscription_id}
Helps confirm the payment of a subscription by a hosted page.
Token generated by the pcode of the provider, account ID of a user under the provider, the API Key of the provider and the API secret of the provider.
URI Parameters
-
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
subscription_id: required (string)
Invoice id for the subscription or one time purchase that was previously created. type: string example: AB_57b77c6b_243a768b7c4e0b68
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"update": {
"type": "string"
},
"subscription": {
"type": "object",
"properties": {
"payment_method": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"details": {
"type": "object",
"properties": {
"token": {
"type": "string"
}
},
"required": [
"token"
]
}
},
"required": [
"type",
"details"
]
}
},
"required": [
"payment_method"
]
}
},
"required": [
"update",
"subscription"
]
}
Example:
{
"update": "authorizePayment",
"subscription": {
"payment_method": {
"type": "Hosted",
"details": {
"token": "eb1ea101f959e6abd40605ab27e3b16c325f851d"
}
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"subscription": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"payment_method": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"payment_method_type": {
"type": "string"
},
"details": {
"type": "object",
"properties": {
"last-digits": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
},
"required": [
"id",
"payment_method_type",
"details"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"expiration-date": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"description": "Metadata requirement is defined by each adapter specification and they are a pair of key and value. ",
"properties": {
"key": {
"type": "Value"
}
}
},
"price_plan": {
"type": "object",
"properties": {
"cycles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cycles": {
"type": "integer"
},
"period": {
"type": "string"
},
"price": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
},
"unit": {
"type": "integer"
}
},
"required": [
"cycles",
"period",
"price",
"unit"
]
}
},
"id": {
"type": "string"
}
},
"required": [
"cycles",
"id"
]
},
"status": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"description",
"expiration-date",
"id",
"price_plan",
"status",
"type"
]
}
},
"required": [
"product"
]
}
},
"status": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
"required": [
"status"
]
},
"billing_start_date": {
"type": "string"
},
"metadata": {
"type": "object",
"description": "Metadata requirement is defined by each adapter specification and they are a pair of key and value. ",
"properties": {
"key": {
"type": "Value"
}
}
},
"price": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
}
},
"required": [
"id",
"payment_method",
"items",
"status",
"billing_start_date",
"price"
]
}
},
"required": [
"subscription"
]
}
Example:
{
"subscription": {
"id": "AB_5781227c_1408d2ac22c4d294",
"payment_method": {
"id": "CreditCard_574de06b_32093f9949f7ce81",
"payment_method_type": "CreditCard",
"details": {
"last-digits": "2217"
}
},
"items": [
{
"product": {
"description": "Freeloader product",
"expiration-date": "2016-04-30T00:00:00-07:00",
"id": "some product",
"metadata": {
"ooyalaEntitlementsPrefix": "oo:"
},
"price_plan": {
"cycles": [
{
"cycles": 0,
"period": "Day",
"price": {
"amount": 5,
"currency": "USD"
},
"unit": 1
}
],
"id": "oneday"
},
"status": "Active",
"type": "subscriptions"
}
}
],
"status": {
"status": "active"
},
"billing_start_date": "2016-07-09T09:12:45-07:00",
"metadata": {
"next_billing_date_time": "2016-09-09T00:00:00-07:00"
},
"price": {
"amount": 15,
"currency": "USD"
}
}
}
HTTP status code 400
Bad Request - Billing vendor error.
Body
Type: application/json
Example:
{
"error": {
"code": "BillingVendorError",
"message": "",
"metadata": {
"returnedCode": "400",
"returnedError": "PayPal tx needs to be in AuthPending dispsosition Disposition AuthorizationPending 175140249(10)"
}
}
}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid account token."}
HTTP status code 403
Forbidden - Unauthorized request.
Body
Type: application/json
Example:
{
"error": {
"code": "UnauthorizedBillingRequestError",
"message": "Content.hash is not valid",
"metadata": {
"unauthorizedResource": "Content"
}
}
}
HTTP status code 404
Not found - A resource is not found.
Body
Type: application/json
Example:
{
"error": {
"code": "ResourceNotFound",
"message": "",
"metadata": {
"resourceId": "MIDAS_ybom_DAY",
"resourceName": "Product"
}
}
}
HTTP status code 422
ObjectConversionError - A field is missing, invalid or malformed.
Body
Type: application/json
Example:
{
"error": {
"code": "ObjectConversionError",
"message": "id is empty",
"metadata": {
"dest": "vendor.PaymentMethod",
"field": "payment_method.id",
"source": "ooyala.PaymentMethod"
}
}
}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{
"error": {
"code": "InternalServerError",
"message": "An internal error occurred while processing the request"
}
}


Secured by ooyala-auth
get /v3/accounts/subscriptions/{subscription_id}
Returns a specific subscription for the current user.
Token generated by the pcode of the provider, account ID of a user under the provider, the API Key of the provider and the API secret of the provider.
URI Parameters
-
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
subscription_id: required (string)
Invoice id for the subscription or one time purchase that was previously created. type: string example: AB_57b77c6b_243a768b7c4e0b68
HTTP status code 200
Body
Type: application/json
Schema:
{
"subscription": {
"id": "AB_57b77c6b_243a768b7c4e0b68",
"payment_method": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"payment_method_type": {
"type": "string"
},
"details": {
"type": "object",
"properties": {
"last-digits": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
},
"required": [
"id",
"payment_method_type",
"details"
]
},
"items": [
{
"product": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"expiration-date": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"description": "Metadata requirement is defined by each adapter specification and they are a pair of key and value. ",
"properties": {
"key": {
"type": "Value"
}
}
},
"price_plan": {
"type": "object",
"properties": {
"cycles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cycles": {
"type": "integer"
},
"period": {
"type": "string"
},
"price": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
},
"unit": {
"type": "integer"
}
},
"required": [
"cycles",
"period",
"price",
"unit"
]
}
},
"id": {
"type": "string"
}
},
"required": [
"cycles",
"id"
]
},
"status": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"description",
"expiration-date",
"id",
"price_plan",
"status",
"type"
]
}
}
],
"status": {
"status": "active"
},
"billing_start_date": "2016-08-19T14:38:52-07:00",
"price_plan": {
"type": "object",
"properties": {
"cycles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cycles": {
"type": "integer"
},
"period": {
"type": "string"
},
"price": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
},
"unit": {
"type": "integer"
}
},
"required": [
"cycles",
"period",
"price",
"unit"
]
}
},
"id": {
"type": "string"
}
},
"required": [
"cycles",
"id"
]
},
"price": null
}
}
Example:
{
"subscription": {
"id": "AB_57b77c6b_243a768b7c4e0b68",
"payment_method": {
"id": "CreditCard_574de06b_32093f9949f7ce81",
"payment_method_type": "CreditCard",
"details": {
"last-digits": "2217"
}
},
"items": [
{
"product": {
"description": "Freeloader product",
"expiration-date": "2016-04-30T00:00:00-07:00",
"id": "some product",
"metadata": {
"ooyalaEntitlementsPrefix": "oo:"
},
"price_plan": {
"cycles": [
{
"cycles": 0,
"period": "Day",
"price": {
"amount": 5,
"currency": "USD"
},
"unit": 1
}
],
"id": "oneday"
},
"status": "Active",
"type": "subscription"
}
}
],
"status": {
"status": "active"
},
"billing_start_date": "2016-08-19T14:38:52-07:00",
"price_plan": {
"cycles": [
{
"cycles": 0,
"period": "Day",
"price": {
"amount": 5,
"currency": "USD"
},
"unit": 1
}
],
"id": "oneday"
},
"price": null
}
}
HTTP status code 400
Bad Request - Billing vendor error.
Body
Type: application/json
Example:
{
"error": {
"code": "BillingVendorError",
"message": "",
"metadata": {
"returnedCode": "400",
"returnedError": "PayPal tx needs to be in AuthPending dispsosition Disposition AuthorizationPending 175140249(10)"
}
}
}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid account token."}
HTTP status code 403
Forbidden - Unauthorized request.
Body
Type: application/json
Example:
{
"error": {
"code": "UnauthorizedBillingRequestError",
"message": "Content.hash is not valid",
"metadata": {
"unauthorizedResource": "Content"
}
}
}
HTTP status code 404
Not found - A resource is not found.
Body
Type: application/json
Example:
{
"error": {
"code": "ResourceNotFound",
"message": "",
"metadata": {
"resourceId": "MIDAS_ybom_DAY",
"resourceName": "Product"
}
}
}
HTTP status code 422
ObjectConversionError - A field is missing, invalid or malformed.
Body
Type: application/json
Example:
{
"error": {
"code": "ObjectConversionError",
"message": "id is empty",
"metadata": {
"dest": "vendor.PaymentMethod",
"field": "payment_method.id",
"source": "ooyala.PaymentMethod"
}
}
}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{
"error": {
"code": "InternalServerError",
"message": "An internal error occurred while processing the request"
}
}


Secured by ooyala-auth
delete /v3/accounts/subscriptions/{subscription_id}
Changes the status of a specific subscription for the current user to canceled. Cancellation prevents further renewals. The user’s entitlements remain until the end of the current cycle.
Token generated by the pcode of the provider, account ID of a user under the provider, the API Key of the provider and the API secret of the provider.
URI Parameters
-
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
subscription_id: required (string)
Invoice id for the subscription or one time purchase that was previously created. type: string example: AB_57b77c6b_243a768b7c4e0b68
HTTP status code 200
Body
Type: application/json
HTTP status code 400
Bad Request - Billing vendor error.
Body
Type: application/json
Example:
{
"error": {
"code": "BillingVendorError",
"message": "",
"metadata": {
"returnedCode": "400",
"returnedError": "PayPal tx needs to be in AuthPending dispsosition Disposition AuthorizationPending 175140249(10)"
}
}
}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid account token."}
HTTP status code 403
Forbidden - Unauthorized request.
Body
Type: application/json
Example:
{
"error": {
"code": "UnauthorizedBillingRequestError",
"message": "Content.hash is not valid",
"metadata": {
"unauthorizedResource": "Content"
}
}
}
HTTP status code 404
Not found - A resource is not found.
Body
Type: application/json
Example:
{
"error": {
"code": "ResourceNotFound",
"message": "",
"metadata": {
"resourceId": "MIDAS_ybom_DAY",
"resourceName": "Product"
}
}
}
HTTP status code 422
ObjectConversionError - A field is missing, invalid or malformed.
Body
Type: application/json
Example:
{
"error": {
"code": "ObjectConversionError",
"message": "id is empty",
"metadata": {
"dest": "vendor.PaymentMethod",
"field": "payment_method.id",
"source": "ooyala.PaymentMethod"
}
}
}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{
"error": {
"code": "InternalServerError",
"message": "An internal error occurred while processing the request"
}
}


Secured by ooyala-auth
Creates an one time charge or returns all the one time charges associated at the current account.
Creates a one-time charge used for Pay-Per-View products.
The hash field in the request must be formed as is shown below.
Create a string with the format:
base64 ( SHA_256( [Assets] + [Labels] + [Offers] , KEY) )
Where:
[Assets] = Asset_1 + Asset_2 + ... + Asset_n
[Labels] = Label_1 + Label_2 + ... + Label_n
[Offers] = Offer_1 + Offer_2 + ... + Offer_n
Each of thease element has this format:
ContentId + ExternalProductID + startTime + endTime + rentalWindow.
KEY = backlot API key.
Returns the history of one-time charges on the current account.
post /v3/accounts/onetime-charges
Creates a one-time charge used for Pay-Per-View products.
The hash field in the request must be formed as is shown below.
Create a string with the format:
base64 ( SHA_256( [Assets] + [Labels] + [Offers] , KEY) )
Where:
[Assets] = Asset_1 + Asset_2 + ... + Asset_n
[Labels] = Label_1 + Label_2 + ... + Label_n
[Offers] = Offer_1 + Offer_2 + ... + Offer_n
Each of thease element has this format:
ContentId + ExternalProductID + startTime + endTime + rentalWindow.
KEY = backlot API key.
Token generated by the pcode of the provider, account ID of a user under the provider, the API Key of the provider and the API secret of the provider.
URI Parameters
-
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"purchase": {
"type": "object",
"properties": {
"payment_method": {
"type": "object",
"properties": {
"payment_method_type": {
"type": "string"
}
},
"required": [
"payment_method_type"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
"content": {
"type": "object",
"properties": {
"hash": {
"type": "string"
},
"offers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"content_id": {
"type": "string"
},
"end_time": {
"type": "string"
},
"external_product_id": {
"type": "string"
},
"rental_window": {
"type": "object",
"properties": {
"hours_to_finish": {
"type": "integer"
}
},
"required": [
"hours_to_finish"
]
},
"start_time": {
"type": "string"
}
}
}
}
},
"required": [
"hash",
"offers"
]
}
}
}
},
"currency": {
"type": "string"
},
"metadata": {
"type": "object",
"description": "Metadata requirement is defined by each adapter specification and they are a pair of key and value. ",
"properties": {
"key": {
"type": "Value"
}
}
}
},
"required": [
"payment_method",
"items",
"currency"
]
}
},
"required": [
"purchase"
]
}
Example:
{
"purchase": {
"payment_method": {
"payment_method_type": "MAP"
},
"items": [
{
"product": {
"id": "MIDAS_PPV_2_DAY"
},
"content": {
"hash": "HDPFDmMhYdwwr0jXGoeBsw9FGOMRwUNntXaIeoy2zoc=",
"offers": [
{
"content_id": "6545954:6541740",
"end_time": "2016-07-03T20:00:27Z",
"external_product_id": "MIDAS_SVOD_BASIC",
"rental_window": {
"hours_to_finish": 48
},
"start_time": "2016-07-01T20:00:27Z"
}
]
}
}
],
"currency": "USD",
"metadata": {
"dry_run": false
}
}
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"purchase": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"expiration-date": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"description": "Metadata requirement is defined by each adapter specification and they are a pair of key and value. ",
"properties": {
"key": {
"type": "Value"
}
}
},
"price_plan": {
"type": "object",
"properties": {
"cycles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cycles": {
"type": "integer"
},
"period": {
"type": "string"
},
"price": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
},
"unit": {
"type": "integer"
}
},
"required": [
"cycles",
"period",
"price",
"unit"
]
}
},
"id": {
"type": "string"
}
},
"required": [
"cycles",
"id"
]
},
"status": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"description",
"expiration-date",
"id",
"price_plan",
"status",
"type"
]
}
},
"required": [
"product"
]
}
},
"payment_method": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"payment_method_type": {
"type": "string"
},
"details": {
"type": "object",
"properties": {
"last-digits": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
},
"required": [
"id",
"payment_method_type",
"details"
]
},
"id": {
"type": "string"
},
"currency": {
"type": "string"
},
"amount": {
"type": "integer"
},
"metadata": {
"type": "object",
"description": "Metadata requirement is defined by each adapter specification and they are a pair of key and value. ",
"properties": {
"key": {
"type": "Value"
}
}
},
"status": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
"required": [
"status"
]
}
},
"required": [
"items",
"payment_method",
"id",
"currency",
"amount",
"status"
]
}
},
"required": [
"purchase"
]
}
Example:
{
"purchase": {
"items": [
{
"product": {
"description": "Freeloader product",
"expiration-date": "2016-04-30T00:00:00-07:00",
"id": "some product",
"metadata": {
"ooyalaEntitlementsPrefix": "oo:"
},
"price_plan": {
"cycles": [
{
"cycles": 0,
"period": "Day",
"price": {
"amount": 5,
"currency": "USD"
},
"unit": 1
}
],
"id": "oneday"
},
"status": "Active",
"type": "pvv"
}
}
],
"payment_method": {
"id": "CreditCard_574de06b_32093f9949f7ce81",
"payment_method_type": "CreditCard",
"details": {
"last-digits": "2217"
}
},
"id": "TX_57bb338f_144419db794209ff",
"currency": "USD",
"amount": 2,
"metadata": {},
"status": {
"status": "active"
}
}
}
HTTP status code 400
Bad Request - Billing vendor error.
Body
Type: application/json
Example:
{
"error": {
"code": "BillingVendorError",
"message": "",
"metadata": {
"returnedCode": "400",
"returnedError": "PayPal tx needs to be in AuthPending dispsosition Disposition AuthorizationPending 175140249(10)"
}
}
}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid account token."}
HTTP status code 403
Forbidden - Unauthorized request.
Body
Type: application/json
Example:
{
"error": {
"code": "UnauthorizedBillingRequestError",
"message": "Content.hash is not valid",
"metadata": {
"unauthorizedResource": "Content"
}
}
}
HTTP status code 404
Not found - A resource is not found.
Body
Type: application/json
Example:
{
"error": {
"code": "ResourceNotFound",
"message": "",
"metadata": {
"resourceId": "MIDAS_ybom_DAY",
"resourceName": "Product"
}
}
}
HTTP status code 422
ObjectConversionError - A field is missing, invalid or malformed.
Body
Type: application/json
Example:
{
"error": {
"code": "ObjectConversionError",
"message": "id is empty",
"metadata": {
"dest": "vendor.PaymentMethod",
"field": "payment_method.id",
"source": "ooyala.PaymentMethod"
}
}
}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{
"error": {
"code": "InternalServerError",
"message": "An internal error occurred while processing the request"
}
}


Secured by ooyala-auth
get /v3/accounts/onetime-charges
Returns the history of one-time charges on the current account.
Token generated by the pcode of the provider, account ID of a user under the provider, the API Key of the provider and the API secret of the provider.
URI Parameters
-
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported. -
pcm_id: required (one of stripe, vindicia)
The custom product catalog manager id,
vindicia
andstripe
are supported. -
bv_id: required (one of stripe, vindicia)
The custom billing vendor id,
vindicia
andstripe
are supported.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"purchases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"expiration-date": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"description": "Metadata requirement is defined by each adapter specification and they are a pair of key and value. ",
"properties": {
"key": {
"type": "Value"
}
}
},
"price_plan": {
"type": "object",
"properties": {
"cycles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cycles": {
"type": "integer"
},
"period": {
"type": "string"
},
"price": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"currency": {
"type": "string"
}
},
"required": [
"amount",
"currency"
]
},
"unit": {
"type": "integer"
}
},
"required": [
"cycles",
"period",
"price",
"unit"
]
}
},
"id": {
"type": "string"
}
},
"required": [
"cycles",
"id"
]
},
"status": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"description",
"expiration-date",
"id",
"price_plan",
"status",
"type"
]
}
},
"required": [
"product"
]
}
},
"payment_method": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"payment_method_type": {
"type": "string"
},
"details": {
"type": "object",
"properties": {
"last-digits": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
},
"required": [
"id",
"payment_method_type",
"details"
]
},
"id": {
"type": "string"
},
"currency": {
"type": "string"
},
"amount": {
"type": "integer"
},
"metadata": {
"type": "object",
"properties": {
"key": {
"type": "string"
}
}
},
"status": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
"required": [
"status"
]
}
},
"required": [
"items",
"payment_method",
"id",
"currency",
"amount",
"status"
]
}
}
},
"required": [
"purchases"
]
}
Example:
{
"purchases": [
{
"items": [
{
"product": {
"description": "Freeloader product",
"expiration-date": "2016-04-30T00:00:00-07:00",
"id": "some product",
"metadata": {
"ooyalaEntitlementsPrefix": "oo:"
},
"price_plan": {
"cycles": [
{
"cycles": 0,
"period": "Day",
"price": {
"amount": 5,
"currency": "USD"
},
"unit": 1
}
],
"id": "oneday"
},
"status": "Active",
"type": "pvv"
}
}
],
"payment_method": {
"id": "CreditCard_574de06b_32093f9949f7ce81",
"payment_method_type": "CreditCard",
"details": {
"last-digits": "2217"
}
},
"id": "OOYALADE00055643",
"currency": "USD",
"amount": 1,
"metadata": {},
"status": {
"status": "active"
}
}
]
}
HTTP status code 400
Bad Request - Billing vendor error.
Body
Type: application/json
Example:
{
"error": {
"code": "BillingVendorError",
"message": "",
"metadata": {
"returnedCode": "400",
"returnedError": "PayPal tx needs to be in AuthPending dispsosition Disposition AuthorizationPending 175140249(10)"
}
}
}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid account token."}
HTTP status code 403
Forbidden - Unauthorized request.
Body
Type: application/json
Example:
{
"error": {
"code": "UnauthorizedBillingRequestError",
"message": "Content.hash is not valid",
"metadata": {
"unauthorizedResource": "Content"
}
}
}
HTTP status code 404
Not found - A resource is not found.
Body
Type: application/json
Example:
{
"error": {
"code": "ResourceNotFound",
"message": "",
"metadata": {
"resourceId": "MIDAS_ybom_DAY",
"resourceName": "Product"
}
}
}
HTTP status code 422
ObjectConversionError - A field is missing, invalid or malformed.
Body
Type: application/json
Example:
{
"error": {
"code": "ObjectConversionError",
"message": "id is empty",
"metadata": {
"dest": "vendor.PaymentMethod",
"field": "payment_method.id",
"source": "ooyala.PaymentMethod"
}
}
}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{
"error": {
"code": "InternalServerError",
"message": "An internal error occurred while processing the request"
}
}

