Purchases by Hash

Get purchase details by hash

Changed on

Returns detailed information about specific purchase by its hash code including verification data if available.

No authentication required. The hash code serves as the access token.

Path parameter hash. If it is missing or empty in the URL (e.g. /v1/purchases-by-hash/ or /v1/purchases-by-hash//), the API returns 400 with fieldViolations on hash.

get/v1/purchases-by-hash/{hash}

Request

  • Base URL
    https://api.getmytg.com
  • URL
    https://api.getmytg.com/v1/purchases-by-hash/{hash}
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Path parameters

hashstring required

Unique hash code of the purchase

Example:abc-def-1234567890

Response

Response for status 200

idinteger required

Unique purchase identifier.

country_codestring required

ISO 3166-1 alpha-2 country code.

emojistring required

Country flag emoji.

phone_numberstring nullable required

E.164 International Format. Phone number with country code prefix (e.g., +12025550123 for US, +79991234567 for Russia).

Usage. This is your Telegram account login. Use it with verification.code and verification.password to access the account.

status'PENDING' | 'SUCCESS' | 'ERROR' | 'REFUND' | 'EXPIRED' required

Purchase Status Lifecycle. PENDING (initial) → SUCCESS (after code request) or ERROR (provider failure). Any status can transition to REFUND via admin action.

Important. Status is immutable once set to SUCCESS, ERROR, or REFUND.

Filter options

  • PENDING - code not requested.
  • SUCCESS - code ready.
  • ERROR - provider failed.
  • REFUND - money returned.
purchase_type'SINGLE' | 'BULK' | 'ADMIN' required

Type of purchase: SINGLE (regular), BULK (batch purchase), ADMIN (admin deduction)

purchase_source'BOT' | 'WEB' | 'API' required

Purchase channel: BOT (Telegram), WEB (site JWT), API (x-api-key)

created_atstring required

Purchase creation time in ISO 8601 format (UTC).

Example response

{
  "id": 12345,
  "country_code": "US",
  "emoji": "🇺🇸",
  "display_name": {
    "ru": "США",
    "en": "United States"
  },
  "phone_number": "+12025550123",
  "price": {
    "amount": "1.50",
    "currency_code": "USD"
  },
  "status": "SUCCESS",
  "purchase_type": "SINGLE",
  "purchase_source": "BOT",
  "verification": {
    "code": "12345",
    "password": "secret123",
    "received_at": "2024-11-19T07:52:00.000Z"
  },
  "created_at": "2024-11-19T07:50:00.000Z"
}

Changes