Retrieve Transaction

Request to retrieve the details of a transaction. For example you can retrieve the details of an authorization that you previously executed.

GET https://anzegate.gateway.mastercard.com/api/rest/version/3 / merchant / {merchantid} / order / {orderid} / transaction / {transactionid}

Authentication

This operation requires authentication via one of the following methods:


  • Certificate authentication.
  • Basic HTTP authentication as described at w3.org. To authenticate to the API, leave the userid portion (to the left of the colon) blank and fill the password section with the API password provided to you.

Request

URL Parameters

{merchantid} Alphanumeric + additional characters REQUIRED

Your identifier issued to you by your provider.


Data may consist of the characters 0-9, a-z, A-Z, '-', '_'

Min length: 1 Max length: 40
{orderid} Integer REQUIRED

The unique identifier of the order, to distinguish it from any other order you ever issue.


A number comprising the digits 0-9, having at least one digit. (For a complete description, see http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger.)

Min value: 0 Max value: 9999999999999999
{transactionid} String REQUIRED

The unique identifier of the transaction, to distinguish it from other transactions on the order.


Data can consist of any characters

Min length: 1 Max length: 40

Fields

To view the optional fields, please toggle on the "Show optional fields" setting.

correlationId String OPTIONAL

A transient identifier for the request, that can be used to match the response to the request.

The value provided is not validated, does not persist in the gateway, and is returned as provided in the response to the request.

Data can consist of any characters

Min length: 1 Max length: 100

Response

Fields

card CONDITIONAL
card.bankAccountType Enumeration CONDITIONAL

The type of bank account the cardholder wishes to use for the transaction.

For example, Savings or Check.

Value must be a member of the following list. The values are case sensitive.

CHECK
SAVINGS
card.expiry CONDITIONAL

Expiry date, as shown on the card.

card.expiry.month Digits ALWAYS PROVIDED

Month, as shown on the card.

Months are numbered January=1, through to December=12.

Data is a number between 1 and 12 represented as a string.

card.expiry.year Digits ALWAYS PROVIDED

Year, as shown on the card.

The Common Era year is 2000 plus this value.

Data is a string that consists of the characters 0-9.

Min length: 2 Max length: 2
card.holder CONDITIONAL
card.holder.firstName String CONDITIONAL

The first name of the person that the bill is being sent to.

Data can consist of any characters

Min length: 1 Max length: 50
card.holder.fullName String CONDITIONAL

The full name of the person that the bill is being sent to.

Data can consist of any characters

Min length: 1 Max length: 100
card.holder.lastName String CONDITIONAL

The last name or surname of the person that the bill is being sent to.

Data can consist of any characters

Min length: 1 Max length: 50
card.holder.middleName String CONDITIONAL

The middle name of the person that the bill is being sent to.

If there is more than one middle name, this is the first middle name.

Data can consist of any characters

Min length: 1 Max length: 50
card.holder.title String CONDITIONAL

The title of the person that the bill is being sent to.

Data can consist of any characters

Min length: 0 Max length: 20
card.issueNumber Digits CONDITIONAL

Issue number, as embossed on the card.

For cards such as Maestro.

Data is a string that consists of the characters 0-9.

Min length: 0 Max length: 2
card.number Masked digits ALWAYS PROVIDED

The account number embossed onto the card with your masking settings applied or 6.4 whichever is more restrictive e.g. 000000xxxxxx0000.

Data is a string that consists of the characters 0-9, plus 'x' for masking

Min length: 9 Max length: 19
card.securityCodePresence Alphanumeric CONDITIONAL

The code used to indicate the existence of the Card Security Code value.

Data may consist of the characters 0-9, a-z, A-Z

Min length: 1 Max length: 2
card.sequenceNumber Digits CONDITIONAL

The card sequence number for transactions where the data is read through a chip on the EMV card.

Data is a string that consists of the characters 0-9.

Min length: 3 Max length: 3
card.start CONDITIONAL

Start date, as shown on the card.

card.start.month Digits ALWAYS PROVIDED

Month, as shown on the card.

Months are numbered January=1, through to December=12.

Data is a number between 1 and 12 represented as a string.

card.start.year Digits ALWAYS PROVIDED

Year, as shown on the card.

The Common Era year is 2000 plus this value.

Data is a string that consists of the characters 0-9.

Min length: 2 Max length: 2
card.token Alphanumeric CONDITIONAL

Uniquely identifies a card and associated details.

May be the token provided by the merchant, or a system-generated value. A system-generated token is 16 digits long, starts with 9, and is in the format of 9nnnnnnnnnnnnnnC, where n represents any number, and C represents a check digit such that the token will conform to the Luhn algorithm.

Data may consist of the characters 0-9, a-z, A-Z

Min length: 1 Max length: 40
card.type Enumeration ALWAYS PROVIDED

Card type of the supplied card.

Value must be a member of the following list. The values are case sensitive.

MASTERCARD
MASTERCARD_PURCHASE_CARD
VISA
VISA_DEBIT
VISA_PURCHASE_CARD
merchant Alphanumeric + additional characters ALWAYS PROVIDED

