After a successful checkout, Get Charge Permission to retrieve buyer info and their shipping address. You can only retrieve details for 30 days after the time that a one time Charge Permission is created. See the API reference guide for more details.
Note: If your publicKeyId does not have an environment prefix (does not begin with 'SANDBOX' or 'LIVE') follow these instructions instead.
Note: If your publicKeyId has an environment prefix (for example: SANDBOX-AFVX7ULWSGBZ5535PCUQOY7B) follow these instructions instead.
Request
curl "https://pay-api.amazon.com/:version/chargePermissions/:chargePermissionId"
-X GET
-H "authorization:Px2e5oHhQZ88vVhc0DO%2FsShHj8MDDg%3DEXAMPLESIGNATURE"
-H "x-amz-pay-date:20201012T235046Z"
curl "https://pay-api.amazon.com/:environment/:version/chargePermissions/:chargePermissionId"
-X GET
-H "authorization:Px2e5oHhQZ88vVhc0DO%2FsShHj8MDDg%3DEXAMPLESIGNATURE"
-H "x-amz-pay-date:20201012T235046Z"
using Amazon.Pay.API.Types;
using Amazon.Pay.API.WebStore;
using Amazon.Pay.API.WebStore.Types;
using Amazon.Pay.API.WebStore.ChargePermission;
public class Sample
{
public WebStoreClient InitiateClient()
{
// set up config
var payConfiguration = new ApiConfiguration
(
region: Region.YOUR_REGION_CODE,
publicKeyId: "YOUR_PUBLIC_KEY_ID",
privateKey: "PATH_OR_CONTENT_OF_YOUR_PRIVATE_KEY",
algorithm: AmazonSignatureAlgorithm.V2
);
// init API client
var client = new WebStoreClient(payConfiguration);
return client;
}
public void GetChargePermission()
{
// prepare the request
var chargePermissionId = "S01-5105180-3221187";
// send the request
ChargePermissionResponse result = client.GetChargePermission(chargePermissionId);
// check if API call was successful
if (!result.Success)
{
// handle the API error (use Status field to get the numeric error code)
}
// do something with the result, for instance:
State chargePermissionState = result.StatusDetails.State;
DateTime chargePermissionExpiryDate = result.ExpirationTimestamp;
Address buyerAddress = result.BillingAddress;
}
}
using Amazon.Pay.API.Types;
using Amazon.Pay.API.WebStore;
using Amazon.Pay.API.WebStore.Types;
using Amazon.Pay.API.WebStore.ChargePermission;
public class Sample
{
public WebStoreClient InitiateClient()
{
// set up config
var payConfiguration = new ApiConfiguration
(
region: Region.YOUR_REGION_CODE,
environment: Environment.Sandbox,
publicKeyId: "YOUR_PUBLIC_KEY_ID",
privateKey: "PATH_OR_CONTENT_OF_YOUR_PRIVATE_KEY",
algorithm: AmazonSignatureAlgorithm.V2
);
// init API client
var client = new WebStoreClient(payConfiguration);
return client;
}
public void GetChargePermission()
{
// prepare the request
var chargePermissionId = "S01-5105180-3221187";
// send the request
ChargePermissionResponse result = client.GetChargePermission(chargePermissionId);
// check if API call was successful
if (!result.Success)
{
// handle the API error (use Status field to get the numeric error code)
}
// do something with the result, for instance:
State chargePermissionState = result.StatusDetails.State;
DateTime chargePermissionExpiryDate = result.ExpirationTimestamp;
Address buyerAddress = result.BillingAddress;
}
}