Amazon Flexible Payments Service
API Reference (API Version 2010-08-28)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

GetDebtBalance

Description

The GetDebtBalance action retrieves the balance of a credit instrument. You can query for the debt balance only on the instruments for which you are the sender or the recipient.

This action appears in the Aggregated Quick Start.

Request Parameters

ParameterDescriptionRequired

CreditInstrumentId

ID for the postpaid credit instrument to query.

Type: String

Default: None

Max Size: 128 Bytes

Yes

For REST requests, you must also include parameters that are common to all requests. These parameters are included by default in SOAP requests. For more information, see Common Request Parameters.

Response Elements

ElementDescription

DebtBalance

Specifies the available balance on this account.

Type: DebtBalance

Responses also include elements common to all responses. For more information, see Common Response Elements.

Examples

Sample REST Request

https://fps.sandbox.amazonaws.com?
Action=GetDebtBalance
&AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE
&CreditInstrumentId=553IBMFCG7Z8J4D1H7BB3HMNPFQQUPVUNT8RHCT1AXDJNXE6LJZ4KSKU2PI1TTIG
&Signature=4nwBSR0wrlBcy%2BWZz08TXcnGth1Qbln15IxocPDNukQ%3D
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2009-10-07T11%3A20%3A33.609Z
&Version=2008-09-17

Sample SOAP Request

<SOAP-ENV:Body 
  wsu:Id="body" 
xmlns:wsu=
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <ns2:GetDebtBalance xmlns:ns2="http://fps.amazonaws.com/doc/2008-09-17/">
     <ns2:CreditInstrumentId>
      J398G1HA5XJRX4843JGZSTMYEZVPJ7YEARXBPCFIGJ9M4UDUMXXGXJCEBKCGI9N6
     </ns2:CreditInstrumentId>
   </ns2:GetDebtBalance>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sample Response to REST Request

<GetDebtBalanceResponse xmlns="http://fps.amazonaws.com/doc/2008-09-17/">
  <GetDebtBalanceResult>
    <DebtBalance>
      <AvailableBalance>
        <CurrencyCode>USD</CurrencyCode>
        <Value>5.000000</Value>
      </AvailableBalance>
      <PendingOutBalance>
        <CurrencyCode>USD</CurrencyCode>
        <Value>0.000000</Value>
      </PendingOutBalance>
    </DebtBalance>
  </GetDebtBalanceResult>
  <ResponseMetadata>
    <RequestId>73f8efcd-0ea3-4015-b7da-5da1b1111b82:0</RequestId>
  </ResponseMetadata>
</GetDebtBalanceResponse>

Sample Response to SOAP Request

 <SOAP-ENV:Header>
   <wsa:RelatesTo xmlns:wsa="http://www.w3.org/2005/08/addressing">
    MESSAGE123
    </wsa:RelatesTo>
   <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">
    http://www.w3.org/2005/08/addressing/anonymous
   </wsa:To>
   <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">
    GetDebtBalance:Response
   </wsa:Action>
   <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">
    urn:uuid:d7d45a93-8699-4042-a014-0ae0b8102b07
   </wsa:MessageID>
 </SOAP-ENV:Header>
 <SOAP-ENV:Body>
   <GetDebtBalanceResponse xmlns="http://fps.amazonaws.com/doc/2008-09-17/">
     <GetDebtBalanceResult>
       <DebtBalance>
         <AvailableBalance>
           <CurrencyCode>USD</CurrencyCode>
           <Value>0.000000</Value>
         </AvailableBalance>
         <PendingOutBalance>
           <CurrencyCode>USD</CurrencyCode>
           <Value>0.000000</Value>
         </PendingOutBalance>
       </DebtBalance>
     </GetDebtBalanceResult>
     <ResponseMetadata>
       <RequestId>d7d45a93-8699-4042-a014-0ae0b8102b07:0</RequestId>
     </ResponseMetadata>
   </GetDebtBalanceResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Related Actions