Retrieve the unique ID of a purchase.


#include <bps/paymentservice.h>
BPS_API const char* paymentservice_event_get_purchase_id(bps_event_t *event,
                                                         unsigned int index)


BlackBerry 10.0.0



The event containing the array of existing purchases.


The index into the array of existing purchases. You can specify an index value that ranges from zero to the number of purchases minus one. You can retrieve the number of purchases using the paymentservice_event_get_number_purchases() function.


libbps (For the qcc command, use the -l bps option to link against this library)


The paymentservice_event_get_purchase_id() function retrieves the unique ID of a purchase. A purchase ID is generated when a user purchases an app or subscription, or when a subscription renewal takes place. Each purchase ID has a corresponding transaction ID that represents the transfer of funds for that purchase. The purchase ID for the initial purchase is required in order to cancel a subscription. You cannot use the purchase ID of a subscription renewal to cancel a subscription. See paymentservice_cancel_subscription() for more information on canceling a subscription.


The unique ID of the purchase.

Last modified: 2014-09-30

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

comments powered by Disqus