         
     }
     
-    public func requestToken(requestObject: OmiseRequestObject, onCompletion: Callback)  {
+    public func requestToken(requestObject: OmiseRequestObject, onCompletion completion: ((OmiseToken?, NSError?) -> Void)) {
+        
+        self.callback = completion
+        
         guard let urlRequest = createURLRequest(requestObject) else {
-            return
+            let error = OmiseError.UnexpectedError("Error can't create url request")
+            return completion(nil, error)
         }
         
         let session = NSURLSession.sharedSession()
-        self.callback = onCompletion
         let task = session.dataTaskWithRequest(urlRequest, completionHandler: didCompleteWithCallBack)
         task.resume()
     }
     
     private func didCompleteWithDelegate(data: NSData?, response: NSURLResponse?, error: NSError?) {
         guard let delegate = delegate else {
-            print("Please set delegate before request token")
+            OmiseWarning.SDKWarning("Please set delegate before request token")
             return
         }
         

            return (token, nil)
            
        default:
            print("unrecognized HTTP status code: \(httpResponse.statusCode)")
            return (nil,nil)
        }
    }

    
    private func didCompleteWithCallBack(data: NSData?, response: NSURLResponse?, error: NSError?) {
        guard let callback = callback else {
            OmiseWarning.SDKWarning("Callback is null")
            return
        }
        
