# 708 – Check transaction details

## 708 Request Data description:

<br>

| NODE            | INCLUDE IN CHECKSUM (IN THIS ORDER) | REQUIRED | DATA TYPE          | DESCRIPTION                                                                                                                                                                                                                                               |
| --------------- | ----------------------------------- | -------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| apiUser         | YES (1)                             | YES      | Character max 50.  | The API user assigned by the Gateway to the merchant. Can be obtained from the website inside your merchant account.                                                                                                                                      |
| apiPassword     | YES (2)                             | YES      | Character max 50.  | The API password assigned by Gateway to the merchant. Can be obtained from the website inside your merchant account.                                                                                                                                      |
| apiCmd          | YES (3)                             | YES      | 708                | 3 digit numeric transaction code must be 708                                                                                                                                                                                                              |
| merchanttransid | YES (4)                             | COND     | Character max 50.  | Unique merchant transaction id received in the request 700. Required if gatetransid not provided. Otherwise ignored.                                                                                                                                      |
| gatetransid     | Yes (4)                             | COND     | Character max 50.  | Unique gateway internal transaction id refers to charge transaction for which the status check has been requested. Required if merchanttransid not provided.                                                                                              |
| checksum        |                                     | YES      | Character no limit | SHA-1 calculated using the fields specified by the transaction plus the API key assigned by gateway to the merchant. This field must be calculated using the fields marked as “Include in checksum” (in the order indicated) plus the API key at the end. |

## 708 Response Data description

To modify the transaction status on your end, utilize the 'state' field value to correspond with the transaction status. Any additional information, such as the status code, can be included as extra data.

<table data-full-width="false"><thead><tr><th>NODE</th><th>REQUIRED</th><th>DATA TYPE</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td>result</td><td>YES</td><td>Character</td><td>Result indicates the result of the transaction. SUCCESS: Transaction was found and current state is returned. NOTFOUND: Transaction was not found. ERROR: Transaction state change failed.</td></tr><tr><td>transaction</td><td>YES</td><td>Xml Node</td><td>Section containing authorization type</td></tr><tr><td>transaction->gatetransid</td><td>Cond</td><td>Character</td><td>Gateway transaction ID</td></tr><tr><td>transaction->merchanttransid</td><td>Cond</td><td>Character</td><td>Merchant transaction ID provided during execution of 700 command</td></tr><tr><td>transaction->created</td><td>Cond</td><td>digits</td><td>Transaction date in format : YYYY-MM-DD HH:MM:SS</td></tr><tr><td>transaction->amount</td><td>Cond</td><td>Number with decimal point</td><td>Full amount to charge in currency specified.</td></tr><tr><td>transaction->curcode</td><td>Cond</td><td>Character 3</td><td>Transaction currency</td></tr><tr><td>transaction->state</td><td>Cond</td><td>Character</td><td>Current status of the transaction. AUTHORIZED: Funds from Customers Credit Card account have been “reserved” but not charged to the account. CAPTURED: Customer’s Credit Card account has been charged with the amount of the transaction. DECLINED: transaction was declined. PENDING: Transaction is in pending state CANCELED: authorization of the transaction was canceled ERROR: An error occurred during transaction processing REVERSED: Transaction was reversed REFUNDED: Transaction was refunded REFUND PENDING: Refund is waiting for staff confirmation CHARGEBACK: means that a charge back for the transaction was received by the gateway.</td></tr><tr><td>transaction->merchantspecific1</td><td>Cond</td><td>Character max 200</td><td>Merchant specific data for merchant use only, provided during 700 command.</td></tr><tr><td>transaction->merchantspecific2</td><td>Cond</td><td>Character max 200</td><td>Merchant specific data for merchant use only, provided during 700 command.</td></tr><tr><td>transaction->merchantspecific3</td><td>Cond</td><td>Character max 200</td><td>Merchant specific data for merchant use only, provided during 700 command.</td></tr><tr><td>transaction->merchantspecific4</td><td>Cond</td><td>Character max 200</td><td>Merchant specific data for merchant use only, provided during 700 command.</td></tr><tr><td>transaction->merchantspecific5</td><td>Cond</td><td>Character max 200</td><td>Merchant specific data for merchant use only, provided during 700 command.</td></tr><tr><td>errorcode</td><td>NO</td><td>Character 3</td><td>Error Code of the transaction or 000 if no error condition found.</td></tr><tr><td>errormessage</td><td>NO</td><td>Character max 100</td><td>Full description of the error.</td></tr><tr><td>transaction</td><td>YES</td><td>Xml Node</td><td>Section containing authorization type</td></tr><tr><td>customer->firstname</td><td></td><td>Character max 50.</td><td>First name of the Customer.</td></tr><tr><td>customer->lastname</td><td></td><td>Character max 50.</td><td>Section containing authorization type</td></tr><tr><td>customer->birthday</td><td></td><td>Number 1-2 digits</td><td>Day of birth of the Customer (1-31) Important Note: If Merchant cannot provide such data, he/she should contact Sales Account Manager. Tag will be set as “Optional” only with GPN’s Sales Account Manager approval.</td></tr><tr><td>customer->birthmonth</td><td></td><td>Number 1-2 digits</td><td>Month of birth of the customer (1-12) Important Note: If Merchant cannot provide such data, he/she should contact GPN’s Sales Account Manager. Tag will be set as “Optional” only with Sales Account Manager approval.</td></tr><tr><td>customer->birthyear</td><td></td><td>Number 4 digits</td><td>Year of birth of the customer (1900-2100) Important Note: If Merchant cannot provide such data, he/she should contact GPN’s Sales Account Manager. Tag will be set as “Optional” only with Sales Account Manager approval.</td></tr><tr><td>customer->email</td><td></td><td>Character max 100.</td><td>Email of the Customer.</td></tr><tr><td>customer->countryiso</td><td></td><td>Character exactly 3.</td><td>3 letter ISO country code of the Customer. Full list of codes can be obtained from the website inside your merchant account.</td></tr><tr><td>customer->stateregioniso</td><td></td><td>Character max 3.</td><td>1-3 character ISO 3166 state/region/province code of the Customer. Full list of codes can be obtained from the website inside your merchant account.</td></tr><tr><td>customer->zippostal</td><td></td><td>Character max 15.</td><td>Customer’s Zipcode or postal code.</td></tr><tr><td>customer->city</td><td></td><td>Character max 50.</td><td>Customer’s City</td></tr><tr><td>customer->address1</td><td></td><td>Character max 75.</td><td>Customer’s address line 1</td></tr><tr><td>customer->address2</td><td></td><td>Character max 75.</td><td>Customer’s address line 2</td></tr><tr><td>customer->phone1phone</td><td></td><td>Character max 20.</td><td>Customer’s phone number, including country code and area code. Digits only, without (+) character</td></tr><tr><td>customer->phone2phone</td><td></td><td>Character max 20.</td><td>Customer’s phone number, including country code and area code. Digits only, without (+) character</td></tr><tr><td>customer->accountid</td><td></td><td>Character max 50.</td><td>Customer unique account id used inside the merchant organization.</td></tr><tr><td>customer->ipaddress</td><td></td><td>Character max 15.</td><td>Full IP address of the customer used for this transaction</td></tr><tr><td>creditcard</td><td>YES</td><td>Xml Node</td><td>Section containing authorization type</td></tr><tr><td>creditcard->brand</td><td></td><td>Character max 50.</td><td>Card Brand: Visa MasterCard Maestro Amex JCB DinnersClub UnionPay</td></tr><tr><td>creditcard->last4</td><td></td><td>Number digit 4</td><td>Last 4 number of the card</td></tr><tr><td>creditcard->nameoncard</td><td></td><td>Character max 50.</td><td>Full name as it appears on card.</td></tr><tr><td>creditcard->billingcountryiso</td><td></td><td>Character exactly 3.</td><td>3-digits ISO country code of the Customer. Full list of codes can be obtained from the website inside your merchant account.</td></tr><tr><td>creditcard->billingstateregioniso</td><td></td><td>Character max 5.</td><td>ISO 3166 state/region/province code of the Customer. Full list of codes can be obtained from the website inside your merchant account.</td></tr><tr><td>creditcard->billingzippostal</td><td></td><td>Character max 15.</td><td>Customer’s Zip code or postal code.</td></tr><tr><td>creditcard->billingcity</td><td></td><td>Character max 50.</td><td>Customer’s City</td></tr></tbody></table>

{% tabs %}
{% tab title="CURL" %}
**708 Request Sample**

The query can utilize either `merchanttransid` or `gatetransid` to identify the transaction, but only one is required. Consequently, the checksum calculation will only include one of these fields based on which is used in the request.

```
  <?xmlversion="1.0" encoding="utf-8" ?>
	<transaction>
		<apiUser> </apiUser>
		<apiPassword> </apiPassword>
		<apiCmd> </apiCmd>
		<merchanttransid> </merchanttransid>
		<notify> </notify>
		<checksum> </checksum>		
	</transaction> 
							  
```

**708 Response**

The response to a 708 – Check transaction status is a plain xml un-encoded that contains the following data:

```

	<?xmlversion="1.0" encoding="utf-8" ?>
	<transaction>
		<result> </result>
	<transaction>
		<gatetransid> </gatetransid>
		<merchanttransid> </merchanttransid>
		<amount> </amount>
		<created> </created>
		<curcode> </curcode>
		<state> </state>
		<merchantspecific1> </merchantspecific1>
		<merchantspecific2> </merchantspecific2>
		<merchantspecific3> </merchantspecific3>
		<merchantspecific4> </merchantspecific4>
		<merchantspecific5> </merchantspecific5>
		<description> </description>
		<errorcode> </errorcode>
		<errormessage> </errormessage>
	</transaction> 
	<customer> 
			<firstname> </firstname>
			<lastname> </lastname>
			<birthday/> 
			<birthmonth/> 
			<birthyear/> 
			<email> </email>
			<zippostal/> 
			<address1/> 
			<address2/> 
			<phone1phone/> 
			<phone2phone/> 
			<city> </city>
			<countryiso> </countryiso>
			<stateregioniso/> 
		</customer>
		<creditcard> 
			<brand> </brand>
			<last4> </last4>
			<name> </name>
			<billingaddress1/> 
			<billingaddress2/> 
			<billingcity/> 
			<billingzippostal/> 
			<billingcountryiso/> 
		</creditcard> 
		
	</transaction> 
```

{% endtab %}

{% tab title="PHP" %}
708 Request Sample

```
 
require_once 'autoload.php';

use Omnipay\GPNDataEurope\GPNGateway;
set_time_limit(0);

$gpnGateway = new GPNGateway();
$gpnGateway->setApiKey('APIKEY');
$gpnGateway->setApiPassword('APIPASS');
$gpnGateway->setApiUser('APIUSER');
$gpnGateway->setMode(GPNGateway::PROD_MODE);
$gpnGateway->setPROD('https://txtest.txpmnts.com/api/transaction/');


	
$params = [
	'merchantTransactionId' => '',	
	'gatewayTransactionId' => '',	
		 
		];

try {
	// Check Transaction
	$response = $gpnGateway->Transaction($params)->send();
	
	printf("%s-%s\n", $response->getCode(), $response->getMessage());
} catch (Exception $exc) {
	print_r($exc->getCode(), $exc->getMessage());
}
```

{% endtab %}
{% endtabs %}
