Initial implementation of checkout and createPurchase