ValidateBillingAgreement

Validates the status of the BillingAgreement object and the payment method associated with it.

Description

Call the ValidateBillingAgreement operation when the billing agreement moves to the Open state (that is, after a successful call to the ConfirmBillingAgreement operation). This operation validates the status of the billing agreement and the validity of the payment method associated with the billing agreement.

This operation has a maximum request quota of 10 and a restore rate of one request every second in the production environment. It has a maximum request quota of two and a restore rate of one request every two seconds in the sandbox environment. For definitions of throttling terminology and for a complete explanation of throttling, see Throttling: Limits to how often you can submit requests in the Amazon MWS Developer Guide.

Request Parameters

For more information about the request parameters that are required for all Amazon MWS operations, see Required request parameters in the Amazon MWS Developer Guide.

Parameter Name Required Type Description
AmazonBillingAgreementId Yes xs:string The billing agreement identifier.

This value is retrieved from the Amazon Button, AddressBook, or Wallet widgets.

Response Elements

Element Name Description
ValidationResult Allowed values:
  • Success-Indicates that the validation succeeded.
  • Failure-Indicates that the validation failed.
Type: xs:string
FailureReasonCode Describes the reason for the ValidationResult failure.

Allowed values:
  • InvalidPaymentMethod-The payment method associated with the billing agreement is not valid.
  • ValidationTimedOut-The validation timed out and could not be completed.
Returned only if ValidationResult is Failure.

Type: xs:string
BillingAgreementStatus Indicates the current status of the billing agreement.

Type: BillingAgreementStatus

Examples

Example Query Request


POST /OffAmazonPayments/2013-01-01 HTTP/1.1
Content-Type: x-www-form-urlencoded
Host: mws.amazonservices.com
User-Agent: <Your User Agent Header>

AWSAccessKeyId=AKIAJKYFSJU7PEXAMPLE
&Action=ValidateBillingAgreement
&AmazonBillingAgreementId=C01-8824045-7416542
&MWSAuthToken=amzn.mws.4ea38b7b-f563-7709-4bae-87aeaEXAMPLE
&SellerId=YOUR_SELLER_ID_HERE
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2013-12-11T10%3A38%3A44.000Z
&Version=2013-01-01
&Signature=gP11oEBaaiQdASWsLDyid18Wn%2BB%2FKZQQtKgpHCtEXAMPLE
    

Example Response


<ValidateBillingAgreementResponse
  xmlns="https://mws.amazonservices.com/
        schema/OffAmazonPayments_Sandbox/2013-01-01">
<ValidateBillingAgreementResult>
  <ValidationResult>Failure</ValidationResult>
  <FailureReasonCode>InvalidPaymentMethod</FailureReasonCode>
  <BillingAgreementStatus>
    <LastUpdateTimestamp>2013-12-05T00:21:19Z</LastUpdateTimestamp>
    <State>Suspended</State>
    <ReasonCode>InvalidPaymentMethod</ReasonCode>
    <ReasonDescription>Payment method is not valid.</ReasonDescription>
  </BillingAgreementStatus>
</ValidateBillingAgreementResult>
<ResponseMetadata>
  <RequestId>f42df4b1-8047-11df-8d5c-bf56a38ef3b4</RequestId>
</ResponseMetadata>
</ValidateBillingAgreementResponse>