Tylt: API Documentation
  • Introduction
    • Introduction
    • Getting Started
    • Generating API Keys
    • Signing API Payloads
    • Important Concepts
    • Merchant Verification
    • Tylt Prime (UPI to Crypto Solution)
      • API Reference
        • Create a Pay-in Instance
        • Create a Pay-out Instance
        • Webhook for Tylt Prime
        • Get Instance Information
        • Get Pay-In Transaction Information
        • Get Pay-Out Transaction Information
    • Tylt Prime (UPI to Crypto Solution - H2H)
      • API Reference ( Pay-In)
        • Create a Pay-in Instance
        • Buyer Confirms Payment
        • Webhook for Tylt Prime
        • Get Instance Details
        • Get Pay-In Transaction Information
        • Get List of Fiat Currency and Supported Payment Methods
        • Get List of Supported Crypto Currency for Settlement
        • Get Conversion Rates
  • Tylt CPG (Crypto Payment Gateway)
    • API Reference
      • Accept Crypto Payments
        • Creating a Pay-in Request
        • Get Pay-In Transaction History
        • Get Pay-In Transaction Information
      • Make Crypto Payouts
        • Creating a Payout Request
        • Get Pay-Out Transaction History
        • Get Pay-Out Transaction Information
      • Supporting API's
        • Get Supported Crypto Currencies List
        • Get Supported Fiat Currencies
        • Get Account Balance / Holdings
        • Get Supported Crypto Networks
        • Supported Base Currency List
      • Webhook
    • Use Cases
      • E-commerce Flow
      • Withdrawal Flow
Powered by GitBook
On this page
  1. Tylt CPG (Crypto Payment Gateway)
  2. API Reference
  3. Accept Crypto Payments

Get Pay-In Transaction History

This endpoint allows you to retrieve the history of all Pay-In transactions associated with your merchant account. The results are paginated, allowing you to specify the number of rows and the page number.

Endpoint

GEThttps://api.tylt.money/transactions/merchant/getPayinTransactionHistory?rows={numberRows}&page={pagenumber}

Endpoint Example

GEThttps://api.tylt.money/transactions/merchant/getPayinTransactionHistory?rows=20&page=1

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

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

// Replace with your API Key and Secret
const apiKey = 'your-api-key';
const apiSecret = 'your-api-secret';

// Query Parameters
const params = {rows:20,page:1};
const queryParams = new URLSearchParams(params).toString();

// Create the HMAC SHA-256 signature
const signature = crypto
  .createHmac('sha256', apiSecret)
  .update( JSON.stringify(params) )
  .digest('hex');

// Define headers
const headers = {
  "X-TLP-APIKEY": apiKey,
  "X-TLP-SIGNATURE": signature
};

// Send the GET request
axios.get(`https://api.tylt.money/transactions/merchant/getPayinTransactionHistory?${queryParams}`, { headers })
  .then(response => {
    console.log("Response:", response.data);
  })
  .catch(error => {
    console.error('Error:', error.response ? error.response.data : error.message);
  });
import requests
import hmac
import hashlib
import json

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

# Query Parameters
params = {"rows":"20","page":"1"}
query_params = '&'.join([f"{key}={value}" for key, value in params.items()])
body_string = json.dumps(params, separators=(',', ':'), ensure_ascii=False)


# Create the HMAC SHA-256 signature
signature = hmac.new(api_secret.encode(), body_string.encode(), hashlib.sha256).hexdigest()

# Define headers
headers = {
    "X-TLP-APIKEY": api_key,
    "X-TLP-SIGNATURE": signature
}

# Send the GET request
response = requests.get(f"https://api.tylt.money/transactions/merchant/getPayinTransactionHistory?{query_params}", headers=headers)

# Print the response
if response.status_code == 200:
    print("Response:", response.json())
else:
    print(f"Failed with status code {response.status_code}: {response.text}")
const fetch = require('node-fetch');
const crypto = require('crypto');

// Replace with your API Key and Secret
const apiKey = 'your-api-key';
const apiSecret = 'your-api-secret';

// Query Parameters
const params = {rows:20,page:1};
const queryParams = new URLSearchParams(params).toString();

// Create the HMAC SHA-256 signature
const signature = crypto
  .createHmac('sha256', apiSecret)
  .update( JSON.stringify(params) )
  .digest('hex');

// Define headers
const headers = {
  "X-TLP-APIKEY": apiKey,
  "X-TLP-SIGNATURE": signature
};

// Send the GET request
fetch(`https://api.tylt.money/transactions/merchant/getPayinTransactionHistory?${queryParams}`, { headers })
  .then(response => response.json())
  .then(data => console.log("Response:", data))
  .catch(error => console.error('Error:', error));

