API Class Updates

Fixed javascript confirms + pass the order reference with initial order
if available