Skip to main content

Object and API

Diagram is horizontal, and flows from left to right. Scroll the diagram to the right to see all flow.

Merchant site
● ● ●
Sign in
Amazon Pay
● ● ●
Signed in!
Amazon Pay Hosted page
Merchant
Objects and APIs related to Amazon SignIn
Account information
Buyer
(buyerId)
API
Get Buyer

There is only one object appear in above diagram. Buyer means Amazon account holder.


Buyer

Pleae read Basics - Object - Buyer for detai.


API

There is only one API for Buyer.

Get Buyer

?

When do I use Get Buyer?

When the buyer clicks Amazon SignIn button, the buyer is redirected to Amazon Pay Hosted page.

After siged in, Amazon Pay returns buyerToken so you use this buyerToken to call Get Buyer API, and obtain buyer information.

You will render buyer information on the site or store it in your member database.

tip

Assuming merchant signInReturnUrl is https://anyurl.com/signIn/, Amazon Pay adds buyerToken as URL parameter like below.

i.e. https://anyurl.com/signIn/? buyerToken=eyJ6aXAiOiJERUYiLCJlbmMiOiJBMjU...

Note buyer data is also returned in response of APIs in checkout flow.