GetPrepaidBalance

Description

The GetPrepaidBalance action retrieves the balance of a prepaid payment token.

[Note]Note

You can query for the prepaid balance only if you are the sender or the recipient for the prepaid instrument.

Request Parameters

ParameterDescriptionRequired

PrepaidInstrumentId

ID for the prepaid instrument that holds the prepaid balance.

Type: String

Default: None

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

PrepaidBalance

Specifies the balance on the prepaid instrument.

Type: PrepaidBalance

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

Errors

This action can return the following errors:

Examples

Sample REST Request

https://fps.amazonaws.com/?
  Action=GetPrepaidBalance&
  AWSAccessKeyId=0656Example83G2&
  SignatureVersion=1&
  Timestamp=2008-08-06T13%3A00%3A01Z&
  PrepaidInstrumentId=254656Example83987&
  Version=2008-09-17&
  Signature=<URL-encoded signature value>

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:GetPrepaidBalance xmlns:ns2="http://fps.amazonaws.com/doc/2008-09-17/">
     <ns2:PrepaidInstrumentId>G5H24VEMGPLG2QKS5MGN7MYCKW2WRZKRBQ4IFDT5IXNS8X2V94BZPXCY8CCZZHHQ</ns2:PrepaidInstrumentId>
   </ns2:GetPrepaidBalance>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sample Response to REST Request

<ns3:GetPrepaidBalanceResponse
  xmlns:ns2="http://fps.amazonaws.com/private/doc/2007-01-08/"
  xmlns:ns3="http://fps.amazonaws.com/doc/2007-01-08/" xmlns:ns4="http://fps.amazonaws.com/internal/doc/2007-01-08/">
  <PrepaidBalance>
    <AvailableBalance>
      <CurrencyCode>USD</CurrencyCode>
      <Amount>0.000000</Amount>
    </AvailableBalance>
    <PendingInBalance>
      <CurrencyCode>USD</CurrencyCode>
      <Amount>0.000000</Amount>
    </PendingInBalance>
  </PrepaidBalance>
  <Status>Success</Status>
  <RequestId>46e3f4d8-6ab7-489a-a332-5adbd12de23b:0</RequestId>
</ns3:GetPrepaidBalanceResponse>

Sample Response to SOAP Request

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 <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">GetPrepaidBalance:Response</wsa:Action>
   <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">urn:uuid:46e3f4d8-6ab7-489a-a332-5adbd12de23b</wsa:MessageID>
 </SOAP-ENV:Header>
 <SOAP-ENV:Body>
   <ns3:GetPrepaidBalanceResponse
     xmlns:ns2="http://fps.amazonaws.com/private/doc/2007-01-08/"
     xmlns:ns3="http://fps.amazonaws.com/doc/2007-01-08/" xmlns:ns4="http://fps.amazonaws.com/internal/doc/2007-01-08/">
     <PrepaidBalance>
       <AvailableBalance>
         <CurrencyCode>USD</CurrencyCode>
         <Amount>0.000000</Amount>
       </AvailableBalance>
       <PendingInBalance>
         <CurrencyCode>USD</CurrencyCode>
         <Amount>0.000000</Amount>
       </PendingInBalance>
     </PrepaidBalance>
     <Status>Success</Status>
     <RequestId>46e3f4d8-6ab7-489a-a332-5adbd12de23b:0</RequestId>
   </ns3:GetPrepaidBalanceResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Related Actions