Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Venmo API request fails with error 2 Invalid Recipient #70

Open
scottrichards opened this issue Apr 11, 2015 · 3 comments
Open

Venmo API request fails with error 2 Invalid Recipient #70

scottrichards opened this issue Apr 11, 2015 · 3 comments

Comments

@scottrichards
Copy link

I am using the iOS SDK and everything works fine when I use the VenMo App to make a payment. But when I try to make a payment with the VenMO API directly it fails with the following error:

error NSError * domain: @"com.venmo.VenmoSDK.ErrorDomain" - code: 2 0x7ae266e0
"Please enter a valid phone, email, username, or Venmo user ID"
"Invalid recipient"

Following is how I am invoking the sendPaymentTo method:

 [[Venmo sharedInstance] sendPaymentTo:self.toTextField.text
                                       amount:self.amountTextField.text.floatValue*100
                                         note:self.noteTextField.text
                            completionHandler:handler];

I made sure that I had successfully requested permission before making this call as follows:

- (IBAction)doLogin:(id)sender {
    [[Venmo sharedInstance] requestPermissions:@[VENPermissionMakePayments,
                                                 VENPermissionAccessProfile]
                         withCompletionHandler:^(BOOL success, NSError *error) {
                             if (success) {
                                 NSLog(@"Permssion to VENMO Granted!!!");
                                 [self presentLoggedInVC];
                             }
                             else {
                                 UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Authorization failed"
                                                                                     message:error.localizedDescription
                                                                                    delegate:self
                                                                           cancelButtonTitle:nil
                                                                           otherButtonTitles:@"OK", nil];
                                 [alertView show];

                             }
                         }];

}
@eliperkins
Copy link

Hm... what is the value of self.toTextField.text? This sounds like you're trying to send a payment to some user, email, phone number, etc., that does not exist.

@scottrichards
Copy link
Author

The value of the self.toTextField.text is "winstonlw" this is a valid venmo user. It works fine doing a payment to this username when I use the Venmo application, just not using the Venmo API.

@jykoko
Copy link

jykoko commented Jan 8, 2016

Any update on this issue? I am having the same problem. Valid user name, and it only occurs using the API rather than App Switch. I am using Swift. It works when I pass a phone number, rather than a user.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants