Purchase manually
Purchasely provides customizable presentation templates you but if you want to create your own and only use Purchasely for handling the purchase process you can. We offer methods to:
Get a product
Get a plan
Get a users subscriptions
Purchase a product
Restore all products
Getting all products
Purchasely.allProducts(success: { (products) in
// Returns an array of products and its available plans
}, failure: { (error) in
// Display error
})[Purchasely allProductsWithSuccess:^(NSArray<PLYProduct *> * _Nonnull products) {
NSLog(@"%ld products available", products.count);
}
failure:^(NSError * _Nullable error) {
NSLog(@"Error %@", error);
}];Purchasely.allProducts(
onSuccess = { products ->
// Returns an array of products and its available plans
},
onError = {
// display error
}
)Purchasely.allProducts(new ProductsListener() {
@Override
public void onSuccess(@NonNull List<PLYProduct> list) {
// Returns an array of products and its available plans
}
@Override
public void onFailure(@NonNull Throwable throwable) {
// Display error
}
});Getting a product
Purchasely.product(with: "PRODUCT_VENDOR_ID", success: { (product) in
// Returns a product and its available plans
}, failure: { (error) in
// Display error
})[Purchasely productWith:@"PRODUCT_VENDOR_ID" success:^(PLYProduct * _Nonnull) {
// Display the product and its plans
} failure:^(NSError * _Nullable) {
// Display error
}];Purchasely.product("PRODUCT_VENDOR_ID",
onSuccess = { product ->
// Returns a product and its available plans
},
onError = { throwable ->
//display an error
}
)Purchasely.product("PRODUCT_VENDOR_ID", new ProductListener() {
@Override
public void onSuccess(@Nullable PLYProduct product) {
// Returns a product and its available plans
}
@Override
public void onFailure(@NotNull Throwable throwable) {
//display an error
}
});Getting a plan
Purchasing a plan
Restoring all products
Getting user subscriptions
Last updated
Was this helpful?