PayStar API Documentation
  1. API DOC | EN
  • API DOC | EN
    • Introduction
    • Glossary
    • Authorization key
    • Sandbox
    • Additional fields
    • Currencies
    • Bank names
    • Telecom operators
    • Callbacks
    • Payment history
    • Error descriptions
    • Tech FAQ
    • Events
    • Balance H2H
      GET
    • Deposit H2H - ECOM (with PCI) / P2P / Online
      POST
    • Deposit H2H - ECOM by Card token (without PCI)
      POST
    • Deposit H2C - ECOM (without PCI)
      POST
    • Deposit status H2H - PayStar ID
      GET
    • Deposit status H2H - Merch ID
      GET
    • Payout H2H
      POST
    • Payout status H2H - PayStar ID
      GET
    • Payout status H2H - Merch ID
      GET
  • MERCHANT
    • FEATURES | EN
      • Deposits & Payouts
      • Issues (Tickets)
      • Secure data (One-time secret)
      • Summary Report
      • Payment Analytics
      • Payment Form Analytics
      • Unified audit log
      • Export reports
      • Black list
      • Routing & Cascading
      • Limits
      • Commissions
      • Team
      • My Account
      • PayStar in 100 Questions
    • ВОЗМОЖНОСТИ | RU
      • Депозиты и выплаты
      • Issues (Задачи)
      • Защищённые данные (One-time secret)
      • Сводный отчёт
      • Аналитика по платежам
      • Единый журнал событий
      • Аналитика платёжной формы
      • Экспорт отчётов
      • Черный список
      • Мавршрутизация и Каскады
      • Лимиты
      • Комиссии
      • Команда
      • Мой аккаунт
      • PayStar в 100 вопросах
  1. API DOC | EN

Authorization key

INFO
This section explains how to obtain authorization keys, generate a token, modify keys, and configure either Test or Production mode.
Important
Each flow (e.g., deposits and payouts) will have separate authorization keys. Make sure to use the correct key for each type of operation.

Requesting an Authorization Token#

Please contact your Account manager to obtain your authorization credentials. You can request one of the following options:
A publicKey and privateKey pair
A pre-generated bearer token
⚠️ Note: Authorization keys have two possible statuses — test mode and production.
You can start with test mode, and later either request to switch status to production or request a new Authorization keys.
If you suspect your keys may have been compromised, please request a new key pair immediately.
If you plan to receive Сallbacks, make sure to review the signature verification process described in the Callbacks section.

How to Generate a Bearer Token#

Bearer tokens are generated using JWT (JSON Web Token) with the HS256 algorithm. The token payload includes your publicKey, and it is signed using your privateKey.
Payload structure:
publicKey: your public key that corresponds to the private key used for signing
privateKey: used to sign the JWT (not included in the token itself)

Python Example#

Requirements: Install the pyjwt library via pip install pyjwt.

.NET Core Example#

Requirements: Install the System.IdentityModel.Tokens.Jwt package via NuGet.
Previous
Glossary
Next
Sandbox
Built with