> For the complete documentation index, see [llms.txt](https://docs.tylt.money/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tylt.money/tylt-crossramp-fiat-crypto-solutions/philippines-php/qrph-payin-php-usdt/get-instance-information.md).

# Get Instance Information

This endpoint allows you to retrieve detailed information about a specific Pay-In transaction. The `merchantOrderId` is required, and it corresponds to the unique identifier generated by merchant at the time of creating a payment instance.

#### Endpoint

[<mark style="color:green;">**`GET`**</mark>](https://dev-api.tylt.money/v2/prime-fiat/instance/details)`https://api.tylt.money/v2/prime-fiat/php/instance/details?merchantOrderId=dOf6cc25-e9f9-11ef-830e-02d8461243e9`

#### Example Request

<mark style="color:green;">**`GET`**</mark>`https://api.tylt.money/v2/prime-fiat/php/instance/details?merchantOrderId=dOf6cc25-e9f9-11ef-830e-02d8461243e9`

**Request Headers**

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

<table data-full-width="true"><thead><tr><th width="133">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="JavaScript" %}

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

const params = {
  merchantOrderId: 'dOf6cc25-e9f9-11ef-830e-02d8461243e9'
};

const queryString = new URLSearchParams(params).toString();
const url = `https://api.tylt.money/v2/prime-fiat/php/instance/details??merchantOrderId?${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: {
    '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="Response Example" %}

```json
{
    "msg": "Instance details fetched successfully.",
    "data": {
        "instanceId": "443bd1a8-944b-4595-8dcf-21e274e6386c",
        "isBuying": 1,
        "eventId": 4,
        "eventDescription": "Payment Completed",
        "fiatAmount": 580,
        "fiatCurrencySymbol": "PHP",
        "rate": 58,
        "cryptoAmount": 10,
        "cryptoCurrencySymbol": "USDT",
        "fees": 0.78,
        "callBackUrl": "https://www.callback.com",
        "redirectUrl": "https://www.google.com",
        "userDetails": {
            "Full Name": "Ana Carolina Barros Freitas",
            "DOB": "1950-01-01",
            "Country": "Portugal",
            "DocumentType": "Identity Card",
            "DocumentNumber": "426349253ZY8",
            "DocumentURL" : "https://kyc.gaming.com/b1278191.jpeg"
            },
        "merchantDetils":{ 
            "merchantName": "Example Merchant Ltd",
            "merchantUrl": "https://www.examplemerchant.com",
            "merchantInternalId": "merchant-12345"
            },
        "MDR": 2
    }
}
```

{% endtab %}

{% tab title="Response Fields" %}

| Field                  | Type   | Description                                                             |
| ---------------------- | ------ | ----------------------------------------------------------------------- |
| `instanceId`           | String | Unique identifier for the payment instance.                             |
| `isBuying`             | Number | Indicates whether the transaction is a Pay-In (`1`) or Pay-Out (`0`).   |
| `eventId`              | Number | Numeric code representing the current transaction lifecycle state.      |
| `eventDescription`     | String | Human-readable description of the transaction status.                   |
| `fiatAmount`           | Number | Amount paid by the customer in fiat currency.                           |
| `fiatCurrencySymbol`   | String | Fiat currency symbol used in the transaction — always `"PHP"`.          |
| `rate`                 | Number | PHP → USDT conversion rate applied for the transaction.                 |
| `cryptoAmount`         | Number | Amount of USDT credited to the merchant after conversion.               |
| `cryptoCurrencySymbol` | String | Crypto currency used for settlement — always `"USDT"`.                  |
| `fees`                 | Number | Total fees charged for processing the transaction.                      |
| `callBackUrl`          | String | Merchant-configured URL to receive payment or settlement callbacks.     |
| `redirectUrl`          | String | URL used to redirect the customer to complete or authorize the payment. |
| `userDetails`          | Object | Merchant-defined metadata associated with the customer.                 |
| `merchantDetails`      | Object | Merchant-defined metadata associated with the merchant being paid.      |
| `MDR`                  | Number | Merchant Discount Rate applied to the transaction (percentage).         |
| {% endtab %}           |        |                                                                         |
| {% endtabs %}          |        |                                                                         |
