UPS-API / api-documentation

MIT License
32 stars 19 forks source link

Configuration for using default payment method on users UPS account #114

Closed jareko999 closed 1 month ago

jareko999 commented 1 month ago

Our software allows users to connect their UPS accounts and print labels through our app. What I'm not clear on, is how to use the default payment method under their UPS account to purchase labels. I noticed

PaymentInformation: {
     ShipmentCharge: {
        Type: '01',
        BillShipper: { AccountNumber: accountNumber },
     },
},

But am I considered the Shipper in our use case? If they're the "Shipper", I didn't see a way to access the 6 digit account number, only our own in the Developer app settings, which is why I assumed we were the "Shipper". I just want to know what the configuration is for having our users use their connected UPS accounts to pay for labels, pickups, etc.

jareko999 commented 1 month ago

@UPSRahul Any advice here would be greatly appreciated.

jareko999 commented 1 month ago

Or @UPSCadeCreech? May seem like a dumb question, but I guess I'm unclear on the purpose of OAuth'ing with UPS if you can't use the connected accounts own default payment method to purchase labels.

UPSRahul commented 1 month ago

Hi, your users will need to enter their UPS credentials into your system and your system needs to use the AuthCode flow. This will allow your users to be the shipper and authorized user.

jareko999 commented 1 month ago

Credentials meaning their account number, correct? That’s required during a shipmentrequest, but we can’t get that during authentication. So they just add it manually. Not ideal but it works. I’m guessing the account number must be tied to the access token in some way? Otherwise anyone could use the account number?

On May 15, 2024 at 12:57 PM, <UPSRahul @.***)> wrote:

Hi, your users will need to enter their UPS credentials into your system and your system needs to use the AuthCode flow. This will allow your users to be the shipper and authorized user.

— Reply to this email directly, view it on GitHub (https://github.com/UPS-API/api-documentation/issues/114#issuecomment-2113032812), or unsubscribe (https://github.com/notifications/unsubscribe-auth/ADJCE6EV3N4A5MP3WNKGRO3ZCOHYPAVCNFSM6AAAAABHNHOBHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJTGAZTEOBRGI). You are receiving this because you authored the thread.Message ID: @.***>