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

GEThttps://api.tylt.money/p2pRampsMerchant/getInstanceDetails?merchantOrderId={merchantOrderId}

Example Request

GEThttps://api.tylt.money/p2pRampsMerchant/getInstanceDetails?merchantOrderId=dOf6cc25-e9f9-11ef-830e-02d8461243e9

Request Headers

Name
Type
Example
Description

X-TLP-APIKEY

string

93ee3c5e133697251b5362bcf9cc8532476785t8768075616f58d88

Your Tylt API Key, used to identify your account in API requests.

X-TLP-SIGNATURE

string

d0afef3853dfc8489c8b9affa5825171fdd7y7685675e4966a05f66ed2b3eaf9462b3c9c0

HMAC SHA-256 signature generated using the API Secret Key to secure the request.

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.

Code Snippet

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 = {
    'instanceId': 'dOf6cc25-e9f9-11ef-830e-02d8461243e9'
}

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

Response

To better understand the payment process lifecycle and effectively utilize the data provided by the Get Instance Information API, refer to the detailed explanation of the event lifecycle here

{
    "msg": "",
    "data": {
        "trade": {
            "isBuyTrade":1,
            "event": {
                "id": null,
                "deadline": null,
                "description": null
            },
            "createdAt": null,
            "updatedAt": null,
            "fiatCurrency": {
                "name": null,
                "symbol": null
            },
            "priceDetails": {
                "price": null,
                "amount": null,
                "paymentAmount": null
            },
            "paymentMethod": {
                "details": null
            },
            "cryptoCurrency": {
                "name": null,
                "symbol": null
            }
        },
        "transaction": {
            "amount": null,
            "status": null,
            "isFinal": null,
            "orderId": null,
            "createdAt": null,
            "isCredited": null,
            "updatedAt": null,
            "merchantOrderId": null
        },
        "user": {}
    }
}

Last updated