Tegro [en]
enru
  • 🌕Ecosystem overview
    • ru
  • 💸Tegro Money
    • 👨đŸ’ģ Getting Started
      • Registration
        • Login to the site
        • Registration of an individual
      • Adding a store
      • Store setup
        • Help with moderation
    • đŸ’ĩCreating a payment
      • Creating a simple form in your personal cabinet
      • Transmitting order information
      • Notification of payment
    • đŸ—ī¸API
      • General Information
        • Creating an order
        • Store list
        • Balance
      • Order verification
        • Order list
      • Withdrawal of funds
        • List of payments
        • Payment verification
      • Ready modules
    • ❓FAQ
      • Rates and limits
      • Project moderation
      • Mass Payments
      • Adding a Telegram bot
    • â„šī¸Background Information
      • Payment system codes
      • Mobile phone codes
      • Alphabetic currency codes
      • Payment statuses
      • Payment errors
      • Customer Service
  • âš–ī¸DEX Tegro Finance
    • 🔎DEX review
    • 👨đŸ’ģ Getting Started
      • The mechanics of operation
      • Roles of the participants
      • Glossary
      • The Open Network
    • 🔄Swap
      • Tokens on DEX
      • Commissions
      • Price impact
      • Slippage tolerance
    • 🐞Bug Bounty
    • 💎Referral program
      • How the affiliate program works
    • 🔧DEX on Testnet
    • 💰Earnings on liquidity pools
    • The mechanics of liquidity pools
    • Monitoring DEX
      • DEX on DefiLama
      • DEX on Coincodex & CoinCheckup
      • DEX on CoinPaprika
      • DEX on CoinMarketCap
  • 🛒Marketplace
    • 🔎Marketplace Review
    • ✨Interface
    • 🎁NFT Earn
  • đŸ›Ąī¸tegro wallet
    • 🔎Wallet review
      • Tegro Wallet
    • 👨đŸ’ģ Getting Started
      • How to use Tegro Wallet
        • Web version
        • Android version
        • Browser Extension
      • Creating a new wallet
      • Connecting an existing wallet
      • Asset management
        • Adding tokens to Tegro Wallet
        • Sending tokens
        • Receiving tokens
        • Transactions
    • ✨Interface
    • ✅TON DNS support
    • 🔧Tegro Wallet at Testnet
    • 🐞Bug Bounty
    • đŸ–ŧī¸Coins and tokens display
      • Displaying fungible tokens
      • NFT display
    • 🆕In future updates
  • đŸĒ™TOKEN TGR
    • 📘TGR
    • 📑Tokenomics TGR
      • đŸ”ĨTGR token burn
    • â„šī¸Information on the network
    • 🛒How to buy TGR cryptocurrency
    • 🔄Balance and transfers in TON
    • 🔜Further Development
Powered by GitBook
On this page
  1. Tegro Money
  2. API

General Information

PreviousAPINextCreating an order

Last updated 1 year ago

Obtaining an API key

API key for access to Tegro.money REST service can be generated on the store settings page

All data in requests to Tegro.money service is sent by POST via HTTP protocol to the address https://tegro.money/api/method. Parameters of the message are packed into JSON-object.

A signature must be sent along with the request. The whole request body should be signed as it is sent to the Bank's server (after serializing the request body in JSON to send it via HTTP).

In each query it is necessary to pass a nonce parameter different from the previous one! For example, you can use the current time in seconds

Use your secret key for the signature. Generate a signature with SHA-256 algorithm.

<?php

$api_key = 'EEFA1913EA9D9351469B1E5D852A';

$data = array(
    'shop_id' =>'1913EA9D9351469B1E5D852A',
    'nonce' => time(),
);

$body = json_encode($data);
$sign = hash_hmac('sha256', $body, $api_key);


$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://tegro.money/api/orders/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS =>$body,
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer $sign",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
💸
đŸ—ī¸
https://tegro.money/my/shop-settings/