void blackberry.payment.checkExisting(args, onSuccess, onFailure)


args {Object}

Contains information that describes the digital good. One of ID or SKU needs to be specified, and if both are specified, the ID takes precedence and SKU will be ignored.

id {String}

ID of the digital good


SKU of the digital good

onSuccess {Function}

Function to be invoked on successful call

data.subscriptionExists {Boolean}

True if the cancellation was successful.

onFailure {Function}

Function to be called when an error occurs.

error {PaymentError}

A PaymentError object containing details about the error.


<script type="text/javascript">

    function checkSubscription() {
        try {
                id": 12345"
            }, onSuccess, onFailure);
        } catch (e) {
            alert ("Error" + e);

    function onSuccess(data) {
        alert("User is " + (data.subscriptionExists ? "" : "not ") + "subscribed to the item.");

    function onFailure(error) {
        alert("Error occurred: " + error.errorText + ", " + error.errorID);


Last modified: 2014-03-10

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus