# Check Status of CC Collection

This endpoint allows you to query the current status of a previously initiated payment transaction.

***

### <mark style="color:yellow;">Endpoint</mark> <a href="#property-endpoint" id="property-endpoint"></a>

<mark style="color:green;background-color:green;">**`POST`**</mark>

```url
https://token.suissu.com/service/api/transactionstatus
```

#### <mark style="color:yellow;">**Header Parameters**</mark>

***

`Content-Type` <mark style="color:orange;">**string (Required)**</mark>

Indicates the format of the data that has to be sent or received.

> Example: `application/json`

***

`x-api-name` <mark style="color:orange;">**string (Required)**</mark>

This is for authentication purpose and can be obtained by logging into the Extranet itself.

> Example: `XXXXFIRSTAPP`

{% hint style="info" %}
<mark style="color:yellow;">`XXXX`</mark> can be replaced with the client name.
{% endhint %}

***

`x-api-key` <mark style="color:orange;">**string (Required)**</mark>

This is for authentication purpose and can be obtained by logging into the Extranet itself.

> Example: `kfpwsfnknknfwknfkwnknef9823rujfsormDFS3ijoncvowoeorfnv`

{% hint style="info" %}
This key will be unique for every client.
{% endhint %}

***

#### [<mark style="color:yellow;">**Attributes**</mark>](https://token.suissu.com/service/api/charge)

`partner_id` <mark style="color:orange;">**string (Required)**</mark>

Indicates the unique property ID assigned upon the creation of the property.

***

`transaction_id` <mark style="color:orange;">**string (Required)**</mark>

The transaction ID that was previously generated during the payment request. This ID is used to query the current status of the transaction.

***

### <mark style="color:yellow;">**Sample Request**</mark>

```json
{
   "partner_id": "NILE",
   "transaction_id": "f4ab7ceb2663afcf50a598a0d8e9173c"
}
```

***

### <mark style="color:yellow;">**Responses**</mark>

#### <mark style="color:green;">**200 Success Response**</mark>

`Status` <mark style="color:orange;">**string**</mark>

The status of the request. `"Success"` indicates the request was successfully processed.

***

`ErrorMessages`<mark style="color:orange;">**array**</mark>

An array of error messages. If there were no errors, this will be an empty array.

***

`transaction_details` <mark style="color:orange;">**object**</mark>

Contains details about the transaction status.

`pg_transection_id` <mark style="color:orange;">**string**</mark>

The unique transaction ID assigned by the payment gateway.

{% hint style="info" %}
Example - `pi_3QklHKJELIxNKtIh0JcxjNlt`
{% endhint %}

`amount` <mark style="color:orange;">**string**</mark>

The amount of the transaction.

{% hint style="info" %}
Example - `30`
{% endhint %}

`currency` <mark style="color:orange;">**string**</mark>

The currency of the transaction.

{% hint style="info" %}
Example - `USD`
{% endhint %}

`status` <mark style="color:orange;">**string**</mark>

The status of the transaction. A status of `"Success"` indicates the payment was completed successfully.

{% code overflow="wrap" %}
```json
{
   "Status": "Success",
   "ErrorMessages": [],
   "transaction_details": {
       "pg_transection_id": "pi_3QklHKJELIxNKtIh0JcxjNlt",
       "amount": "30",
       "currency": "USD",
       "status": "Success"
   }
}
```
{% endcode %}

***

#### <mark style="color:red;">**Error Response**</mark>

`status` <mark style="color:orange;">**string**</mark>

Indicates the status of the request.

***

`ErrorMessages` <mark style="color:orange;">**string**</mark>

Indicates the error messages, if any.

```json
{
  "Status": "Fail",
  "ErrorMessages": [
    "amount : Invalid or missing amount"
  ]
}
```
