Merci de votre visite. Cette page est disponible en anglais uniquement.

Delegated authorization

Add an Authorization token as a header when calling Amazon Pay APIs to make delegated requests on behalf of other another party. The header key is: X-Amz-Pay-AuthToken.

Supported operations:

Create Authorization Token - GET https://pay-api.amazon.com/:version/authorizationTokens/:mwsAuthToken?merchantId=:merchantId

Create Authorization Token - GET https://pay-api.amazon.eu/:version/authorizationTokens/:mwsAuthToken?merchantId=:merchantId

Create Authorization Token - GET https://pay-api.amazon.jp/:version/authorizationTokens/:mwsAuthToken?merchantId=:merchantId

Create Authorization Token

Create Authorization Token to exchange a mwsAuthToken for an Authorization token.

Request

Request body

curl "https://pay-api.amazon.com/:version/authorizationTokens/:mwsAuthToken?merchantId=:merchantId"
-X GET
-H Authorization: AMZN-PAY-RSASSA-PSS-V2 PublicKeyId=f4fc06fc-c5a7-11e7-abc4-cec278b6b50a, SignedHeaders=content-type;x-amz-pay-date;x-amz-pay-region, Signature=4164128ec5d1b9da1700167ab2ccda8125f472c8bb9de447cebf5d741ee317c8

Request parameters

Name
Location
Description
mwsAuthToken
(required)

Type: string
Path Parameter
The MWS Auth Token that the solution provider currently uses to make V1 API calls on behalf of the merchant.
merchantId
(required)

Type: string
Query Parameter
The Amazon Pay merchant Id.

Response

Returns HTTP 200 (OK) status if the operation was successful.

HTTP/1.1 200 OK 
Host: pay-api.amazon.com
Content-type: application/json
{
  "authorizationToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

Error codes

Generic errors can be found here.

HTTP status code
Reason code
Error description
400 InvalidHeaderValue You submitted an invalid value for at least one of the header parameters of your API call.

For details, check the message element in the API response.
400 InvalidParameterValue You submitted an invalid value for at least one of the parameters of your API call.

For details, check the message element in the API response.
400 InvalidRequestFormat You submitted a request in invalid JSON format. Please validate request body format.
401 UnauthorizedAccess The specified seller account is not authorized to execute this request.
403 InvalidRequestSignature The signature in the Authorization header of your API call is invalid.

For details, check the message element in the API response.
403 InvalidAuthorizationToken The token and merchantId combination specified is invalid.
404 ResourceNotFound Couldn’t find requested resource.
405 RequestNotSupported HTTP method not supported.

For details, check the message element in the API response.
500 InternalServerError There was an unknown error in the service.
503 ServiceUnavailable The service is currently unable to handle the request, due to a temporary overloading or maintenance.