# Get Pay-In Transaction Information

This endpoint allows you to retrieve detailed information about a specific Pay-In transaction. The `orderId` is required, and it corresponds to the unique identifier generated by Tylt for the transaction.

#### Endpoint

<mark style="color:green;">**`GET`**</mark>`https://api.tylt.money/transactions/merchant/getPayinTransactionInformation?`orderId={merchantOrderId}

#### Example Request

<mark style="color:green;">**`GET`**</mark>`https://api.tylt.money/transactions/merchant/getPayinTransactionInformation?orderId=a49579dd-7711-11ef-8277-02d8461243e9`

**Request Headers**

{% tabs %}
{% tab title="Headers" %}

<table data-full-width="true"><thead><tr><th width="182">Name</th><th width="79">Type</th><th width="167">Example</th><th>Description</th></tr></thead><tbody><tr><td>X-TLP-APIKEY</td><td>string</td><td>93ee3c5e133697251b5362bcf9cc8532476785t8768075616f58d88</td><td>Your Tylt API Key, used to identify your account in API requests.</td></tr><tr><td>X-TLP-SIGNATURE</td><td>string</td><td>d0afef3853dfc8489c8b9affa5825171fdd7y7685675e4966a05f66ed2b3eaf9462b3c9c0</td><td>HMAC SHA-256 signature generated using the API Secret Key to secure the request.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
When using the API, ensure to include your API Key and generate the signature for the request payload using your API Secret. The tables provided above contain example values for illustration purposes only. Please refer to the code snippets for detailed instructions on how to sign the request and generate the signature properly.
{% endhint %}

**Code Snippet**

{% tabs %}
{% tab title="Node JS" %}

```javascript
const axios = require('axios');
const crypto = require('crypto');

const params = {
  orderId: 'a49579dd-7711-11ef-8277-02d8461243e9'
};

const queryString = new URLSearchParams(params).toString();
const url = `https://api.tylt.money/transactions/merchant/getPayinTransactionInformation?${queryString}`;

const apiKey = 'your-api-key';
const secretKey = 'your-secret-key';

const signaturePayload = JSON.stringify(params);

const signature = crypto.createHmac('sha256', secretKey)
  .update(signaturePayload)
  .digest('hex');

const config = {
  method: 'get',
  url: url,
  headers: {
    'Content-Type': 'application/json'
    'X-TLP-APIKEY': apiKey,
    'X-TLP-SIGNATURE': signature
  }
};

axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.error(error);
  });

```

{% endtab %}

{% tab title="Python" %}

```python
import json
import hashlib
import hmac
import requests

# Replace with your API Key and Secret
api_key = 'your-api-key'
api_secret = 'your-secret-key'

# Function to create HMAC SHA-256 signature
def create_signature(secret, data):
    return hmac.new(secret.encode(), data.encode(), hashlib.sha256).hexdigest()

# Function to send a GET request
def send_get_request(url, params):
    raw = '&'.join([f"{key}={value}" for key, value in params.items()])
    body_string = json.dumps(params, separators=(',', ':'), ensure_ascii=False)
    signature = create_signature(api_secret, body_string)

    headers = {
        'X-TLP-APIKEY': api_key,
        'X-TLP-SIGNATURE': signature
    }

    response = requests.get(f"{url}?{raw}", headers=headers)
    return response.json()

# Request parameters for GET request
get_params = {
    'orderId': 'a49579dd-7711-11ef-8277-02d8461243e9'
}

# Send the GET request
get_response = send_get_request("https://api.tylt.money/transactions/merchant/getPayinTransactionInformation", get_params)
print(get_response)


```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const crypto = require('crypto');

const params = {
  orderId: 'a49579dd-7711-11ef-8277-02d8461243e9'
};

const queryString = new URLSearchParams(params).toString();
const url = `https://api.tylt.money/transactions/merchant/getPayinTransactionInformation?${queryString}`;

const apiKey = 'your-api-key';
const secretKey = 'your-secret-key';

const signaturePayload = JSON.stringify(params);

const signature = crypto.createHmac('sha256', secretKey)
  .update(signaturePayload)
  .digest('hex');

const requestOptions = {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json'
    'X-TLP-APIKEY': apiKey,
    'X-TLP-SIGNATURE': signature
  },
  redirect: 'follow'
};

fetch(url, requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.error('error', error));