Your identifier issued to you by your provider.

Data may consist of the characters 0-9, a-z, A-Z, '-', '_'

Min length: 1 Max length: 40
result Enumeration ALWAYS PROVIDED

A system-generated high level overall result of the transaction/operation.

Value must be a member of the following list. The values are case sensitive.

FAILURE

The operation was declined or rejected by the gateway, acquirer or issuer

PENDING

The operation is currently in progress or pending processing

SUCCESS

The operation was successfully processed

UNKNOWN

The result of the operation is unknown

transaction ALWAYS PROVIDED
transaction.acquirer ALWAYS PROVIDED
transaction.acquirer.date String CONDITIONAL

The date the transaction was processed, as returned by the acquirer.

Not returned by most acquirers.

Data can consist of any characters

Min length: 1 Max length: 4000
transaction.acquirer.id String ALWAYS PROVIDED

The ID for the acquirer used to process the transaction.

Data can consist of any characters

Min length: 1 Max length: 40
transaction.acquirer.time String CONDITIONAL

The time the transaction was processed, as returned by the acquirer.

Not returned by most acquirers.

Data can consist of any characters

Min length: 1 Max length: 4000
transaction.authorizationCode ASCII Text CONDITIONAL

Value generated by the issuing bank in response to a proposal to transfer funds.

Data consists of ASCII characters

Min length: 1 Max length: 100
transaction.frequency Enumeration CONDITIONAL

Indicates the frequency of the transaction offered to the cardholder.

Value must be a member of the following list. The values are case sensitive.

INSTALLMENT

Indicates an installment transaction where the cardholder authorizes you to deduct multiple payments over an agreed period of time for a single purchase.

RECURRING

Indicates a recurring transaction where the cardholder authorizes you to automatically debit their accounts for bill or invoice payments.

SINGLE

Indicates a single transaction where a single payment is used to complete the cardholder's order.

transaction.id String ALWAYS PROVIDED

The unique identifier of the transaction, that distinguishes it from other transactions on the order.

Data can consist of any characters

Min length: 1 Max length: 40
transaction.receipt ASCII Text CONDITIONAL

A unique reference generated by the acquirer for a specific merchant interaction.

The reference may be used when contacting the acquirer about a specific transaction.

Data consists of ASCII characters

Min length: 1 Max length: 100
transaction.reference String CONDITIONAL

The value provided by you to identify the transaction within all orders.

Data can consist of any characters

Min length: 1 Max length: 40
transaction.tax CONDITIONAL
transaction.tax.local CONDITIONAL
transaction.tax.local.amount Decimal CONDITIONAL

Local tax amount.

Expressed as a decimal number in the units of the currency. For example 12.34 in USD is the amount 12 dollars and 34 cents.

Data is a decimal number.

Max value: 1000000000000 Min value: 0 Max post-decimal digits: 3
transaction.tax.local.exempt Boolean CONDITIONAL

Indicates whether the transaction is exempt from local tax or not.

JSON boolean values 'true' or 'false'.

transaction.tax.local.reference String CONDITIONAL

Local tax reference value associated with the transaction.

Data can consist of any characters

Min length: 1 Max length: 20
transaction.terminal String CONDITIONAL

The terminal configured at the processor/acquirer used to process the transaction.

Data can consist of any characters

Min length: 1 Max length: 16
transaction.type Enumeration ALWAYS PROVIDED

Indicates the type of action performed on the order.

Value must be a member of the following list. The values are case sensitive.

AUTHORIZATION

Authorization

CAPTURE

Capture

PAYMENT

Payment (Purchase)

REFUND

Refund

VOID_AUTHORIZATION

Void Authorization

VOID_CAPTURE

Void Capture

VOID_PAYMENT

Void Payment

VOID_REFUND

Void Refund

Errors

error

Information on possible error conditions that may occur while processing an operation using the API.

error.cause Enumeration

Broadly categorizes the cause of the error.

For example, errors may occur due to invalid requests or internal system failures.

Value must be a member of the following list. The values are case sensitive.

INVALID_REQUEST

The request was rejected because it did not conform to the API protocol.

REQUEST_REJECTED

The request was rejected due to security reasons such as firewall rules, expired certificate, etc.

SERVER_BUSY

The server did not have enough resources to process the request at the moment.

SERVER_FAILED

There was an internal system failure.

error.explanation String

Textual description of the error based on the cause.

This field is returned only if the cause is INVALID_REQUEST or SERVER_BUSY.

Data can consist of any characters

Min length: 1 Max length: 1000
error.supportCode String

Indicates the code that helps the support team to quickly identify the exact cause of the error.

This field is returned only if the cause is SERVER_FAILED or REQUEST_REJECTED.

Data can consist of any characters

Min length: 1 Max length: 100
result Enumeration

A system-generated high level overall result of the operation.

Value must be a member of the following list. The values are case sensitive.

ERROR

The operation resulted in an error and hence cannot be processed.