Manage Shopper Identity

📘

Buy with Prime API is now available for early access

Sign up for early access to the Buy with Prime API using the 'Sign Up' button below. The API may change as Amazon receives feedback and iterates on it.

Some Buy with Prime queries and mutations take (or require) a shopper's Amazon identity token. The identity token enables you to customize the Buy with Prime experience to the shopper on your site, such as display information based on whether the shopper is a Prime member, pre-populate a shipping address at checkout, and provide more accurate delivery estimates on product detail pages. To get an identity token, you can use Login with Amazon (LWA) or Amazon Pay.

Both identity verification approaches (LWA and Amazon Pay) enable shoppers to sign in using their Amazon account credentials, but the approaches differ in terms of checkout flow and which payment options are available to the shopper:

Sandbox shopper identity tokens

In the Buy with Prime sandbox environment, you must use one of the following shopper identity tokens. For details, see Test in a Sandbox Environment.

To use LWA, use the following mock shopper identity tokens:

  • Prime member: eyJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwidmFsdWUiOiJzYW5kYm94LW1vY2tlZC10ZXN0LXByaW1lLXNob3BwZXItYWNjZXNzLXRva2VuIn0=
  • Not a Prime member: eyJ0eXBlIjoiQUNDRVNTX1RPS0VOIiwidmFsdWUiOiJzYW5kYm94LW1vY2tlZC10ZXN0LXByaW1lLXNob3BwZXItYWNjZXNzLXRva2VuIn0=

To use Amazon Pay, use the following mock shopper identity tokens:

  • Prime member: eyJ0eXBlIjoiQ0hFQ0tPVVRfU0VTU0lPTl9JRCIsInZhbHVlIjoic2FuZGJveC1tb2NrZWQtdGVzdC1wcmltZS1zaG9wcGVyLWNoZWNrb3V0LXNlc3Npb24taWQifQ==
  • Not a Prime member: eyJ0eXBlIjoiQ0hFQ0tPVVRfU0VTU0lPTl9JRCIsInZhbHVlIjoic2FuZGJveC1tb2NrZWQtdGVzdC1ub24tcHJpbWUtc2hvcHBlci1jaGVja291dC1zZXNzaW9uLWlkIn0=

Related topics


Did this page help you?