```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "msg": "",
  "data": {
    "orderId": "5eac0241-9325-4f3e-b350-1be35005eccd",
    "merchantOrderId": "merchant-testo8N7VqbdyV",
    "baseAmount": 7.3,
    "baseAmountReceived": 7.3,
    "conversionRate": 1,
    "baseCurrency": "USDT",
    "settledCurrency": "USDT",
    "settledAmountRequested": 7.3,
    "settledAmountReceived": 7.3,
    "settledAmountCredited": 7.3,
    "commission": 0,
    "network": "TPNK",
    "depositAddress": "",
    "status": "Completed",
    "paymentURL": "",
    "redirectURL": "",
    "callBackURL": "",
    "transactions": [],
    "createdAt": "2025-08-08T13:07:03Z",
    "expiresAt": "2025-08-08T13:07:03Z",
    "updatedAt": "2025-08-08T13:07:10Z",
    "isFinal": 1,
    "isCredited": 1,
    "customerName": "",
    "comments": "",
    "ledger": "CR",
    "accounts": {
      "MDR_Rate": 1.0,
      "localCurrency": "BRL",
      "transactionType": "pay-in",
      "merchantAccountDebited": null,
      "merchantAccountCredited": 7.3,
      "amountPaidInLocalCurrency": 40.0,
     //  fields below are applicable to PIX instant pay-in.
      "transactionHash": "0x7f696e3389c7f72f933a2ef5607a9b5a2ec5cb00317aa4df19de44cb82d5ca52",
      "network": "ETH"
    },
    "tradePrice": 5.43
  }
}

```

{% endtab %}

{% tab title="Response Fields" %}

| **Field Name**              | **Type** | **Description**                                                                                                                   |
| --------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `orderId`                   | string   | The order ID generated by TL Pay, used as a global identifier for the transaction.                                                |
| `merchantOrderId`           | string   | The order ID provided by the Merchant, used for local reference (Recommended).                                                    |
| `baseAmount`                | number   | The base value of the good/service being supplied. (USDT)                                                                         |
| `baseCurrency`              | string   | The base currency of the good/service being supplied.  (USDT)                                                                     |
| `settledCurrency`           | string   | The cryptocurrency/token equivalent in which the payment is to be received by the Merchant. (USDT)                                |
| `settledAmountRequested`    | number   | The amount of cryptocurrency/token equivalent requested to be sent by the customer. ( USDT)                                       |
| `settledAmountRecieved`     | number   | The amount of cryptocurrency/token equivalent recieved by the customer.                                                           |
| `settledAmountCredited`     | number   | The amount of cryptocurrency/token credited to the merchant's balance (net).                                                      |
| `commission`                | number   | The commission deducted for the transaction.                                                                                      |
| `network`                   | string   | The cryptocurrency network over which the payment is made.                                                                        |
| `status`                    | string   | The status of the transaction (e.g., Expired, Pending, Completed).                                                                |
| `createdAt`                 | string   | The timestamp when the transaction was created.                                                                                   |
| `expiresAt`                 | string   | The timestamp when the transaction expires.                                                                                       |
| `updatedAt`                 | string   | The timestamp when the transaction was last updated.                                                                              |
| `isFinal`                   | number   | Indicates if the transaction is complete (1) or still processing (0).                                                             |
| `isCredited`                | number   | Indicates if the payment has been credited to the merchant account (1: Yes, 0: No).                                               |
| `customerName`              | string   | The name of the customer provided by the merchant (optional).                                                                     |
| `comments`                  | string   | Comments provided by the merchant about the transaction (optional).                                                               |
| `tradePrice`                | number   | The price at which BRL was converted to USDT for this trade.                                                                      |
| `MDR_Rate`                  | number   | The Merchant Discount Rate in percentage (cost)  applied to the trade.                                                            |
| `localCurrency`             | string   | The symbol of the local currency in which the Payin was accepted (BRL)                                                            |
| `transactionType`           | string   | The nature of the transaction (Payin)                                                                                             |
| `merchantAccountCredited`   | number   | The amount in USDT credited to the merchant account for the transaction                                                           |
| `amountPaidInLocalCurrency` | number   | The amount paid by the customer in BRL                                                                                            |
| `transactionHash`           | string   | **Applicable only PIX Instant Payin:** The transaction hash of the transfer to the Self Hosted wallet.                            |
| `network`                   | string   | **Applicable only PIX Instant Payin:** The netowrk over which the on-chain instant settlement to the self hosted wallet was made. |
| {% endtab %}                |          |                                                                                                                                   |
| {% endtabs %}               |          |                                                                                                                                   |
