Error in add new credit card

79 views
Skip to first unread message

darshan khatri

unread,
May 6, 2016, 10:55:37 AM5/6/16
to deliverydotcom API V2
Hi Guys,

I am trying to use a credit card redirect call but i am receiving a response saying URI isnt matched, but i checked i have the same URI in the account settings. 


Please help.

darshan khatri

unread,
May 10, 2016, 12:55:15 AM5/10/16
to deliverydotcom API V2
Can anyone please help me here?? 

Greg Solak

unread,
May 10, 2016, 12:53:43 PM5/10/16
to deliverydotcom API V2
Hi Darshan:

Thanks for posting on the API forums.

I took a closer look. it seems as though you are missing the scope parameter. Pass in "scope=global" to trigger a proper response. Here is the full request. Notice how I stripped the client_id - you will need to add it back in.


The request is returning a 200 response.

Also - note that this endpoint (unlike all the other endpoints) will return html.

Best.
delivery.com API Support Team

 


darshan khatri

unread,
May 11, 2016, 2:15:03 AM5/11/16
to deliverydotcom API V2
Hi Greg,

Thanks for responding, however that has resolved the issue but i am getting another issue here. 

It says authorization required but i am sending correct access token in the header field. 

can you please check?


darshan khatri

unread,
May 12, 2016, 7:09:30 AM5/12/16
to deliverydotcom API V2
Hi greg,

can you please help me here, its the last step i need to complete.

darshan khatri

unread,
May 13, 2016, 6:10:53 AM5/13/16
to deliverydotcom API V2
If anyone can look into this, it will be great help as this is the only blocker for us to complete the app.

darshan khatri

unread,
May 18, 2016, 8:07:04 AM5/18/16
to deliverydotcom API V2, Sixuan Liu, Greg Solak
Can you guys please help me here?? 

hzh...@delivery.com

unread,
May 18, 2016, 2:31:36 PM5/18/16
to deliverydotcom API V2, sl...@delivery.com, gso...@delivery.com
Hi Darshan,

Actually, authorization required message is expected.

We are using OAuth 2.0 for authenticate. When we need user to input sensitive information (login and add credit card), the user will be redirected to our site for corresponding actions (Same flow as Facebook login).



Best,
Delivery.com API Support  

darshan khatri

unread,
May 19, 2016, 5:10:35 AM5/19/16
to deliverydotcom API V2, sl...@delivery.com, gso...@delivery.com
Hello,

But we already done a login and attaching a access token within a call so that it returns us the add credit card HTML.  what is wrong here? if we have to do the login again what is hte point of sending access token?

darshan khatri

unread,
May 20, 2016, 2:22:55 AM5/20/16
to deliverydotcom API V2, sl...@delivery.com, gso...@delivery.com
Hello,

i am waiting for a response here?

hzh...@delivery.com

unread,
May 20, 2016, 2:25:13 PM5/20/16
to deliverydotcom API V2, sl...@delivery.com, gso...@delivery.com
Hi Darshan,

This flow is session based.  If previously you've sent user to login page, then the session is saved. Or else it's required to ask user to login at our site.

In this flow, authorization header really doesn't work.

Best,
Haiyang

darshan khatri

unread,
May 21, 2016, 1:09:46 AM5/21/16
to deliverydotcom API V2, sl...@delivery.com, gso...@delivery.com
Hi,

we are using password flow authentication to do a login and obtain a access token,  how can we allow to add credit card with this flow? 

please help here.

Sixuan Liu

unread,
May 23, 2016, 10:42:19 AM5/23/16
to deliverydotcom API V2, sl...@delivery.com, gso...@delivery.com
Hi Darshan,

If you're on a password flow. You would post to url /customer/cc Here's screenshot of a working example. However you would need a actual valid credit card, because it's pointing to our prod environment. 



Please let us know if you have more questions.

Sixuan


darshan khatri

unread,
May 24, 2016, 3:11:49 AM5/24/16
to deliverydotcom API V2, sl...@delivery.com, gso...@delivery.com
Hi Sixuan,

thank you so much for your answer, this is working.

thanks

gregory hutchinson

unread,
Oct 7, 2016, 2:02:05 AM10/7/16
to deliverydotcom API V2, sl...@delivery.com, gso...@delivery.com
sorry to bump an older thread...

but I'm on password flow and still on web add credit card -- want to talk steps to get access for this
or steps to figure out best way to handle the issue of mixed password flow and web add payment (as I'm not sure there is a way to pass auth from password flow to web session for adding a payment from iOS app for your use case here)
the issue is you only allow one login session per user and login in via web to add payment invalidates the user in my iOS app... any thoughts on this?
or is the only fix to discuss the steps for payment flow with you and move in that direction?

thanks!

{
 
"status": 403,
 
"error": "forbidden",
 
"error_message": "Only access token with scope payment can use this endpoint"
}

Reply all
Reply to author
Forward
0 new messages