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...

GetTransactionStatus

Description

The GetTransactionStatus action returns the status of the transaction specified by the TransactionId. .

This action appears in all Amazon FPS Quick Starts as well as in the Amazon Simple Pay Advanced Guide.

Request Parameters

ParameterDefinitionRequired

TransactionId

The transaction's ID.

Type: String

Constraint: Max size = 35 characters

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

CallerReference

A value you provide that uniquely identifies the request.

Type: String

Size: 128 bytes

StatusCode

Shorthand code that specifies the status of the transaction. Expands on the information in the TransactionStatus field. For example, if TransactionStatus is PENDING, this field might be PendingVerification, or PendingNetworkResponse.

Type: String

Size: 64 bytes

Valid Values: See Status Codes

StatusMessage

A description of the transaction status.

Type: String (LOB, Large Object)

TransactionId

Unique ID generated by Amazon FPS for this transaction. This element is returned if the transaction was accepted by Amazon FPS.

Type: String

Size: 35 Bytes

TransactionStatus

The status of the transaction. Provides a short code on the status of the transaction, for example "PENDING".

Type: TransactionStatus

Size: 20 bytes

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

Status Codes

This action can return the following values for StatusCode.

Status CodeMessage

Canceled

The transaction was explicitly canceled by the caller.

Expired

This reserved amount on the payment instrument was not settled within the timeout period

OR

The transaction could not be completed within the specified timeout.

PendingNetworkResponse

This transaction is awaiting a response from the backend payment processor

OR

(Message returned by backend payment processor)

PendingVerification

The transaction has been flagged for manual investigation

Success

The requested amount was reserved successfully against the given payment instrument.

OR

The transaction was successful and the payment instrument was charged.

TransactionDenied

(Message returned by backend payment processor).

OR

The transaction was denied after investigation.

Errors

This action can return the following synchronous errors, which occur within the status for this action.

Examples

The following sections show a sample request and response.

Sample REST Request

https://fps.sandbox.amazonaws.com?
Action=GetTransactionStatus
&AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE
&Signature=2l60qD6%2BDIfVEN7ZiHM0AcUKACZt0GYKFtIryqkCb6g%3D
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2009-10-06T09%3A12%3A06.921Z
&TransactionId=14GKE3B85HCMF1BTSH5C4PD2IHZL95RJ2LM
&Version=2008-09-17

Sample Query Request

GET\n
fps.sandbox.amazonaws.com\n
Action=GetTransactionStatus
&AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE
&Signature=2l60qD6%2BDIfVEN7ZiHM0AcUKACZt0GYKFtIryqkCb6g%3D
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2009-10-06T09%3A12%3A06.921Z
&TransactionId=14GKE3B85HCMF1BTSH5C4PD2IHZL95RJ2LM
&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:GetTransactionStatus 
    xmlns:ns2="http://fps.amazonaws.com/doc/2008-09-17/">
     <ns2:TransactionId>
      13N9ZL42F2SJLLIGH7RB6Q8IO8BTM62LGI3
     </ns2:TransactionId>
   </ns2:GetTransactionStatus>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sample Response to REST Request

<GetTransactionStatusResponse xmlns="http://fps.amazonaws.com/doc/2008-09-17/">
  <GetTransactionStatusResult>
    <TransactionId>14GKE3B85HCMF1BTSH5C4PD2IHZL95RJ2LM</TransactionId>
    <TransactionStatus>Success</TransactionStatus>
    <CallerReference>CallerReference07</CallerReference>
    <StatusCode>Success</StatusCode>
    <StatusMessage>
      The transaction was successful and the payment instrument was charged.
    </StatusMessage>
  </GetTransactionStatusResult>
  <ResponseMetadata>
    <RequestId>13279842-6f84-41ef-ae36-c1ededaf278d:0</RequestId>
  </ResponseMetadata>
</GetTransactionStatusResponse>

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">
		  GetTransactionStatus:Response
		</wsa:Action>
   <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">
  		urn:uuid:10d09e74-ba0a-4b3b-9eea-f873e589f496
		</wsa:MessageID>
 </SOAP-ENV:Header>
 <SOAP-ENV:Body>
   <GetTransactionStatusResponse 
    xmlns="http://fps.amazonaws.com/doc/2008-09-17/">
     <GetTransactionStatusResult>
       <TransactionId>13N9ZL42F2SJLLIGH7RB6Q8IO8BTM62LGI3</TransactionId>
       <TransactionStatus>Success</TransactionStatus>
       <CallerReference>ReferenceString????6geW12275895867941</CallerReference>
       <StatusCode>Success</StatusCode>
       <StatusMessage>message</StatusMessage>
     </GetTransactionStatusResult>
     <ResponseMetadata>
       <RequestId>10d09e74-ba0a-4b3b-9eea-f873e589f496:0</RequestId>
     </ResponseMetadata>
   </GetTransactionStatusResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>