GetTransactionStatus

Description

The GetTransactionStatus action returns the status of the transaction specified by the TransactionId. You could use this action if you choose not to process Instant Payment Notifications (IPNs) that you receive from Amazon Payments (for more information, see Using Instant Payment Notification).

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

Size: LOB

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=AKIAIIFXJCFIHITREP4Q
&Signature=2l60qD6%2BDIfVEN7ZiHM0AcUKACZt0GYKFtIryqkCb6g%3D
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2009-10-06T09%3A12%3A06.921Z
&TransactionId=14GKE3B85HCMF1BTSH5C4PD2IHZL95RJ2LM
&Version=2008-09-17

Sample SOAP Request

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

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>