Initiate the purchase of a digital good.


#include <bps/paymentservice.h>
BPS_API int paymentservice_purchase_request_with_arguments(purchase_arguments_t *purchase_arguments)


BlackBerry 10.0.0



The set of arguments to use for the purchase.


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


The paymentservice_purchase_request_with_arguments() function initiates the purchase of a digital good, using the contents of the provided purchase_arguments_t as its arguments.

A purchase_arguments_t can be acquired via paymentservice_purchase_arguments_create() and populated using the various paymentservice_purchase_arguments_set functions.

See the paymentservice_purchase_request() function for more details on requirements and options for purchase arguments.

In addition to the arguments outlined in the paymentservice_purchase_request() function, extra parameters can be attached to a purchase_arguments_t using the paymentservice_purchase_arguments_set_extra_parameter(). These extra parameters are only relevant to the initial purchase (and would no longer be present, for example, in a GET_EXISTING_PURCHASE_RESPONSE). Input and output (see paymentservice_purchase_request()) parameters may not be directly related (i.e. output parameters may be present in the PURCHASE_RESPONSE where none were input, or vice versa).

Once a purchase has been initiated, the purchase_arguments_t must be freed using paymentservice_purchase_arguments_destroy().


BPS_SUCCESS upon success, BPS_FAILURE with errno value set otherwise.

Last modified: 2014-05-14

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

comments powered by Disqus