Response

{
    "data": [
        {
            "orderId": "0c635376-769a-11ef-8277-02d8461243e9",
            "merchantOrderId": "0c635376-769a-11ef-8277-02d8461243e9",
            "baseAmount": 1,
            "baseCurrency": "USDT",
            "settledCurrency": "USDT",
            "settledAmountRequested": 1,
            "settledAmountReceived": 0,
            "settledAmountCredited": 0,
            "commission": 0,
            "network": "TPNK",
            "depositAddress": "2828a803-72a7-11ef-8277-02d8461243e9",
            "status": "Completed",
            "paymentURL": "",
            "callBackURL": "",
            "transactions": [
                {
                    "amount": 1,
                    "createdAt": "2024-09-19 15:15:47.000000",
                    "updatedAt": "2024-09-19 15:15:47.000000",
                    "fromAddress": "2828a803-72a7-11ef-8277-02d8461243e9",
                    "transactionHash": "0c6fbc0c-769a-11ef-8277-02d8461243e9",
                    "confirmationStatus": 1
                }
            ],
            "createdAt": "2024-09-19T15:15:47Z",
            "expiresAt": "2024-09-19T15:15:47Z",
            "updatedAt": "2024-09-19T15:15:47Z",
            "isFinal": 1,
            "isCredited": 0,
            "customerName": "",
            "comments": ""
        },
        {
            "orderId": "6e75e180-768d-11ef-8277-02d8461243e9",
            "merchantOrderId": "",
            "baseAmount": 1,
            "baseCurrency": "USDT",
            "settledCurrency": "USDT",
            "settledAmountRequested": 1,
            "settledAmountReceived": 2,
            "settledAmountCredited": 1.99,
            "commission": 0.01,
            "network": "BSC",
            "depositAddress": "0x0b4f3ad04c183573bb5d363cab3e5bf6603088a5",
            "status": "Over Payment",
            "paymentURL": "https://app.tylt.money/pscreen/6e75e180-768d-11ef-8277-02d8461243e9",
            "callBackURL": "",
            "transactions": [
                {
                    "amount": 2,
                    "createdAt": "2024-09-19 13:45:55.000000",
                    "updatedAt": "2024-09-19 13:46:45.000000",
                    "fromAddress": "0xd2af4b117efe474b66fc79e6a8e1938d41a60f4c",
                    "transactionHash": "0x28d22fe7def4b65176ba97793d213b775d0386aa0e22a1c5a3cc8c2b376f83e7",
                    "confirmationStatus": 1
                }
            ],
            "createdAt": "2024-09-19T13:45:28Z",
            "expiresAt": "2024-09-19T14:45:28Z",
            "updatedAt": "2024-09-19T13:46:49Z",
            "isFinal": 1,
            "isCredited": 1,
            "customerName": "",
            "comments": ""
        }
    ],
    "errorCode": 0,
    "msg": ""
}

Field Name
Type
Description

orderId

String

The order ID generated by TL Pay and used as a global identifier.

merchantOrderId

String

The order ID provided by the merchant at the time of the request (optional).

baseAmount

Number

The base value of the good or service being supplied.

baseCurrency

String

The base currency of the good or service being supplied (e.g., "USDT").

settledCurrency

String

The cryptocurrency or token used for the payment by the customer.

settledAmountRequested

Number

The amount of cryptocurrency or token requested from the customer.

settledAmountReceived

Number

The amount of cryptocurrency or token received from the customer.

settledAmountCredited

Number

The amount of cryptocurrency or token credited to your balance (net).

commission

Number

The commission deducted towards the transaction.

network

String

The crypto network over which the payment is made (e.g., "BSC").

depositAddress

String

The wallet address where the payment is to be deposited.

status

String

The status of the transaction (e.g., "Expired").

paymentURL

String

The payment link that needs to be used by the customer to make the payment.

callBackURL

String

The callback URL specified at the time of request.

transactions

Array

The details of the transactions that result in the payment.

createdAt

String

The timestamp when the transaction was created (ISO 8601 format).

expiresAt

String

The timestamp when the transaction expires (ISO 8601 format).

updatedAt

String

The timestamp when the transaction was last updated (ISO 8601 format).

isFinal

Number

Indicates whether the transaction is completed (1 for completed, 0 for incomplete).

isCredited

Number

Indicates whether the credit associated with the payment has been applied to the merchant account (1 for credited, 0 for not credited).

customerName

String

The customer name provided by the merchant when making the request (optional).

comments

String

Comments provided by the merchant when making the request (optional).

PreviousCreating a Pay-in RequestNextGet Pay-In Transaction Information

Last updated 2 months ago