Menu
Amazon DevPay
Developer Guide (API Version 2007-12-01)

VerifyProductSubscriptionByPid

Description

The VerifyProductSubscriptionByPid action lets you verify whether a customer who purchased your product is actively subscribed to the product (e.g., and hasn't canceled). To use this action, you must have previously requested ActivateHostedProduct to get a persistent identifier (PID) for the customer.

Request Authentication

Requests for VerifyProductSubscriptionByPid must be made over HTTPS and authenticated by AWS. For more information, see Authentication of REST-Query Requests (for REST-Query) or Authentication of SOAP Requests (for SOAP).

Request Parameters

Name Description Required

Action

The License Service action to perform. Set this to VerifyProductSubscriptionByPid.

Type: String

Default: None

Condition: Required for REST-Query requests (for more information, see REST-Query Requests). For SOAP requests, the action is automatically indicated in the SOAP request's root element (for more information, see SOAP Requests).

Conditional

AWSAccessKeyId

Your Access Key ID. For more information, see Your AWS Access Credentials.

Type: String

Default: None

Condition: Required for REST-Query requests. Not applicable to SOAP requests.

Conditional

Expires

The date and time at which the signature included in the request expires.

Type: String in the format YYYY-MM-DDThh:mm:ssZ, as specified in the ISO 8601 standard.

Default: None

Condition: REST-Query requests must include either the Timestamp parameter or the Expires parameter, but not both. For information about handling message expiration for SOAP requests, see Message Expiration.

Conditional

PersistentIdentifier

The customer's PID.

Type: String

Default: None

Yes

ProductCode

The product code for your product, which you obtained during product registration. For more information, see Registering Your Product.

Type: String

Default: None

Yes

Signature

A request signature. For more information, see Calculating an HMAC-SHA1 Request Signature.

Type: String

Default: None

Condition: Required for REST-Query requests. Not applicable to SOAP requests.

Conditional

SignatureVersion

A legacy parameter AWS requires. Set this value to 1.

Type: String

Default: None

Condition: Required for REST-Query requests. Not applicable to SOAP requests.

Conditional

Timestamp

The date and time the request is signed.

Type: String in the format YYYY-MM-DDThh:mm:ssZ, as specified in the ISO 8601 standard.

Default: None

Condition: Authenticated REST-Query requests must include either the Timestamp parameter or the Expires parameter, but not both. For information about handling message expiration for SOAP requests, see Message Expiration.

Conditional

Version

The version of the API to use. For example: 2008-04-28

Type: String

Default: 2007-06-05

Condition: Highly recommended for REST-Query requests. Not applicable to SOAP requests (the API version is indicated in the namespace).

Conditional

Response Elements

The response to this action contains the following elements in addition to the elements returned in all successful responses. For more information, see Structure of a Successful Response.

Name Description

Subscribed

Whether the customer is currently subscribed to your product.

Type: Boolean

Valid Values: true | false

Ancestor: VerifyProductSubscriptionByPidResult

Errors

The errors listed in the following table are returned in addition to the errors returned by all actions. For more information, see Errors.

Important

We might throttle requests to the License Service as necessary. When we throttle, we return a 503 (service unavailable) HTTP status code. Your system should be prepared to retry any request that receives a 503 code.

Name Description

InvalidPersistentIdentifier

The persistent identifier (PID) is invalid or malformed.

InvalidProductToken

The product token is invalid for the signer.

Action to take: Make sure you have copied the product token correctly. You can view the product token for your product at any time by clicking View Product Details on your DevPay Activity page (at http://aws.amazon.com/devpayactivity).

MissingPersistentIdentifier

The request is missing the required parameter PersistentIdentifier.

MissingProductToken

The request is missing the required parameter ProductToken.

Examples

The following example REST-Query request verifies if a customer is still subscribed to the product.

Sample Request

https://ls.amazonaws.com/
?Action=VerifyProductSubscriptionByPid
&PersistentIdentifier=PMNGLKRRYHLOXDQKEMKLEXAMPLE
&ProductCode=774F4FF8
&Version=2008-04-28
&AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE
&Timestamp=2008-05-19T12:00:00Z
&Signature=Dqlp3Sd6ljTUA9Uf6SGtEExwUQEEXAMPLE=
&SignatureVersion=1

Sample Response

<VerifyProductSubscriptionByPidResponse>
   <VerifyProductSubscriptionByPidResult>
      <Subscribed>
         true
      </Subscribed>
   </VerifyProductSubscriptionByPidResult>
   <ResponseMetadata>
      <RequestId>
         cb919c0a-9bce-4afe-9b48-9bdf2412bb67
      </RequestId>
   </ResponseMetadata>
</VerifyProductSubscriptionByPidResponse>