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

Update info post-checkout

Call Update Charge Permission to update external merchant metadata or the recurringMetadata if subscription details change post-checkout. You can update merchantMetadata child parameters multiple times if the Charge Permission is in a Chargeable or NonChargeable state. You can update merchantMetadata child parameters if the Charge Permission is in a Closed state only if chargePermissionType is Onetime and if the child parameter value to be updated is either null or an empty string. Note that buyer communication will not reflect the updated value if the Charge Permission is in a Closed state.

Request

Request body

{
     "merchantMetadata": {
        "merchantReferenceId": "123-77-876", 
        "merchantStoreName": "AmazonTestStoreFront",
        "noteToBuyer": "merchantNoteForBuyer",
        "customInformation": "This is custom information"  
    },
     "recurringMetadata": {
        "frequency": { 
            "unit": "Month", 
            "value": "1" 
        },
        "amount": { 
            "amount": "14",
            "currencyCode": "USD"
        }
    }
}

Request parameters

Name
Location
Description
chargePermissionId
(required)

Type: string
Path Parameter
Charge Permission identifier
recurringMetadata

Type: recurringMetadata
Body
Metadata about how the recurring Charge Permission will be used. Amazon Pay only uses this information to calculate the Charge Permission expiration date and in buyer communication

Note that it is still your responsibility to call Create Charge to charge the buyer for each billing cycle
merchantMetadata

Type: merchantMetadata
Body
Merchant-provided order details

See update info post-checkout for limits to how many times this value can be modified

Sample Code

Response

{
    "chargePermissionId": "S01-5105180-3221187",
    "chargePermissionReferenceId": null,
    "chargePermissionType": "Recurring",   
    "recurringMetadata": {
        "frequency": {
            "unit": "Month",
            "value": "1" 
        },
        "amount": {
            "amount": "14",
            "currencyCode": "USD"
        }
    },
    "buyer": {
        "buyerId": "buyerId",
        "name": "name-1",
        "email": "name@amazon.com",
        "phoneNumber": "800-000-0000",
        "primeMembershipTypes": null
    },
    "releaseEnvironment": "Live",
    "shippingAddress":{  // Null for PayOnly product type
        "name": "Work",
        "addressLine1": "440 Terry Ave",
        "addressLine2": "",
        "addressLine3": "",
        "city": "Seattle",
        "county": "King",
        "district": "Seattle",
        "stateOrRegion": "WA",
        "postalCode": "98121",
        "countryCode": "US",
        "phoneNumber": "800-000-0000"
    },
    "billingAddress": {  
        "name": "Work",
        "addressLine1": "440 Terry Ave",
        "addressLine2": "",
        "addressLine3": "",
        "city": "Seattle",
        "county": "King",
        "district": "Seattle",
        "stateOrRegion": "WA",
        "postalCode": "98121",
        "countryCode": "US",
        "phoneNumber": "800-000-0000"
    },
    "paymentPreferences": [
    {
        "paymentDescriptor": null
    }],
    "statusDetails": {
        "state": "Chargeable",
        "reasons": null,
        "lastUpdatedTimestamp": "20190714T155300Z"
    },
    "creationTimestamp": "20190714T155300Z",
    "expirationTimestamp": "20190715T155300Z",
    "merchantMetadata": {
        "merchantReferenceId": "123-77-876", 
        "merchantStoreName": "AmazonTestStoreFront",
        "noteToBuyer": "merchantNoteForBuyer",
        "customInformation": "This is custom information"  
    },
    "platformId": "SPId",
    "limits": {
        "amountLimit": {
            "amount": "14.00",
            "currencyCode": "USD"
        },
        "amountBalance": {
            "amount": "14.00",
            "currencyCode": "USD"
        }
    },
    "presentmentCurrency": "USD"
}